zartui 2.0.67 → 2.0.69
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/es/cell/index.css +1 -1
- package/es/cell/index.less +0 -3
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.js +37 -26
- package/es/dropdown-item/index.less +17 -5
- package/es/dropdown-item/style/index.js +2 -0
- package/es/dropdown-item/style/less.js +2 -0
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.js +11 -4
- package/es/dropdown-menu/index.less +10 -8
- package/es/index.js +1 -1
- package/es/style/var.less +5 -5
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.less +0 -3
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.js +38 -26
- package/lib/dropdown-item/index.less +17 -5
- package/lib/dropdown-item/style/index.js +2 -0
- package/lib/dropdown-item/style/less.js +2 -0
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.js +11 -4
- package/lib/dropdown-menu/index.less +10 -8
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/style/var.less +5 -5
- package/lib/zart.js +1510 -2431
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
package/es/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-row::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cell__direction-row
|
|
1
|
+
.zt2-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-row::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt2-cell__direction-column .zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
package/es/cell/index.less
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:
|
|
1
|
+
.zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
|
|
@@ -9,6 +9,7 @@ import Cell from '../cell';
|
|
|
9
9
|
import Checkbox from '../checkbox';
|
|
10
10
|
import Icon from '../icon';
|
|
11
11
|
import Popup from '../popup';
|
|
12
|
+
import Button from '../button';
|
|
12
13
|
|
|
13
14
|
var _createNamespace = createNamespace('dropdown-item'),
|
|
14
15
|
createComponent = _createNamespace[0],
|
|
@@ -71,15 +72,13 @@ export default createComponent({
|
|
|
71
72
|
});
|
|
72
73
|
value = value.substr(0, value.length - 1);
|
|
73
74
|
return value;
|
|
74
|
-
} else {
|
|
75
|
-
return this.placeholder;
|
|
76
75
|
}
|
|
77
|
-
} else {
|
|
78
|
-
var match = this.options.filter(function (option) {
|
|
79
|
-
return option.value === _this.value;
|
|
80
|
-
});
|
|
81
|
-
return match.length ? match[0].text : '';
|
|
82
76
|
}
|
|
77
|
+
|
|
78
|
+
var match = this.options.filter(function (option) {
|
|
79
|
+
return option.value === _this.value;
|
|
80
|
+
});
|
|
81
|
+
return match.length ? match[0].text : '';
|
|
83
82
|
}
|
|
84
83
|
},
|
|
85
84
|
watch: {
|
|
@@ -152,9 +151,9 @@ export default createComponent({
|
|
|
152
151
|
isSelect: function isSelect(value) {
|
|
153
152
|
if (this.value.indexOf(value) >= 0) {
|
|
154
153
|
return true;
|
|
155
|
-
} else {
|
|
156
|
-
return false;
|
|
157
154
|
}
|
|
155
|
+
|
|
156
|
+
return false;
|
|
158
157
|
},
|
|
159
158
|
reset: function reset() {
|
|
160
159
|
this.showPopup = false;
|
|
@@ -240,26 +239,33 @@ export default createComponent({
|
|
|
240
239
|
"class": bem('icon'),
|
|
241
240
|
"attrs": {
|
|
242
241
|
"color": activeColor,
|
|
243
|
-
"name": "
|
|
242
|
+
"name": "checkBox-select",
|
|
243
|
+
"size": "20px"
|
|
244
244
|
}
|
|
245
245
|
})]);
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
var buttonStyle;
|
|
250
|
-
var optionStyle;
|
|
251
|
-
var popupStyle;
|
|
249
|
+
var buttonStyle = {};
|
|
250
|
+
var optionStyle = {};
|
|
251
|
+
var popupStyle = {};
|
|
252
252
|
|
|
253
|
-
if (this.
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
253
|
+
if (this.multiSelect) {
|
|
254
|
+
var optionsLength = this.options.length;
|
|
255
|
+
|
|
256
|
+
if (this.options.length < 4) {
|
|
257
|
+
var height = optionsLength * 44;
|
|
258
|
+
var popupHeight = optionsLength * 44 + 68;
|
|
259
|
+
buttonStyle.top = height + "px";
|
|
260
|
+
optionStyle.height = height + "px";
|
|
261
|
+
popupStyle.height = popupHeight + "px";
|
|
262
|
+
popupStyle.paddingLeft = "0px";
|
|
263
|
+
} else {
|
|
264
|
+
buttonStyle.top = '176px';
|
|
265
|
+
optionStyle.height = '174px';
|
|
266
|
+
popupStyle.paddingLeft = "0px";
|
|
267
|
+
popupStyle.height = "244px";
|
|
268
|
+
}
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
var style = {
|
|
@@ -268,8 +274,10 @@ export default createComponent({
|
|
|
268
274
|
|
|
269
275
|
if (direction === 'down') {
|
|
270
276
|
style.top = offset + "px";
|
|
277
|
+
popupStyle.borderRadius = "0 0 16px 16px";
|
|
271
278
|
} else {
|
|
272
279
|
style.bottom = offset + "px";
|
|
280
|
+
popupStyle.borderRadius = "16px 16px 0 0";
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
return h("div", [h("div", {
|
|
@@ -295,7 +303,7 @@ export default createComponent({
|
|
|
295
303
|
"closeOnClickOverlay": closeOnClickOverlay
|
|
296
304
|
},
|
|
297
305
|
"class": bem('content'),
|
|
298
|
-
"style":
|
|
306
|
+
"style": popupStyle,
|
|
299
307
|
"on": {
|
|
300
308
|
"open": this.onOpen,
|
|
301
309
|
"close": this.onClose,
|
|
@@ -331,12 +339,15 @@ export default createComponent({
|
|
|
331
339
|
name: "show",
|
|
332
340
|
value: this.multiSelect
|
|
333
341
|
}]
|
|
334
|
-
}, [h(
|
|
342
|
+
}, [h(Button, {
|
|
335
343
|
"class": bem('button-reset'),
|
|
336
344
|
"on": {
|
|
337
345
|
"click": this.reset
|
|
338
346
|
}
|
|
339
|
-
}, ["\u91CD\u7F6E"]), h(
|
|
347
|
+
}, ["\u91CD\u7F6E"]), h(Button, {
|
|
348
|
+
"attrs": {
|
|
349
|
+
"type": "primary"
|
|
350
|
+
},
|
|
340
351
|
"class": bem('button-confirm'),
|
|
341
352
|
"on": {
|
|
342
353
|
"click": this.confirm
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
font-size: @dropdown-menu-option-font-size;
|
|
23
23
|
padding-left: 0;
|
|
24
24
|
|
|
25
|
+
&:last-child::before {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.@{base-prefix}-cell__value {
|
|
30
|
+
height: 20px;
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
&--active {
|
|
26
34
|
color: @dropdown-menu-option-active-color;
|
|
27
35
|
|
|
@@ -57,7 +65,7 @@
|
|
|
57
65
|
position: absolute;
|
|
58
66
|
z-index: 1;
|
|
59
67
|
width: 100%;
|
|
60
|
-
height:
|
|
68
|
+
height: 68px;
|
|
61
69
|
display: flex;
|
|
62
70
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
63
71
|
|
|
@@ -65,19 +73,23 @@
|
|
|
65
73
|
width: 50%;
|
|
66
74
|
font-family: PingFangSC-Regular;
|
|
67
75
|
font-weight: 400;
|
|
68
|
-
font-size: 16px;
|
|
69
76
|
color: #ff9623;
|
|
77
|
+
border-color: #ff9623;
|
|
70
78
|
text-align: center;
|
|
71
|
-
|
|
79
|
+
margin-top: 12px;
|
|
80
|
+
margin-left: 16px;
|
|
81
|
+
margin-right: 4px;
|
|
82
|
+
background: #fff;
|
|
72
83
|
}
|
|
73
84
|
&-confirm {
|
|
74
85
|
width: 50%;
|
|
75
86
|
background-color: #0091fa;
|
|
76
87
|
font-weight: 600;
|
|
77
|
-
font-size: 16px;
|
|
78
88
|
color: #f5f5fa;
|
|
79
89
|
text-align: center;
|
|
80
|
-
|
|
90
|
+
margin-top: 12px;
|
|
91
|
+
margin-left: 4px;
|
|
92
|
+
margin-right: 16px;
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
95
|
}
|
|
@@ -4,6 +4,8 @@ import '../../info/index.css';
|
|
|
4
4
|
import '../../icon/index.css';
|
|
5
5
|
import '../../checkbox/index.css';
|
|
6
6
|
import '../../popup/index.css';
|
|
7
|
+
import '../../loading/index.css';
|
|
8
|
+
import '../../button/index.css';
|
|
7
9
|
import '../../cell/index.css';
|
|
8
10
|
import '../../field/index.css';
|
|
9
11
|
import '../index.css';
|
|
@@ -4,6 +4,8 @@ import '../../info/index.less';
|
|
|
4
4
|
import '../../icon/index.less';
|
|
5
5
|
import '../../checkbox/index.less';
|
|
6
6
|
import '../../popup/index.less';
|
|
7
|
+
import '../../loading/index.less';
|
|
8
|
+
import '../../button/index.less';
|
|
7
9
|
import '../../cell/index.less';
|
|
8
10
|
import '../../field/index.less';
|
|
9
11
|
import '../index.less';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-dropdown-menu{-webkit-user-select:none;user-select:none;font-family:PingFangSC-Regular}.zt2-dropdown-menu__bar{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;
|
|
1
|
+
.zt2-dropdown-menu{-webkit-user-select:none;user-select:none;font-family:PingFangSC-Regular}.zt2-dropdown-menu__bar{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;padding:0 12px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-dropdown-menu__bar--opened{z-index:11}.zt2-dropdown-menu__item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-width:0;cursor:pointer;height:36px;margin:12px 4px;background-color:#fff;border-radius:calc(36px / 2);padding:0 12px}.zt2-dropdown-menu__item:last-child{margin-right:0}.zt2-dropdown-menu__item:active{opacity:.7}.zt2-dropdown-menu__item--disabled:active{opacity:1}.zt2-dropdown-menu__item--disabled .zt2-dropdown-menu__title{color:#969799}.zt2-dropdown-menu__title{position:relative;box-sizing:border-box;width:100%;color:#2d4b73;font-size:14px;line-height:22px}.zt2-dropdown-menu__title .zt2-icon{position:absolute;top:50%;right:8px;margin-top:-6px;color:#dcdee0}.zt2-dropdown-menu__title--active{color:#0091fa}.zt2-dropdown-menu__title--active .zt2-icon{color:currentColor}.zt2-dropdown-menu__title--active .zt2-dropdown-menu__icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.zt2-dropdown-menu__title--down::after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.zt2-dropdown-menu__placeholder{color:rgba(45,75,115,.2)}
|
|
@@ -93,12 +93,16 @@ export default createComponent({
|
|
|
93
93
|
|
|
94
94
|
var h = arguments[0];
|
|
95
95
|
var Titles = this.children.map(function (item, index) {
|
|
96
|
+
if (item.slots('header')) {
|
|
97
|
+
return item.slots('header', item != null ? item : {});
|
|
98
|
+
}
|
|
99
|
+
|
|
96
100
|
return h("div", {
|
|
97
101
|
"attrs": {
|
|
98
102
|
"role": "button",
|
|
99
103
|
"tabindex": item.disabled ? -1 : 0
|
|
100
104
|
},
|
|
101
|
-
"class":
|
|
105
|
+
"class": bem('item', {
|
|
102
106
|
disabled: item.disabled
|
|
103
107
|
}),
|
|
104
108
|
"on": {
|
|
@@ -118,11 +122,14 @@ export default createComponent({
|
|
|
118
122
|
}
|
|
119
123
|
}, [h("div", {
|
|
120
124
|
"class": "zt2-ellipsis",
|
|
121
|
-
"style": 'padding-right:
|
|
122
|
-
}, [item.slots('title') || item.displayTitle
|
|
125
|
+
"style": 'padding-right: 20px'
|
|
126
|
+
}, [item.slots('title') || item.displayTitle ? item.displayTitle : h("div", {
|
|
127
|
+
"class": [bem('placeholder')]
|
|
128
|
+
}, [item.placeholder]), item.slots('icon') || h(Icon, {
|
|
123
129
|
"class": bem('icon'),
|
|
124
130
|
"attrs": {
|
|
125
|
-
"name": "
|
|
131
|
+
"name": "spinner-expand",
|
|
132
|
+
"size": "14px"
|
|
126
133
|
}
|
|
127
134
|
})])])]);
|
|
128
135
|
});
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
&__bar {
|
|
8
8
|
position: relative;
|
|
9
9
|
display: flex;
|
|
10
|
-
height: @dropdown-menu-height;
|
|
11
|
-
background-color: @dropdown-menu-background-color;
|
|
12
10
|
padding: @dropdown-menu-padding;
|
|
13
11
|
align-items: center;
|
|
14
12
|
|
|
@@ -25,7 +23,11 @@
|
|
|
25
23
|
min-width: 0; // hack for flex ellipsis
|
|
26
24
|
cursor: pointer;
|
|
27
25
|
height: @dropdown-menu-item-height;
|
|
28
|
-
margin
|
|
26
|
+
margin: @dropdown-menu-item-margin;
|
|
27
|
+
background-color: @dropdown-menu-background-color;
|
|
28
|
+
border-radius: calc(@dropdown-menu-item-height / 2);
|
|
29
|
+
padding: @dropdown-menu-item-padding;
|
|
30
|
+
|
|
29
31
|
&:last-child {
|
|
30
32
|
margin-right: 0;
|
|
31
33
|
}
|
|
@@ -48,7 +50,6 @@
|
|
|
48
50
|
position: relative;
|
|
49
51
|
box-sizing: border-box;
|
|
50
52
|
width: 100%;
|
|
51
|
-
padding: @dropdown-menu-title-padding;
|
|
52
53
|
color: @dropdown-menu-title-text-color;
|
|
53
54
|
font-size: @dropdown-menu-title-font-size;
|
|
54
55
|
line-height: @dropdown-menu-title-line-height;
|
|
@@ -60,9 +61,6 @@
|
|
|
60
61
|
margin-top: -6px;
|
|
61
62
|
color: @gray-4;
|
|
62
63
|
}
|
|
63
|
-
.@{base-prefix}-dropdown-menu__icon {
|
|
64
|
-
transform: rotate(90deg);
|
|
65
|
-
}
|
|
66
64
|
|
|
67
65
|
&--active {
|
|
68
66
|
color: @dropdown-menu-title-active-text-color;
|
|
@@ -71,7 +69,7 @@
|
|
|
71
69
|
color: currentColor;
|
|
72
70
|
}
|
|
73
71
|
.@{base-prefix}-dropdown-menu__icon {
|
|
74
|
-
transform: rotate(
|
|
72
|
+
transform: rotate(180deg);
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
|
|
@@ -82,4 +80,8 @@
|
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
}
|
|
83
|
+
|
|
84
|
+
&__placeholder {
|
|
85
|
+
color: rgba(45, 75, 115, 0.2);
|
|
86
|
+
}
|
|
85
87
|
}
|
package/es/index.js
CHANGED
|
@@ -74,7 +74,7 @@ import Tag from './tag';
|
|
|
74
74
|
import Timeline from './timeline';
|
|
75
75
|
import Toast from './toast';
|
|
76
76
|
import Uploader from './uploader';
|
|
77
|
-
var version = '2.0.
|
|
77
|
+
var version = '2.0.69';
|
|
78
78
|
|
|
79
79
|
function install(Vue) {
|
|
80
80
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
package/es/style/var.less
CHANGED
|
@@ -432,15 +432,15 @@
|
|
|
432
432
|
|
|
433
433
|
// DropdownMenu
|
|
434
434
|
@dropdown-menu-height: 44px;
|
|
435
|
-
@dropdown-menu-padding: 0
|
|
436
|
-
@dropdown-menu-item-height:
|
|
437
|
-
@dropdown-menu-item-margin
|
|
435
|
+
@dropdown-menu-padding: 0 @padding-sm;
|
|
436
|
+
@dropdown-menu-item-height: 36px;
|
|
437
|
+
@dropdown-menu-item-margin: 12px 4px;
|
|
438
|
+
@dropdown-menu-item-padding: 0 @padding-sm;
|
|
438
439
|
@dropdown-menu-background-color: @white;
|
|
439
440
|
@dropdown-menu-title-font-size: 14px;
|
|
440
|
-
@dropdown-menu-title-text-color: @
|
|
441
|
+
@dropdown-menu-title-text-color: @text-color-default;
|
|
441
442
|
@dropdown-menu-title-active-text-color: @blue;
|
|
442
443
|
@dropdown-menu-title-disabled-text-color: @gray-6;
|
|
443
|
-
@dropdown-menu-title-padding: 0 @padding-xs;
|
|
444
444
|
@dropdown-menu-title-line-height: @line-height-lg;
|
|
445
445
|
@dropdown-menu-option-active-color: @blue;
|
|
446
446
|
@dropdown-menu-option-font-size: @font-size-md;
|
package/lib/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-row::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cell__direction-row
|
|
1
|
+
.zt2-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-row::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt2-cell__direction-column .zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
package/lib/cell/index.less
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:
|
|
1
|
+
.zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
|
|
@@ -21,6 +21,8 @@ var _icon = _interopRequireDefault(require("../icon"));
|
|
|
21
21
|
|
|
22
22
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
23
23
|
|
|
24
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
25
|
+
|
|
24
26
|
// Utils
|
|
25
27
|
// Mixins
|
|
26
28
|
// Components
|
|
@@ -85,15 +87,13 @@ var _default2 = createComponent({
|
|
|
85
87
|
});
|
|
86
88
|
value = value.substr(0, value.length - 1);
|
|
87
89
|
return value;
|
|
88
|
-
} else {
|
|
89
|
-
return this.placeholder;
|
|
90
90
|
}
|
|
91
|
-
} else {
|
|
92
|
-
var match = this.options.filter(function (option) {
|
|
93
|
-
return option.value === _this.value;
|
|
94
|
-
});
|
|
95
|
-
return match.length ? match[0].text : '';
|
|
96
91
|
}
|
|
92
|
+
|
|
93
|
+
var match = this.options.filter(function (option) {
|
|
94
|
+
return option.value === _this.value;
|
|
95
|
+
});
|
|
96
|
+
return match.length ? match[0].text : '';
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
watch: {
|
|
@@ -166,9 +166,9 @@ var _default2 = createComponent({
|
|
|
166
166
|
isSelect: function isSelect(value) {
|
|
167
167
|
if (this.value.indexOf(value) >= 0) {
|
|
168
168
|
return true;
|
|
169
|
-
} else {
|
|
170
|
-
return false;
|
|
171
169
|
}
|
|
170
|
+
|
|
171
|
+
return false;
|
|
172
172
|
},
|
|
173
173
|
reset: function reset() {
|
|
174
174
|
this.showPopup = false;
|
|
@@ -254,26 +254,33 @@ var _default2 = createComponent({
|
|
|
254
254
|
"class": bem('icon'),
|
|
255
255
|
"attrs": {
|
|
256
256
|
"color": activeColor,
|
|
257
|
-
"name": "
|
|
257
|
+
"name": "checkBox-select",
|
|
258
|
+
"size": "20px"
|
|
258
259
|
}
|
|
259
260
|
})]);
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
var buttonStyle;
|
|
264
|
-
var optionStyle;
|
|
265
|
-
var popupStyle;
|
|
264
|
+
var buttonStyle = {};
|
|
265
|
+
var optionStyle = {};
|
|
266
|
+
var popupStyle = {};
|
|
266
267
|
|
|
267
|
-
if (this.
|
|
268
|
-
var
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
268
|
+
if (this.multiSelect) {
|
|
269
|
+
var optionsLength = this.options.length;
|
|
270
|
+
|
|
271
|
+
if (this.options.length < 4) {
|
|
272
|
+
var height = optionsLength * 44;
|
|
273
|
+
var popupHeight = optionsLength * 44 + 68;
|
|
274
|
+
buttonStyle.top = height + "px";
|
|
275
|
+
optionStyle.height = height + "px";
|
|
276
|
+
popupStyle.height = popupHeight + "px";
|
|
277
|
+
popupStyle.paddingLeft = "0px";
|
|
278
|
+
} else {
|
|
279
|
+
buttonStyle.top = '176px';
|
|
280
|
+
optionStyle.height = '174px';
|
|
281
|
+
popupStyle.paddingLeft = "0px";
|
|
282
|
+
popupStyle.height = "244px";
|
|
283
|
+
}
|
|
277
284
|
}
|
|
278
285
|
|
|
279
286
|
var style = {
|
|
@@ -282,8 +289,10 @@ var _default2 = createComponent({
|
|
|
282
289
|
|
|
283
290
|
if (direction === 'down') {
|
|
284
291
|
style.top = offset + "px";
|
|
292
|
+
popupStyle.borderRadius = "0 0 16px 16px";
|
|
285
293
|
} else {
|
|
286
294
|
style.bottom = offset + "px";
|
|
295
|
+
popupStyle.borderRadius = "16px 16px 0 0";
|
|
287
296
|
}
|
|
288
297
|
|
|
289
298
|
return h("div", [h("div", {
|
|
@@ -309,7 +318,7 @@ var _default2 = createComponent({
|
|
|
309
318
|
"closeOnClickOverlay": closeOnClickOverlay
|
|
310
319
|
},
|
|
311
320
|
"class": bem('content'),
|
|
312
|
-
"style":
|
|
321
|
+
"style": popupStyle,
|
|
313
322
|
"on": {
|
|
314
323
|
"open": this.onOpen,
|
|
315
324
|
"close": this.onClose,
|
|
@@ -345,12 +354,15 @@ var _default2 = createComponent({
|
|
|
345
354
|
name: "show",
|
|
346
355
|
value: this.multiSelect
|
|
347
356
|
}]
|
|
348
|
-
}, [h(
|
|
357
|
+
}, [h(_button.default, {
|
|
349
358
|
"class": bem('button-reset'),
|
|
350
359
|
"on": {
|
|
351
360
|
"click": this.reset
|
|
352
361
|
}
|
|
353
|
-
}, ["\u91CD\u7F6E"]), h(
|
|
362
|
+
}, ["\u91CD\u7F6E"]), h(_button.default, {
|
|
363
|
+
"attrs": {
|
|
364
|
+
"type": "primary"
|
|
365
|
+
},
|
|
354
366
|
"class": bem('button-confirm'),
|
|
355
367
|
"on": {
|
|
356
368
|
"click": this.confirm
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
font-size: @dropdown-menu-option-font-size;
|
|
23
23
|
padding-left: 0;
|
|
24
24
|
|
|
25
|
+
&:last-child::before {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.@{base-prefix}-cell__value {
|
|
30
|
+
height: 20px;
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
&--active {
|
|
26
34
|
color: @dropdown-menu-option-active-color;
|
|
27
35
|
|
|
@@ -57,7 +65,7 @@
|
|
|
57
65
|
position: absolute;
|
|
58
66
|
z-index: 1;
|
|
59
67
|
width: 100%;
|
|
60
|
-
height:
|
|
68
|
+
height: 68px;
|
|
61
69
|
display: flex;
|
|
62
70
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
63
71
|
|
|
@@ -65,19 +73,23 @@
|
|
|
65
73
|
width: 50%;
|
|
66
74
|
font-family: PingFangSC-Regular;
|
|
67
75
|
font-weight: 400;
|
|
68
|
-
font-size: 16px;
|
|
69
76
|
color: #ff9623;
|
|
77
|
+
border-color: #ff9623;
|
|
70
78
|
text-align: center;
|
|
71
|
-
|
|
79
|
+
margin-top: 12px;
|
|
80
|
+
margin-left: 16px;
|
|
81
|
+
margin-right: 4px;
|
|
82
|
+
background: #fff;
|
|
72
83
|
}
|
|
73
84
|
&-confirm {
|
|
74
85
|
width: 50%;
|
|
75
86
|
background-color: #0091fa;
|
|
76
87
|
font-weight: 600;
|
|
77
|
-
font-size: 16px;
|
|
78
88
|
color: #f5f5fa;
|
|
79
89
|
text-align: center;
|
|
80
|
-
|
|
90
|
+
margin-top: 12px;
|
|
91
|
+
margin-left: 4px;
|
|
92
|
+
margin-right: 16px;
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
95
|
}
|
|
@@ -4,6 +4,8 @@ require('../../info/index.css');
|
|
|
4
4
|
require('../../icon/index.css');
|
|
5
5
|
require('../../checkbox/index.css');
|
|
6
6
|
require('../../popup/index.css');
|
|
7
|
+
require('../../loading/index.css');
|
|
8
|
+
require('../../button/index.css');
|
|
7
9
|
require('../../cell/index.css');
|
|
8
10
|
require('../../field/index.css');
|
|
9
11
|
require('../index.css');
|
|
@@ -4,6 +4,8 @@ require('../../info/index.less');
|
|
|
4
4
|
require('../../icon/index.less');
|
|
5
5
|
require('../../checkbox/index.less');
|
|
6
6
|
require('../../popup/index.less');
|
|
7
|
+
require('../../loading/index.less');
|
|
8
|
+
require('../../button/index.less');
|
|
7
9
|
require('../../cell/index.less');
|
|
8
10
|
require('../../field/index.less');
|
|
9
11
|
require('../index.less');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-dropdown-menu{-webkit-user-select:none;user-select:none;font-family:PingFangSC-Regular}.zt2-dropdown-menu__bar{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;
|
|
1
|
+
.zt2-dropdown-menu{-webkit-user-select:none;user-select:none;font-family:PingFangSC-Regular}.zt2-dropdown-menu__bar{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;padding:0 12px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-dropdown-menu__bar--opened{z-index:11}.zt2-dropdown-menu__item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-width:0;cursor:pointer;height:36px;margin:12px 4px;background-color:#fff;border-radius:calc(36px / 2);padding:0 12px}.zt2-dropdown-menu__item:last-child{margin-right:0}.zt2-dropdown-menu__item:active{opacity:.7}.zt2-dropdown-menu__item--disabled:active{opacity:1}.zt2-dropdown-menu__item--disabled .zt2-dropdown-menu__title{color:#969799}.zt2-dropdown-menu__title{position:relative;box-sizing:border-box;width:100%;color:#2d4b73;font-size:14px;line-height:22px}.zt2-dropdown-menu__title .zt2-icon{position:absolute;top:50%;right:8px;margin-top:-6px;color:#dcdee0}.zt2-dropdown-menu__title--active{color:#0091fa}.zt2-dropdown-menu__title--active .zt2-icon{color:currentColor}.zt2-dropdown-menu__title--active .zt2-dropdown-menu__icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.zt2-dropdown-menu__title--down::after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.zt2-dropdown-menu__placeholder{color:rgba(45,75,115,.2)}
|
|
@@ -104,12 +104,16 @@ var _default = createComponent({
|
|
|
104
104
|
|
|
105
105
|
var h = arguments[0];
|
|
106
106
|
var Titles = this.children.map(function (item, index) {
|
|
107
|
+
if (item.slots('header')) {
|
|
108
|
+
return item.slots('header', item != null ? item : {});
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
return h("div", {
|
|
108
112
|
"attrs": {
|
|
109
113
|
"role": "button",
|
|
110
114
|
"tabindex": item.disabled ? -1 : 0
|
|
111
115
|
},
|
|
112
|
-
"class":
|
|
116
|
+
"class": bem('item', {
|
|
113
117
|
disabled: item.disabled
|
|
114
118
|
}),
|
|
115
119
|
"on": {
|
|
@@ -129,11 +133,14 @@ var _default = createComponent({
|
|
|
129
133
|
}
|
|
130
134
|
}, [h("div", {
|
|
131
135
|
"class": "zt2-ellipsis",
|
|
132
|
-
"style": 'padding-right:
|
|
133
|
-
}, [item.slots('title') || item.displayTitle
|
|
136
|
+
"style": 'padding-right: 20px'
|
|
137
|
+
}, [item.slots('title') || item.displayTitle ? item.displayTitle : h("div", {
|
|
138
|
+
"class": [bem('placeholder')]
|
|
139
|
+
}, [item.placeholder]), item.slots('icon') || h(_icon.default, {
|
|
134
140
|
"class": bem('icon'),
|
|
135
141
|
"attrs": {
|
|
136
|
-
"name": "
|
|
142
|
+
"name": "spinner-expand",
|
|
143
|
+
"size": "14px"
|
|
137
144
|
}
|
|
138
145
|
})])])]);
|
|
139
146
|
});
|