uview-plus 3.2.5 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +7 -0
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-album/props.js +12 -11
- package/components/u-alert/props.js +9 -8
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-back-top/props.js +11 -10
- package/components/u-badge/props.js +15 -14
- package/components/u-button/props.js +29 -37
- package/components/u-calendar/props.js +28 -27
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-cell/props.js +21 -20
- package/components/u-cell/u-cell.vue +3 -2
- package/components/u-cell-group/props.js +3 -2
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox-group/props.js +17 -16
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code-input/props.js +17 -16
- package/components/u-col/props.js +6 -5
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-column-notice/props.js +11 -10
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-to/props.js +12 -11
- package/components/u-datetime-picker/props.js +25 -24
- package/components/u-divider/props.js +9 -8
- package/components/u-dropdown/props.js +1 -0
- package/components/u-dropdown-item/props.js +1 -0
- package/components/u-dropdown-item/u-dropdown-item.vue +3 -5
- package/components/u-empty/props.js +12 -11
- package/components/u-form/props.js +9 -8
- package/components/u-form-item/props.js +11 -10
- package/components/u-gap/props.js +5 -4
- package/components/u-grid/props.js +4 -3
- package/components/u-grid-item/props.js +3 -2
- package/components/u-icon/props.js +18 -17
- package/components/u-image/props.js +17 -16
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-list/props.js +6 -5
- package/components/u-input/props.js +36 -35
- package/components/u-keyboard/props.js +17 -16
- package/components/u-line/props.js +7 -6
- package/components/u-line-progress/props.js +6 -5
- package/components/u-link/props.js +8 -7
- package/components/u-list/props.js +15 -14
- package/components/u-list-item/props.js +2 -1
- package/components/u-loading-icon/props.js +12 -11
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loadmore/props.js +19 -18
- package/components/u-modal/props.js +17 -16
- package/components/u-navbar/props.js +17 -16
- package/components/u-no-network/props.js +4 -3
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notify/props.js +10 -9
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-overlay/props.js +5 -4
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +17 -16
- package/components/u-picker-column/props.js +1 -0
- package/components/u-popup/props.js +16 -15
- package/components/u-radio/props.js +14 -13
- package/components/u-radio-group/props.js +18 -17
- package/components/u-rate/props.js +15 -14
- package/components/u-read-more/props.js +9 -8
- package/components/u-row/props.js +4 -3
- package/components/u-row-notice/props.js +8 -7
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-search/props.js +25 -24
- package/components/u-skeleton/props.js +12 -11
- package/components/u-slider/props.js +12 -11
- package/components/u-status-bar/props.js +2 -1
- package/components/u-steps/props.js +8 -7
- package/components/u-steps-item/props.js +5 -4
- package/components/u-sticky/props.js +7 -6
- package/components/u-subsection/props.js +10 -9
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action-item/props.js +8 -7
- package/components/u-swipe-action-item/u-swipe-action-item.vue +18 -1
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-switch/props.js +12 -11
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-table/props.js +1 -0
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tag/props.js +20 -18
- package/components/u-td/props.js +1 -0
- package/components/u-text/props.js +22 -21
- package/components/u-textarea/props.js +24 -23
- package/components/u-toolbar/props.js +7 -6
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tr/props.js +1 -0
- package/components/u-transition/props.js +5 -4
- package/components/u-upload/props.js +23 -22
- package/index.js +16 -1
- package/libs/function/index.js +30 -23
- package/package.json +2 -1
- package/types/index.d.ts +1 -0
- package/types/package.json +26 -0
|
@@ -1,44 +1,45 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 当前匹配项的name
|
|
4
5
|
value: {
|
|
5
6
|
type: [String, Number, null],
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.tabbar.value
|
|
7
8
|
},
|
|
8
9
|
// 是否为iPhoneX留出底部安全距离
|
|
9
10
|
safeAreaInsetBottom: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.tabbar.safeAreaInsetBottom
|
|
12
13
|
},
|
|
13
14
|
// 是否显示上方边框
|
|
14
15
|
border: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.tabbar.border
|
|
17
18
|
},
|
|
18
19
|
// 元素层级z-index
|
|
19
20
|
zIndex: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.tabbar.zIndex
|
|
22
23
|
},
|
|
23
24
|
// 选中标签的颜色
|
|
24
25
|
activeColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.tabbar.activeColor
|
|
27
28
|
},
|
|
28
29
|
// 未选中标签的颜色
|
|
29
30
|
inactiveColor: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.tabbar.inactiveColor
|
|
32
33
|
},
|
|
33
34
|
// 是否固定在底部
|
|
34
35
|
fixed: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.tabbar.fixed
|
|
37
38
|
},
|
|
38
39
|
// fixed定位固定在底部时,是否生成一个等高元素防止塌陷
|
|
39
40
|
placeholder: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.tabbar.placeholder
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// item标签的名称,作为与u-tabbar的value参数匹配的标识符
|
|
4
5
|
name: {
|
|
5
6
|
type: [String, Number, null],
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.tabbarItem.name
|
|
7
8
|
},
|
|
8
9
|
// uView内置图标或者绝对路径的图片
|
|
9
10
|
icon: {
|
|
10
11
|
icon: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.tabbarItem.icon
|
|
12
13
|
},
|
|
13
14
|
// 右上角的角标提示信息
|
|
14
15
|
badge: {
|
|
15
16
|
type: [String, Number, null],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.tabbarItem.badge
|
|
17
18
|
},
|
|
18
19
|
// 是否显示圆点,将会覆盖badge参数
|
|
19
20
|
dot: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.tabbarItem.dot
|
|
22
23
|
},
|
|
23
24
|
// 描述文本
|
|
24
25
|
text: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.tabbarItem.text
|
|
27
28
|
},
|
|
28
29
|
// 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
|
|
29
30
|
badgeStyle: {
|
|
30
31
|
type: [Object, String],
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.tabbarItem.badgeStyle
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
}
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 滑块的移动过渡时间,单位ms
|
|
4
5
|
duration: {
|
|
5
6
|
type: Number,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.tabs.duration
|
|
7
8
|
},
|
|
8
9
|
// tabs标签数组
|
|
9
10
|
list: {
|
|
10
11
|
type: Array,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.tabs.list
|
|
12
13
|
},
|
|
13
14
|
// 滑块颜色
|
|
14
15
|
lineColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.tabs.lineColor
|
|
17
18
|
},
|
|
18
19
|
// 菜单选择中时的样式
|
|
19
20
|
activeStyle: {
|
|
20
21
|
type: [String, Object],
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.tabs.activeStyle
|
|
22
23
|
},
|
|
23
24
|
// 菜单非选中时的样式
|
|
24
25
|
inactiveStyle: {
|
|
25
26
|
type: [String, Object],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.tabs.inactiveStyle
|
|
27
28
|
},
|
|
28
29
|
// 滑块长度
|
|
29
30
|
lineWidth: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.tabs.lineWidth
|
|
32
33
|
},
|
|
33
34
|
// 滑块高度
|
|
34
35
|
lineHeight: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.tabs.lineHeight
|
|
37
38
|
},
|
|
38
39
|
// 滑块背景显示大小,当滑块背景设置为图片时使用
|
|
39
40
|
lineBgSize: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.tabs.lineBgSize
|
|
42
43
|
},
|
|
43
44
|
// 菜单item的样式
|
|
44
45
|
itemStyle: {
|
|
45
46
|
type: [String, Object],
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.tabs.itemStyle
|
|
47
48
|
},
|
|
48
49
|
// 菜单是否可滚动
|
|
49
50
|
scrollable: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.tabs.scrollable
|
|
52
53
|
},
|
|
53
54
|
// 当前选中标签的索引
|
|
54
55
|
current: {
|
|
55
56
|
type: [Number, String],
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.tabs.current
|
|
57
58
|
},
|
|
58
59
|
// 默认读取的键名
|
|
59
60
|
keyName: {
|
|
60
61
|
type: String,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.tabs.keyName
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 标签类型info、primary、success、warning、error
|
|
4
5
|
type: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.tag.type
|
|
7
8
|
},
|
|
8
9
|
// 不可用
|
|
9
10
|
disabled: {
|
|
10
11
|
type: [Boolean, String],
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.tag.disabled
|
|
12
13
|
},
|
|
13
14
|
// 标签的大小,large,medium,mini
|
|
14
15
|
size: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.tag.size
|
|
17
18
|
},
|
|
18
19
|
// tag的形状,circle(两边半圆形), square(方形,带圆角)
|
|
19
20
|
shape: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.tag.shape
|
|
22
23
|
},
|
|
23
24
|
// 标签文字
|
|
24
25
|
text: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.tag.text
|
|
27
28
|
},
|
|
28
29
|
// 背景颜色,默认为空字符串,即不处理
|
|
29
30
|
bgColor: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.tag.bgColor
|
|
32
33
|
},
|
|
33
34
|
// 标签字体颜色,默认为空字符串,即不处理
|
|
34
35
|
color: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.tag.color
|
|
37
38
|
},
|
|
38
39
|
// 标签的边框颜色
|
|
39
40
|
borderColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.tag.borderColor
|
|
42
43
|
},
|
|
43
44
|
// 关闭按钮图标的颜色
|
|
44
45
|
closeColor: {
|
|
45
46
|
type: String,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.tag.closeColor
|
|
47
48
|
},
|
|
48
49
|
// 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
|
|
49
50
|
name: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.tag.name
|
|
52
53
|
},
|
|
53
54
|
// // 模式选择,dark|light|plain
|
|
54
55
|
// mode: {
|
|
@@ -58,30 +59,31 @@ export default {
|
|
|
58
59
|
// 镂空时是否填充背景色
|
|
59
60
|
plainFill: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.tag.plainFill
|
|
62
63
|
},
|
|
63
64
|
// 是否镂空
|
|
64
65
|
plain: {
|
|
65
66
|
type: Boolean,
|
|
66
|
-
default: () =>
|
|
67
|
+
default: () => defProps.tag.plain
|
|
67
68
|
},
|
|
68
69
|
// 是否可关闭
|
|
69
70
|
closable: {
|
|
70
71
|
type: Boolean,
|
|
71
|
-
default: () =>
|
|
72
|
+
default: () => defProps.tag.closable
|
|
72
73
|
},
|
|
73
74
|
// 是否显示
|
|
74
75
|
show: {
|
|
75
76
|
type: Boolean,
|
|
76
|
-
default: () =>
|
|
77
|
+
default: () => defProps.tag.show
|
|
77
78
|
},
|
|
78
79
|
// 内置图标,或绝对路径的图片
|
|
79
80
|
icon: {
|
|
80
81
|
type: String,
|
|
81
|
-
default: () =>
|
|
82
|
-
},
|
|
83
|
-
|
|
82
|
+
default: () => defProps.tag.icon,
|
|
83
|
+
},
|
|
84
|
+
iconColor: {
|
|
85
|
+
type: String,defProps.
|
|
84
86
|
default: () => uni.$u.props.tag.iconColor
|
|
85
|
-
}
|
|
87
|
+
}
|
|
86
88
|
}
|
|
87
89
|
}
|
package/components/u-td/props.js
CHANGED
|
@@ -1,110 +1,111 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 主题颜色
|
|
4
5
|
type: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.text.type
|
|
7
8
|
},
|
|
8
9
|
// 是否显示
|
|
9
10
|
show: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.text.show
|
|
12
13
|
},
|
|
13
14
|
// 显示的值
|
|
14
15
|
text: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.text.text
|
|
17
18
|
},
|
|
18
19
|
// 前置图标
|
|
19
20
|
prefixIcon: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.text.prefixIcon
|
|
22
23
|
},
|
|
23
24
|
// 后置图标
|
|
24
25
|
suffixIcon: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.text.suffixIcon
|
|
27
28
|
},
|
|
28
29
|
// 文本处理的匹配模式
|
|
29
30
|
// text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
|
|
30
31
|
mode: {
|
|
31
32
|
type: String,
|
|
32
|
-
default: () =>
|
|
33
|
+
default: () => defProps.text.mode
|
|
33
34
|
},
|
|
34
35
|
// mode=link下,配置的链接
|
|
35
36
|
href: {
|
|
36
37
|
type: String,
|
|
37
|
-
default: () =>
|
|
38
|
+
default: () => defProps.text.href
|
|
38
39
|
},
|
|
39
40
|
// 格式化规则
|
|
40
41
|
format: {
|
|
41
42
|
type: [String, Function],
|
|
42
|
-
default: () =>
|
|
43
|
+
default: () => defProps.text.format
|
|
43
44
|
},
|
|
44
45
|
// mode=phone时,点击文本是否拨打电话
|
|
45
46
|
call: {
|
|
46
47
|
type: Boolean,
|
|
47
|
-
default: () =>
|
|
48
|
+
default: () => defProps.text.call
|
|
48
49
|
},
|
|
49
50
|
// 小程序的打开方式
|
|
50
51
|
openType: {
|
|
51
52
|
type: String,
|
|
52
|
-
default: () =>
|
|
53
|
+
default: () => defProps.text.openType
|
|
53
54
|
},
|
|
54
55
|
// 是否粗体,默认normal
|
|
55
56
|
bold: {
|
|
56
57
|
type: Boolean,
|
|
57
|
-
default: () =>
|
|
58
|
+
default: () => defProps.text.bold
|
|
58
59
|
},
|
|
59
60
|
// 是否块状
|
|
60
61
|
block: {
|
|
61
62
|
type: Boolean,
|
|
62
|
-
default: () =>
|
|
63
|
+
default: () => defProps.text.block
|
|
63
64
|
},
|
|
64
65
|
// 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
|
65
66
|
lines: {
|
|
66
67
|
type: [String, Number],
|
|
67
|
-
default: () =>
|
|
68
|
+
default: () => defProps.text.lines
|
|
68
69
|
},
|
|
69
70
|
// 文本颜色
|
|
70
71
|
color: {
|
|
71
72
|
type: String,
|
|
72
|
-
default: () =>
|
|
73
|
+
default: () => defProps.text.color
|
|
73
74
|
},
|
|
74
75
|
// 字体大小
|
|
75
76
|
size: {
|
|
76
77
|
type: [String, Number],
|
|
77
|
-
default: () =>
|
|
78
|
+
default: () => defProps.text.size
|
|
78
79
|
},
|
|
79
80
|
// 图标的样式
|
|
80
81
|
iconStyle: {
|
|
81
82
|
type: [Object, String],
|
|
82
|
-
default: () =>
|
|
83
|
+
default: () => defProps.text.iconStyle
|
|
83
84
|
},
|
|
84
85
|
// 文字装饰,下划线,中划线等,可选值 none|underline|line-through
|
|
85
86
|
decoration: {
|
|
86
87
|
tepe: String,
|
|
87
|
-
default: () =>
|
|
88
|
+
default: () => defProps.text.decoration
|
|
88
89
|
},
|
|
89
90
|
// 外边距,对象、字符串,数值形式均可
|
|
90
91
|
margin: {
|
|
91
92
|
type: [Object, String, Number],
|
|
92
|
-
default: () =>
|
|
93
|
+
default: () => defProps.text.margin
|
|
93
94
|
},
|
|
94
95
|
// 文本行高
|
|
95
96
|
lineHeight: {
|
|
96
97
|
type: [String, Number],
|
|
97
|
-
default: () =>
|
|
98
|
+
default: () => defProps.text.lineHeight
|
|
98
99
|
},
|
|
99
100
|
// 文本对齐方式,可选值left|center|right
|
|
100
101
|
align: {
|
|
101
102
|
type: String,
|
|
102
|
-
default: () =>
|
|
103
|
+
default: () => defProps.text.align
|
|
103
104
|
},
|
|
104
105
|
// 文字换行,可选值break-word|normal|anywhere
|
|
105
106
|
wordWrap: {
|
|
106
107
|
type: String,
|
|
107
|
-
default: () =>
|
|
108
|
+
default: () => defProps.text.wordWrap
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -1,119 +1,120 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 输入框的内容
|
|
4
5
|
value: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.textarea.value
|
|
7
8
|
},
|
|
8
9
|
// 输入框的内容
|
|
9
10
|
modelValue: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.textarea.value
|
|
12
13
|
},
|
|
13
14
|
// 输入框为空时占位符
|
|
14
15
|
placeholder: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.textarea.placeholder
|
|
17
18
|
},
|
|
18
19
|
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
|
19
20
|
placeholderClass: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.input.placeholderClass
|
|
22
23
|
},
|
|
23
24
|
// 指定placeholder的样式
|
|
24
25
|
placeholderStyle: {
|
|
25
26
|
type: [String, Object],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.input.placeholderStyle
|
|
27
28
|
},
|
|
28
29
|
// 输入框高度
|
|
29
30
|
height: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.textarea.height
|
|
32
33
|
},
|
|
33
34
|
// 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
|
|
34
35
|
confirmType: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.textarea.confirmType
|
|
37
38
|
},
|
|
38
39
|
// 是否禁用
|
|
39
40
|
disabled: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.textarea.disabled
|
|
42
43
|
},
|
|
43
44
|
// 是否显示统计字数
|
|
44
45
|
count: {
|
|
45
46
|
type: Boolean,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.textarea.count
|
|
47
48
|
},
|
|
48
49
|
// 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
|
|
49
50
|
focus: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.textarea.focus
|
|
52
53
|
},
|
|
53
54
|
// 是否自动增加高度
|
|
54
55
|
autoHeight: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.textarea.autoHeight
|
|
57
58
|
},
|
|
58
59
|
// 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
|
|
59
60
|
fixed: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.textarea.fixed
|
|
62
63
|
},
|
|
63
64
|
// 指定光标与键盘的距离
|
|
64
65
|
cursorSpacing: {
|
|
65
66
|
type: Number,
|
|
66
|
-
default: () =>
|
|
67
|
+
default: () => defProps.textarea.cursorSpacing
|
|
67
68
|
},
|
|
68
69
|
// 指定focus时的光标位置
|
|
69
70
|
cursor: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default: () =>
|
|
72
|
+
default: () => defProps.textarea.cursor
|
|
72
73
|
},
|
|
73
74
|
// 是否显示键盘上方带有”完成“按钮那一栏,
|
|
74
75
|
showConfirmBar: {
|
|
75
76
|
type: Boolean,
|
|
76
|
-
default: () =>
|
|
77
|
+
default: () => defProps.textarea.showConfirmBar
|
|
77
78
|
},
|
|
78
79
|
// 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
|
|
79
80
|
selectionStart: {
|
|
80
81
|
type: Number,
|
|
81
|
-
default: () =>
|
|
82
|
+
default: () => defProps.textarea.selectionStart
|
|
82
83
|
},
|
|
83
84
|
// 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
|
|
84
85
|
selectionEnd: {
|
|
85
86
|
type: Number,
|
|
86
|
-
default: () =>
|
|
87
|
+
default: () => defProps.textarea.selectionEnd
|
|
87
88
|
},
|
|
88
89
|
// 键盘弹起时,是否自动上推页面
|
|
89
90
|
adjustPosition: {
|
|
90
91
|
type: Boolean,
|
|
91
|
-
default: () =>
|
|
92
|
+
default: () => defProps.textarea.adjustPosition
|
|
92
93
|
},
|
|
93
94
|
// 是否去掉 iOS 下的默认内边距,只微信小程序有效
|
|
94
95
|
disableDefaultPadding: {
|
|
95
96
|
type: Boolean,
|
|
96
|
-
default: () =>
|
|
97
|
+
default: () => defProps.textarea.disableDefaultPadding
|
|
97
98
|
},
|
|
98
99
|
// focus时,点击页面的时候不收起键盘,只微信小程序有效
|
|
99
100
|
holdKeyboard: {
|
|
100
101
|
type: Boolean,
|
|
101
|
-
default: () =>
|
|
102
|
+
default: () => defProps.textarea.holdKeyboard
|
|
102
103
|
},
|
|
103
104
|
// 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
104
105
|
maxlength: {
|
|
105
106
|
type: [String, Number],
|
|
106
|
-
default: () =>
|
|
107
|
+
default: () => defProps.textarea.maxlength
|
|
107
108
|
},
|
|
108
109
|
// 边框类型,surround-四周边框,bottom-底部边框
|
|
109
110
|
border: {
|
|
110
111
|
type: String,
|
|
111
|
-
default: () =>
|
|
112
|
+
default: () => defProps.textarea.border
|
|
112
113
|
},
|
|
113
114
|
// 用于处理或者过滤输入框内容的方法
|
|
114
115
|
formatter: {
|
|
115
116
|
type: [Function, null],
|
|
116
|
-
default: () =>
|
|
117
|
+
default: () => defProps.textarea.formatter
|
|
117
118
|
},
|
|
118
119
|
// 是否忽略组件内对文本合成系统事件的处理
|
|
119
120
|
ignoreCompositionEvent: {
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否展示工具条
|
|
4
5
|
show: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.toolbar.show
|
|
7
8
|
},
|
|
8
9
|
// 取消按钮的文字
|
|
9
10
|
cancelText: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.toolbar.cancelText
|
|
12
13
|
},
|
|
13
14
|
// 确认按钮的文字
|
|
14
15
|
confirmText: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.toolbar.confirmText
|
|
17
18
|
},
|
|
18
19
|
// 取消按钮的颜色
|
|
19
20
|
cancelColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.toolbar.cancelColor
|
|
22
23
|
},
|
|
23
24
|
// 确认按钮的颜色
|
|
24
25
|
confirmColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.toolbar.confirmColor
|
|
27
28
|
},
|
|
28
29
|
// 标题文字
|
|
29
30
|
title: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.toolbar.title
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
}
|