uview-plus 3.0.17 → 3.1.0
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 +2 -0
- package/components/u--form/u--form.vue +4 -2
- package/components/u--image/u--image.vue +4 -2
- package/components/u--input/u--input.vue +5 -3
- package/components/u--text/u--text.vue +4 -2
- package/components/u--textarea/u--textarea.vue +4 -2
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-action-sheet/u-action-sheet.vue +3 -1
- package/components/u-album/props.js +12 -11
- package/components/u-album/u-album.vue +4 -2
- package/components/u-alert/props.js +9 -8
- package/components/u-alert/u-alert.vue +3 -1
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar/u-avatar.vue +3 -1
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-avatar-group/u-avatar-group.vue +3 -1
- package/components/u-back-top/props.js +11 -10
- package/components/u-back-top/u-back-top.vue +2 -0
- package/components/u-badge/props.js +15 -14
- package/components/u-badge/u-badge.vue +3 -1
- package/components/u-button/props.js +29 -28
- package/components/u-button/u-button.vue +4 -2
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +28 -27
- package/components/u-calendar/u-calendar.vue +3 -1
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +4 -2
- package/components/u-cell/props.js +18 -17
- package/components/u-cell/u-cell.vue +3 -1
- package/components/u-cell-group/props.js +3 -2
- package/components/u-cell-group/u-cell-group.vue +3 -1
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox/u-checkbox.vue +3 -1
- package/components/u-checkbox-group/props.js +16 -15
- package/components/u-checkbox-group/u-checkbox-group.vue +3 -1
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-circle-progress/u-circle-progress.vue +3 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code/u-code.vue +3 -1
- package/components/u-code-input/props.js +16 -15
- package/components/u-code-input/u-code-input.vue +3 -1
- package/components/u-col/props.js +6 -5
- package/components/u-col/u-col.vue +3 -1
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse/u-collapse.vue +3 -1
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-collapse-item/u-collapse-item.vue +15 -13
- package/components/u-column-notice/props.js +11 -10
- package/components/u-column-notice/u-column-notice.vue +3 -1
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-down/u-count-down.vue +5 -3
- package/components/u-count-to/props.js +12 -11
- package/components/u-count-to/u-count-to.vue +3 -1
- package/components/u-datetime-picker/props.js +24 -23
- package/components/u-datetime-picker/u-datetime-picker.vue +3 -1
- package/components/u-divider/props.js +9 -8
- package/components/u-divider/u-divider.vue +3 -1
- package/components/u-dropdown/props.js +5 -4
- package/components/u-dropdown/u-dropdown.vue +4 -2
- package/components/u-dropdown-item/props.js +2 -1
- package/components/u-dropdown-item/u-dropdown-item.vue +4 -2
- package/components/u-empty/props.js +12 -11
- package/components/u-empty/u-empty.vue +3 -2
- package/components/u-form/props.js +9 -8
- package/components/u-form/u-form.vue +13 -11
- package/components/u-form-item/props.js +9 -8
- package/components/u-form-item/u-form-item.vue +3 -1
- package/components/u-gap/props.js +5 -4
- package/components/u-gap/u-gap.vue +3 -1
- package/components/u-grid/props.js +4 -3
- package/components/u-grid/u-grid.vue +3 -1
- package/components/u-grid-item/props.js +3 -2
- package/components/u-grid-item/u-grid-item.vue +3 -1
- package/components/u-icon/props.js +18 -17
- package/components/u-icon/u-icon.vue +4 -2
- package/components/u-image/props.js +18 -17
- package/components/u-image/u-image.vue +3 -1
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-anchor/u-index-anchor.vue +3 -1
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-item/u-index-item.vue +3 -1
- package/components/u-index-list/props.js +6 -5
- package/components/u-index-list/u-index-list.vue +3 -1
- package/components/u-input/props.js +36 -35
- package/components/u-input/u-input.vue +3 -1
- package/components/u-keyboard/props.js +17 -16
- package/components/u-keyboard/u-keyboard.vue +3 -1
- package/components/u-line/props.js +7 -6
- package/components/u-line/u-line.vue +3 -1
- package/components/u-line-progress/props.js +6 -5
- package/components/u-line-progress/u-line-progress.vue +3 -1
- package/components/u-link/props.js +8 -7
- package/components/u-link/u-link.vue +3 -1
- package/components/u-list/props.js +15 -14
- package/components/u-list/u-list.vue +3 -1
- package/components/u-list-item/props.js +2 -1
- package/components/u-list-item/u-list-item.vue +3 -1
- package/components/u-loading-icon/props.js +13 -12
- package/components/u-loading-icon/u-loading-icon.vue +4 -2
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loading-page/u-loading-page.vue +3 -1
- package/components/u-loadmore/props.js +19 -18
- package/components/u-loadmore/u-loadmore.vue +3 -1
- package/components/u-modal/props.js +17 -16
- package/components/u-modal/u-modal.vue +4 -2
- package/components/u-navbar/props.js +34 -33
- package/components/u-navbar/u-navbar.vue +3 -1
- package/components/u-no-network/props.js +4 -3
- package/components/u-no-network/u-no-network.vue +3 -1
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notice-bar/u-notice-bar.vue +3 -1
- package/components/u-notify/props.js +10 -9
- package/components/u-notify/u-notify.vue +3 -1
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-box/u-number-box.vue +3 -1
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-number-keyboard/u-number-keyboard.vue +3 -1
- package/components/u-overlay/props.js +5 -4
- package/components/u-overlay/u-overlay.vue +3 -1
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +16 -15
- package/components/u-picker/u-picker.vue +3 -1
- package/components/u-picker-column/props.js +1 -0
- package/components/u-picker-column/u-picker-column.vue +3 -1
- package/components/u-popup/props.js +16 -15
- package/components/u-popup/u-popup.vue +4 -2
- package/components/u-radio/props.js +13 -12
- package/components/u-radio/u-radio.vue +3 -1
- package/components/u-radio-group/props.js +18 -17
- package/components/u-radio-group/u-radio-group.vue +3 -1
- package/components/u-rate/props.js +15 -14
- package/components/u-rate/u-rate.vue +3 -1
- package/components/u-read-more/props.js +9 -8
- package/components/u-read-more/u-read-more.vue +3 -1
- package/components/u-row/props.js +4 -3
- package/components/u-row/u-row.vue +3 -1
- package/components/u-row-notice/props.js +8 -7
- package/components/u-row-notice/u-row-notice.vue +3 -1
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-safe-bottom/u-safe-bottom.vue +4 -2
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-scroll-list/u-scroll-list.vue +3 -1
- package/components/u-search/props.js +25 -24
- package/components/u-search/u-search.vue +3 -1
- package/components/u-skeleton/props.js +12 -11
- package/components/u-skeleton/u-skeleton.vue +3 -1
- package/components/u-slider/props.js +11 -10
- package/components/u-slider/u-slider.vue +5 -3
- package/components/u-status-bar/props.js +2 -1
- package/components/u-status-bar/u-status-bar.vue +3 -1
- package/components/u-steps/props.js +9 -8
- package/components/u-steps/u-steps.vue +3 -1
- package/components/u-steps-item/props.js +5 -4
- package/components/u-steps-item/u-steps-item.vue +3 -1
- package/components/u-sticky/props.js +7 -6
- package/components/u-sticky/u-sticky.vue +4 -2
- package/components/u-subsection/props.js +10 -9
- package/components/u-subsection/u-subsection.vue +3 -1
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action/u-swipe-action.vue +3 -1
- package/components/u-swipe-action-item/props.js +7 -6
- package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -3
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper/u-swiper.vue +3 -1
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-swiper-indicator/u-swiper-indicator.vue +3 -1
- package/components/u-switch/props.js +12 -11
- package/components/u-switch/u-switch.vue +3 -1
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar/u-tabbar.vue +3 -1
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-tabbar-item/u-tabbar-item.vue +3 -1
- package/components/u-table/props.js +1 -0
- package/components/u-table/u-table.vue +3 -1
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs/u-tabs.vue +3 -1
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tabs-item/u-tabs-item.vue +3 -1
- package/components/u-tag/props.js +16 -15
- package/components/u-tag/u-tag.vue +5 -3
- package/components/u-td/props.js +1 -0
- package/components/u-td/u-td.vue +3 -1
- package/components/u-text/props.js +22 -21
- package/components/u-text/u-text.vue +4 -2
- package/components/u-textarea/props.js +24 -23
- package/components/u-textarea/u-textarea.vue +3 -1
- package/components/u-toast/u-toast.vue +3 -1
- package/components/u-toolbar/props.js +7 -6
- package/components/u-toolbar/u-toolbar.vue +3 -1
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tooltip/u-tooltip.vue +3 -1
- package/components/u-tr/props.js +1 -0
- package/components/u-tr/u-tr.vue +3 -1
- package/components/u-transition/props.js +5 -4
- package/components/u-transition/u-transition.vue +3 -1
- package/components/u-upload/props.js +23 -22
- package/components/u-upload/u-upload.vue +4 -2
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
import props from './props.js';
|
|
27
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
28
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
27
29
|
// #ifdef APP-NVUE
|
|
28
30
|
const dom = uni.requireNativePlugin('dom')
|
|
29
31
|
// #endif
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
*/
|
|
46
48
|
export default {
|
|
47
49
|
name: 'u-tabbar',
|
|
48
|
-
mixins: [
|
|
50
|
+
mixins: [mpMixin, mixin, props],
|
|
49
51
|
data() {
|
|
50
52
|
return {
|
|
51
53
|
placeholderHeight: 0
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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
|
}
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
|
|
45
45
|
<script>
|
|
46
46
|
import props from './props.js';
|
|
47
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
48
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
47
49
|
/**
|
|
48
50
|
* TabbarItem 底部导航栏子组件
|
|
49
51
|
* @description 此组件提供了自定义tabbar的能力。
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
*/
|
|
61
63
|
export default {
|
|
62
64
|
name: 'u-tabbar-item',
|
|
63
|
-
mixins: [
|
|
65
|
+
mixins: [mpMixin, mixin, props],
|
|
64
66
|
data() {
|
|
65
67
|
return {
|
|
66
68
|
isActive: false, // 是否处于激活状态
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import props from './props.js';
|
|
9
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
10
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
9
11
|
/**
|
|
10
12
|
* Table 表格
|
|
11
13
|
* @description 表格组件一般用于展示大量结构化数据的场景 本组件标签类似HTML的table表格,由table、tr、th、td四个组件组成
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
*/
|
|
15
17
|
export default {
|
|
16
18
|
name: 'u-table',
|
|
17
|
-
mixins: [
|
|
19
|
+
mixins: [mpMixin, mixin, props],
|
|
18
20
|
data() {
|
|
19
21
|
return {
|
|
20
22
|
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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
|
}
|
|
@@ -85,6 +85,8 @@
|
|
|
85
85
|
const dom = uni.requireNativePlugin('dom')
|
|
86
86
|
// #endif
|
|
87
87
|
import props from './props.js';
|
|
88
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
89
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
88
90
|
/**
|
|
89
91
|
* Tabs 标签
|
|
90
92
|
* @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
*/
|
|
99
101
|
export default {
|
|
100
102
|
name: 'u-tabs',
|
|
101
|
-
mixins: [
|
|
103
|
+
mixins: [mpMixin, mixin, props],
|
|
102
104
|
data() {
|
|
103
105
|
return {
|
|
104
106
|
firstTime: true,
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import props from './props.js';
|
|
9
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
10
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
9
11
|
/**
|
|
10
12
|
* TabsItem tabs标签组件的自组件
|
|
11
13
|
* @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export default {
|
|
18
20
|
name: 'u-tabs-item',
|
|
19
|
-
mixins: [
|
|
21
|
+
mixins: [mpMixin, mixin, props],
|
|
20
22
|
data() {
|
|
21
23
|
return {
|
|
22
24
|
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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,27 +59,27 @@ 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
|
+
default: defprops.tag.icon
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<u-transition
|
|
3
3
|
mode="fade"
|
|
4
|
-
:show="show"
|
|
4
|
+
:show="show"
|
|
5
5
|
style="display: inline-flex;"
|
|
6
6
|
>
|
|
7
7
|
<view class="u-tag-wrapper">
|
|
@@ -56,7 +56,9 @@
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<script>
|
|
59
|
-
import props from './props.js';
|
|
59
|
+
import props from './props.js';
|
|
60
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
61
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
60
62
|
/**
|
|
61
63
|
* Tag 标签
|
|
62
64
|
* @description tag组件一般用于标记和选择,我们提供了更加丰富的表现形式,能够较全面的涵盖您的使用场景
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
*/
|
|
83
85
|
export default {
|
|
84
86
|
name: 'u-tag',
|
|
85
|
-
mixins: [
|
|
87
|
+
mixins: [mpMixin, mixin, props],
|
|
86
88
|
data() {
|
|
87
89
|
return {
|
|
88
90
|
|
package/components/u-td/props.js
CHANGED
package/components/u-td/u-td.vue
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import props from './props.js';
|
|
9
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
10
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
9
11
|
/**
|
|
10
12
|
* Td 表格中的单元格
|
|
11
13
|
* @description
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export default {
|
|
18
20
|
name: 'u-td',
|
|
19
|
-
mixins: [
|
|
21
|
+
mixins: [mpMixin, mixin, props],
|
|
20
22
|
data() {
|
|
21
23
|
return {
|
|
22
24
|
|
|
@@ -1,110 +1,111 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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
|
}
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
import value from './value.js'
|
|
74
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
75
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
74
76
|
import button from '../../libs/mixin/button.js'
|
|
75
77
|
import openType from '../../libs/mixin/openType.js'
|
|
76
78
|
import props from './props.js'
|
|
@@ -105,10 +107,10 @@ import props from './props.js'
|
|
|
105
107
|
export default {
|
|
106
108
|
name: 'u--text',
|
|
107
109
|
// #ifdef MP
|
|
108
|
-
mixins: [
|
|
110
|
+
mixins: [mpMixin, mixin, value, button, openType, props],
|
|
109
111
|
// #endif
|
|
110
112
|
// #ifndef MP
|
|
111
|
-
mixins: [
|
|
113
|
+
mixins: [mpMixin, mixin, value, props],
|
|
112
114
|
// #endif
|
|
113
115
|
computed: {
|
|
114
116
|
valueStyle() {
|