@kengic/uni 0.5.1 → 0.5.2-beta.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/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
- package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
- package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
- package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
- package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
- package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
- package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
- package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
- package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
- package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
- package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
- package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
- package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
- package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
- package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
- package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
- package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
- package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
- package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
- package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
- package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
- package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
- package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
- package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
- package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
- package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
- package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
- package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
- package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
- package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
- package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
- package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
- package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
- package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
- package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
- package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
- package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
- package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
- package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
- package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
- package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
- package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
- package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
- package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
- package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
- package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
- package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
- package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
- package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
- package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
- package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
- package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
- package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
- package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
- package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
- package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
- package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
- package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
- package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
- package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
- package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
- package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
- package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
- package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
- package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
- package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
- package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
- package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
- package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
- package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
- package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
- package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
- package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
- package/dist/uni/uni-ui/uni-scss/package.json +73 -73
- package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
- package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
- package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
- package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
- package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
- package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
- package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
- package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
- package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
- package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
- package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
- package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
- package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
- package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
- package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
- package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
- package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
- package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
- package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
- package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
- package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
- package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
- package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
- package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
- package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +392 -313
- package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
- package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
- package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
- package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
- package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
- package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
- package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
- package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
- package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
- package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
- package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
- package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
- package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
- package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
- package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
- package/package.json +1 -1
|
@@ -6,248 +6,251 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
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
|
-
export default {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
inverted: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
isDot: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
maxNum: {
|
|
51
|
-
type: Number,
|
|
52
|
-
default: 99,
|
|
53
|
-
},
|
|
54
|
-
absolute: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: '',
|
|
57
|
-
},
|
|
58
|
-
offset: {
|
|
59
|
-
type: Array,
|
|
60
|
-
default() {
|
|
61
|
-
return [0, 0];
|
|
9
|
+
/**
|
|
10
|
+
* Badge 数字角标
|
|
11
|
+
* @description 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景
|
|
12
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=21
|
|
13
|
+
* @property {String} text 角标内容
|
|
14
|
+
* @property {String} size = [normal|small] 角标内容
|
|
15
|
+
* @property {String} type = [info|primary|success|warning|error] 颜色类型
|
|
16
|
+
* @value info 灰色
|
|
17
|
+
* @value primary 蓝色
|
|
18
|
+
* @value success 绿色
|
|
19
|
+
* @value warning 黄色
|
|
20
|
+
* @value error 红色
|
|
21
|
+
* @property {String} inverted = [true|false] 是否无需背景颜色
|
|
22
|
+
* @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
|
|
23
|
+
* @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
|
|
24
|
+
* @value rightTop 右上
|
|
25
|
+
* @value rightBottom 右下
|
|
26
|
+
* @value leftTop 左上
|
|
27
|
+
* @value leftBottom 左下
|
|
28
|
+
* @property {Array[number]} offset 距定位角中心点的偏移量,只有存在 absolute 属性时有效,例如:[-10, -10] 表示向外偏移 10px,[10, 10] 表示向 absolute 指定的内偏移 10px
|
|
29
|
+
* @property {String} isDot = [true|false] 是否显示为一个小点
|
|
30
|
+
* @event {Function} click 点击 Badge 触发事件
|
|
31
|
+
* @example <uni-badge text="1"></uni-badge>
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'UniBadge',
|
|
36
|
+
emits: ['click'],
|
|
37
|
+
props: {
|
|
38
|
+
type: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'error',
|
|
62
41
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
default: '',
|
|
67
|
-
},
|
|
68
|
-
size: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: 'small',
|
|
71
|
-
},
|
|
72
|
-
customStyle: {
|
|
73
|
-
type: Object,
|
|
74
|
-
default() {
|
|
75
|
-
return {};
|
|
42
|
+
inverted: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
76
45
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (!this.absolute) return {};
|
|
94
|
-
let w = this.width / 2,
|
|
95
|
-
h = 10;
|
|
96
|
-
if (this.isDot) {
|
|
97
|
-
w = 5;
|
|
98
|
-
h = 5;
|
|
99
|
-
}
|
|
100
|
-
const x = `${-w + this.offset[0]}px`;
|
|
101
|
-
const y = `${-h + this.offset[1]}px`;
|
|
102
|
-
|
|
103
|
-
const whiteList = {
|
|
104
|
-
rightTop: {
|
|
105
|
-
right: x,
|
|
106
|
-
top: y,
|
|
107
|
-
},
|
|
108
|
-
rightBottom: {
|
|
109
|
-
right: x,
|
|
110
|
-
bottom: y,
|
|
111
|
-
},
|
|
112
|
-
leftBottom: {
|
|
113
|
-
left: x,
|
|
114
|
-
bottom: y,
|
|
46
|
+
isDot: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
maxNum: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 99,
|
|
53
|
+
},
|
|
54
|
+
absolute: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
offset: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default() {
|
|
61
|
+
return [0, 0];
|
|
115
62
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
63
|
+
},
|
|
64
|
+
text: {
|
|
65
|
+
type: [String, Number],
|
|
66
|
+
default: '',
|
|
67
|
+
},
|
|
68
|
+
size: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'small',
|
|
71
|
+
},
|
|
72
|
+
customStyle: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default() {
|
|
75
|
+
return {};
|
|
119
76
|
},
|
|
120
|
-
}
|
|
121
|
-
const match = whiteList[this.absolute];
|
|
122
|
-
return match ? match : whiteList['rightTop'];
|
|
77
|
+
},
|
|
123
78
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
width: '10px',
|
|
128
|
-
minWidth: '0',
|
|
129
|
-
height: '10px',
|
|
130
|
-
padding: '0',
|
|
131
|
-
borderRadius: '10px',
|
|
132
|
-
};
|
|
79
|
+
data() {
|
|
80
|
+
return {};
|
|
133
81
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
82
|
+
computed: {
|
|
83
|
+
width() {
|
|
84
|
+
return String(this.text).length * 8 + 12;
|
|
85
|
+
},
|
|
86
|
+
classNames() {
|
|
87
|
+
const { inverted, type, size, absolute } = this;
|
|
88
|
+
return [
|
|
89
|
+
inverted ? 'uni-badge--' + type + '-inverted' : '',
|
|
90
|
+
'uni-badge--' + type,
|
|
91
|
+
'uni-badge--' + size,
|
|
92
|
+
absolute ? 'uni-badge--absolute' : '',
|
|
93
|
+
].join(' ');
|
|
94
|
+
},
|
|
95
|
+
positionStyle() {
|
|
96
|
+
if (!this.absolute) return {};
|
|
97
|
+
let w = this.width / 2,
|
|
98
|
+
h = 10;
|
|
99
|
+
if (this.isDot) {
|
|
100
|
+
w = 5;
|
|
101
|
+
h = 5;
|
|
102
|
+
}
|
|
103
|
+
const x = `${-w + this.offset[0]}px`;
|
|
104
|
+
const y = `${-h + this.offset[1]}px`;
|
|
105
|
+
|
|
106
|
+
const whiteList = {
|
|
107
|
+
rightTop: {
|
|
108
|
+
right: x,
|
|
109
|
+
top: y,
|
|
110
|
+
},
|
|
111
|
+
rightBottom: {
|
|
112
|
+
right: x,
|
|
113
|
+
bottom: y,
|
|
114
|
+
},
|
|
115
|
+
leftBottom: {
|
|
116
|
+
left: x,
|
|
117
|
+
bottom: y,
|
|
118
|
+
},
|
|
119
|
+
leftTop: {
|
|
120
|
+
left: x,
|
|
121
|
+
top: y,
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
const match = whiteList[this.absolute];
|
|
125
|
+
return match ? match : whiteList['rightTop'];
|
|
126
|
+
},
|
|
127
|
+
dotStyle() {
|
|
128
|
+
if (!this.isDot) return {};
|
|
129
|
+
return {
|
|
130
|
+
width: '10px',
|
|
131
|
+
minWidth: '0',
|
|
132
|
+
height: '10px',
|
|
133
|
+
padding: '0',
|
|
134
|
+
borderRadius: '10px',
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
displayValue() {
|
|
138
|
+
const { isDot, text, maxNum } = this;
|
|
139
|
+
return isDot ? '' : Number(text) > maxNum ? `${maxNum}+` : text;
|
|
140
|
+
},
|
|
137
141
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
methods: {
|
|
143
|
+
onClick() {
|
|
144
|
+
this.$emit('click');
|
|
145
|
+
},
|
|
142
146
|
},
|
|
143
|
-
}
|
|
144
|
-
};
|
|
147
|
+
};
|
|
145
148
|
</script>
|
|
146
149
|
|
|
147
150
|
<style lang="scss">
|
|
148
|
-
$uni-primary: #2979ff !default;
|
|
149
|
-
$uni-success: #4cd964 !default;
|
|
150
|
-
$uni-warning: #f0ad4e !default;
|
|
151
|
-
$uni-error: #dd524d !default;
|
|
152
|
-
$uni-info: #909399 !default;
|
|
153
|
-
|
|
154
|
-
$bage-size: 12px;
|
|
155
|
-
$bage-small: scale(0.8);
|
|
156
|
-
|
|
157
|
-
.uni-badge--x {
|
|
158
|
-
/* #ifdef APP-NVUE */
|
|
159
|
-
// align-self: flex-start;
|
|
160
|
-
/* #endif */
|
|
161
|
-
/* #ifndef APP-NVUE */
|
|
162
|
-
display: inline-block;
|
|
163
|
-
/* #endif */
|
|
164
|
-
position: relative;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.uni-badge--absolute {
|
|
168
|
-
position: absolute;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.uni-badge--small {
|
|
172
|
-
transform: $bage-small;
|
|
173
|
-
transform-origin: center center;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.uni-badge {
|
|
177
|
-
/* #ifndef APP-NVUE */
|
|
178
|
-
display: flex;
|
|
179
|
-
overflow: hidden;
|
|
180
|
-
box-sizing: border-box;
|
|
181
|
-
font-feature-settings: 'tnum';
|
|
182
|
-
min-width: 20px;
|
|
183
|
-
/* #endif */
|
|
184
|
-
justify-content: center;
|
|
185
|
-
flex-direction: row;
|
|
186
|
-
height: 20px;
|
|
187
|
-
padding: 0 4px;
|
|
188
|
-
line-height: 18px;
|
|
189
|
-
color: #fff;
|
|
190
|
-
border-radius: 100px;
|
|
191
|
-
background-color: $uni-info;
|
|
192
|
-
background-color: transparent;
|
|
193
|
-
border: 1px solid #fff;
|
|
194
|
-
text-align: center;
|
|
195
|
-
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
|
196
|
-
font-size: $bage-size;
|
|
197
|
-
/* #ifdef H5 */
|
|
198
|
-
z-index: 999;
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
/* #endif */
|
|
201
|
-
|
|
202
|
-
&--info {
|
|
203
|
-
color: #fff;
|
|
204
|
-
background-color: $uni-info;
|
|
205
|
-
}
|
|
151
|
+
$uni-primary: #2979ff !default;
|
|
152
|
+
$uni-success: #4cd964 !default;
|
|
153
|
+
$uni-warning: #f0ad4e !default;
|
|
154
|
+
$uni-error: #dd524d !default;
|
|
155
|
+
$uni-info: #909399 !default;
|
|
206
156
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
157
|
+
$bage-size: 12px;
|
|
158
|
+
$bage-small: scale(0.8);
|
|
210
159
|
|
|
211
|
-
|
|
212
|
-
|
|
160
|
+
.uni-badge--x {
|
|
161
|
+
/* #ifdef APP-NVUE */
|
|
162
|
+
// align-self: flex-start;
|
|
163
|
+
/* #endif */
|
|
164
|
+
/* #ifndef APP-NVUE */
|
|
165
|
+
display: inline-block;
|
|
166
|
+
/* #endif */
|
|
167
|
+
position: relative;
|
|
213
168
|
}
|
|
214
169
|
|
|
215
|
-
|
|
216
|
-
|
|
170
|
+
.uni-badge--absolute {
|
|
171
|
+
position: absolute;
|
|
217
172
|
}
|
|
218
173
|
|
|
219
|
-
|
|
220
|
-
|
|
174
|
+
.uni-badge--small {
|
|
175
|
+
transform: $bage-small;
|
|
176
|
+
transform-origin: center center;
|
|
221
177
|
}
|
|
222
178
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
179
|
+
.uni-badge {
|
|
180
|
+
/* #ifndef APP-NVUE */
|
|
181
|
+
display: flex;
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
box-sizing: border-box;
|
|
184
|
+
font-feature-settings: 'tnum';
|
|
185
|
+
min-width: 20px;
|
|
186
|
+
/* #endif */
|
|
187
|
+
justify-content: center;
|
|
188
|
+
flex-direction: row;
|
|
189
|
+
height: 20px;
|
|
190
|
+
padding: 0 4px;
|
|
191
|
+
line-height: 18px;
|
|
192
|
+
color: #fff;
|
|
193
|
+
border-radius: 100px;
|
|
194
|
+
background-color: $uni-info;
|
|
230
195
|
background-color: transparent;
|
|
231
|
-
|
|
196
|
+
border: 1px solid #fff;
|
|
197
|
+
text-align: center;
|
|
198
|
+
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
|
199
|
+
font-size: $bage-size;
|
|
200
|
+
/* #ifdef H5 */
|
|
201
|
+
z-index: 999;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
/* #endif */
|
|
232
204
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
205
|
+
&--info {
|
|
206
|
+
color: #fff;
|
|
207
|
+
background-color: $uni-info;
|
|
208
|
+
}
|
|
237
209
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
210
|
+
&--primary {
|
|
211
|
+
background-color: $uni-primary;
|
|
212
|
+
}
|
|
242
213
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
214
|
+
&--success {
|
|
215
|
+
background-color: $uni-success;
|
|
216
|
+
}
|
|
247
217
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
218
|
+
&--warning {
|
|
219
|
+
background-color: $uni-warning;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&--error {
|
|
223
|
+
background-color: $uni-error;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&--inverted {
|
|
227
|
+
padding: 0 5px 0 0;
|
|
228
|
+
color: $uni-info;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&--info-inverted {
|
|
232
|
+
color: $uni-info;
|
|
233
|
+
background-color: transparent;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&--primary-inverted {
|
|
237
|
+
color: $uni-primary;
|
|
238
|
+
background-color: transparent;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&--success-inverted {
|
|
242
|
+
color: $uni-success;
|
|
243
|
+
background-color: transparent;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&--warning-inverted {
|
|
247
|
+
color: $uni-warning;
|
|
248
|
+
background-color: transparent;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&--error-inverted {
|
|
252
|
+
color: $uni-error;
|
|
253
|
+
background-color: transparent;
|
|
254
|
+
}
|
|
251
255
|
}
|
|
252
|
-
}
|
|
253
256
|
</style>
|
|
@@ -4,38 +4,38 @@
|
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
separator: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: '/',
|
|
7
|
+
/**
|
|
8
|
+
* Breadcrumb 面包屑导航父组件
|
|
9
|
+
* @description 显示当前页面的路径,快速返回之前的任意页面
|
|
10
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
|
|
11
|
+
* @property {String} separator 分隔符,默认为斜杠'/'
|
|
12
|
+
* @property {String} separatorClass 图标分隔符 class
|
|
13
|
+
*/
|
|
14
|
+
export default {
|
|
15
|
+
name: 'UniBreadcrumb',
|
|
16
|
+
options: {
|
|
17
|
+
virtualHost: true,
|
|
23
18
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
props: {
|
|
20
|
+
separator: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: '/',
|
|
23
|
+
},
|
|
24
|
+
separatorClass: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
27
28
|
},
|
|
28
|
-
},
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
30
|
+
provide() {
|
|
31
|
+
return {
|
|
32
|
+
uniBreadcrumb: this,
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
36
|
</script>
|
|
37
37
|
<style lang="scss">
|
|
38
|
-
.uni-breadcrumb {
|
|
39
|
-
|
|
40
|
-
}
|
|
38
|
+
.uni-breadcrumb {
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
41
41
|
</style>
|