Blame view

uni_modules/uview-plus/components/u-text/props.js 3.38 KB
a2702f6d   刘淇   巡查计划
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
  import { defineMixin } from '../../libs/vue'
  import defProps from '../../libs/config/props.js'
  export const props = defineMixin({
      props: {
          // 主题颜色
          type: {
              type: String,
              default: () => defProps.text.type
          },
          // 是否显示
          show: {
              type: Boolean,
              default: () => defProps.text.show
          },
          // 显示的值
          text: {
              type: [String, Number],
              default: () => defProps.text.text
          },
          // 前置图标
          prefixIcon: {
              type: String,
              default: () => defProps.text.prefixIcon
          },
          // 后置图标
          suffixIcon: {
              type: String,
              default: () => defProps.text.suffixIcon
          },
          // 文本处理的匹配模式
          // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
          mode: {
              type: String,
              default: () => defProps.text.mode
          },
          // mode=link下,配置的链接
          href: {
              type: String,
              default: () => defProps.text.href
          },
          // 格式化规则
          format: {
              type: [String, Function],
              default: () => defProps.text.format
          },
          // mode=phone时,点击文本是否拨打电话
          call: {
              type: Boolean,
              default: () => defProps.text.call
          },
          // 小程序的打开方式
          openType: {
              type: String,
              default: () => defProps.text.openType
          },
          // 是否粗体,默认normal
          bold: {
              type: Boolean,
              default: () => defProps.text.bold
          },
          // 是否块状
          block: {
              type: Boolean,
              default: () => defProps.text.block
          },
          // 文本显示的行数,如果设置,超出此行数,将会显示省略号
          lines: {
              type: [String, Number],
              default: () => defProps.text.lines
          },
          // 文本颜色
          color: {
              type: String,
              default: () => defProps.text.color
          },
          // 字体大小
          size: {
              type: [String, Number],
              default: () => defProps.text.size
          },
          // 图标的样式
          iconStyle: {
              type: [Object, String],
              default: () => defProps.text.iconStyle
          },
          // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
          decoration: {
              tepe: String,
              default: () => defProps.text.decoration
          },
          // 外边距,对象、字符串,数值形式均可
          margin: {
              type: [Object, String, Number],
              default: () => defProps.text.margin
          },
          // 文本行高
          lineHeight: {
              type: [String, Number],
              default: () => defProps.text.lineHeight
          },
          // 文本对齐方式,可选值left|center|right
          align: {
              type: String,
              default: () => defProps.text.align
          },
          // 文字换行,可选值break-word|normal|anywhere
          wordWrap: {
              type: String,
              default: () => defProps.text.wordWrap
          },
  		// 占满剩余空间
  		flex1: {
  			type: Boolean,
  			default: () => defProps.text.flex1
  		}
      }
  })