zartui 2.0.68 → 2.0.71
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/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.js +14 -24
- package/es/dropdown-item/index.less +5 -1
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.js +3 -1
- package/es/dropdown-menu/index.less +4 -0
- package/es/index.js +1 -1
- package/es/media-player/index.js +4 -3
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.js +14 -24
- package/lib/dropdown-item/index.less +5 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.js +3 -1
- package/lib/dropdown-menu/index.less +4 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/media-player/index.js +3 -3
- package/lib/zart.js +21 -28
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
|
@@ -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: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}
|
|
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;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;height:calc(100% - 68px);width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;bottom:0;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}
|
|
@@ -51,7 +51,8 @@ export default createComponent({
|
|
|
51
51
|
return {
|
|
52
52
|
transition: true,
|
|
53
53
|
showPopup: false,
|
|
54
|
-
showWrapper: false
|
|
54
|
+
showWrapper: false,
|
|
55
|
+
innerValue: []
|
|
55
56
|
};
|
|
56
57
|
},
|
|
57
58
|
computed: {
|
|
@@ -73,8 +74,6 @@ export default createComponent({
|
|
|
73
74
|
value = value.substr(0, value.length - 1);
|
|
74
75
|
return value;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
return this.placeholder;
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
var match = this.options.filter(function (option) {
|
|
@@ -125,6 +124,7 @@ export default createComponent({
|
|
|
125
124
|
this.showPopup = show;
|
|
126
125
|
|
|
127
126
|
if (show) {
|
|
127
|
+
this.innerValue = [].concat(this.value);
|
|
128
128
|
this.parent.updateOffset();
|
|
129
129
|
this.showWrapper = true;
|
|
130
130
|
}
|
|
@@ -144,28 +144,27 @@ export default createComponent({
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
select: function select(value) {
|
|
147
|
-
if (this.
|
|
148
|
-
this.
|
|
147
|
+
if (this.innerValue.indexOf(value) >= 0) {
|
|
148
|
+
this.innerValue.splice(this.innerValue.indexOf(value), 1);
|
|
149
149
|
} else {
|
|
150
|
-
this.
|
|
150
|
+
this.innerValue.push(value);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
isSelect: function isSelect(value) {
|
|
154
|
-
if (this.
|
|
154
|
+
if (this.innerValue.indexOf(value) >= 0) {
|
|
155
155
|
return true;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
return false;
|
|
159
159
|
},
|
|
160
160
|
reset: function reset() {
|
|
161
|
-
this.
|
|
162
|
-
this.$emit('input', []);
|
|
163
|
-
this.$emit('reset', []);
|
|
161
|
+
this.innerValue = [];
|
|
164
162
|
},
|
|
165
163
|
confirm: function confirm() {
|
|
166
164
|
this.showPopup = false;
|
|
167
|
-
this.$emit('input', this.
|
|
168
|
-
this.$emit('change', this.
|
|
165
|
+
this.$emit('input', this.innerValue);
|
|
166
|
+
this.$emit('change', this.innerValue);
|
|
167
|
+
this.$emit('confirm', this.innerValue);
|
|
169
168
|
}
|
|
170
169
|
},
|
|
171
170
|
render: function render() {
|
|
@@ -184,7 +183,7 @@ export default createComponent({
|
|
|
184
183
|
|
|
185
184
|
if (this.multiSelect) {
|
|
186
185
|
Options = this.options.map(function (option, index) {
|
|
187
|
-
var active = _this3.
|
|
186
|
+
var active = _this3.innerValue.indexOf(option.value) >= 0;
|
|
188
187
|
return h(Cell, {
|
|
189
188
|
"attrs": {
|
|
190
189
|
"clickable": true,
|
|
@@ -248,25 +247,18 @@ export default createComponent({
|
|
|
248
247
|
});
|
|
249
248
|
}
|
|
250
249
|
|
|
251
|
-
var buttonStyle = {};
|
|
252
|
-
var optionStyle = {};
|
|
253
250
|
var popupStyle = {};
|
|
254
251
|
|
|
255
252
|
if (this.multiSelect) {
|
|
256
253
|
var optionsLength = this.options.length;
|
|
257
254
|
|
|
258
|
-
if (this.options.length <
|
|
259
|
-
var height = optionsLength * 44;
|
|
255
|
+
if (this.options.length < 7) {
|
|
260
256
|
var popupHeight = optionsLength * 44 + 68;
|
|
261
|
-
buttonStyle.top = height + "px";
|
|
262
|
-
optionStyle.height = height + "px";
|
|
263
257
|
popupStyle.height = popupHeight + "px";
|
|
264
258
|
popupStyle.paddingLeft = "0px";
|
|
265
259
|
} else {
|
|
266
|
-
buttonStyle.top = '176px';
|
|
267
|
-
optionStyle.height = '174px';
|
|
268
260
|
popupStyle.paddingLeft = "0px";
|
|
269
|
-
popupStyle.height = "
|
|
261
|
+
popupStyle.height = "378px";
|
|
270
262
|
}
|
|
271
263
|
}
|
|
272
264
|
|
|
@@ -329,14 +321,12 @@ export default createComponent({
|
|
|
329
321
|
}]
|
|
330
322
|
}, [Options]), h("div", {
|
|
331
323
|
"class": bem('options'),
|
|
332
|
-
"style": optionStyle,
|
|
333
324
|
"directives": [{
|
|
334
325
|
name: "show",
|
|
335
326
|
value: this.multiSelect
|
|
336
327
|
}]
|
|
337
328
|
}, [Options]), h("div", {
|
|
338
329
|
"class": bem('button'),
|
|
339
|
-
"style": buttonStyle,
|
|
340
330
|
"directives": [{
|
|
341
331
|
name: "show",
|
|
342
332
|
value: this.multiSelect
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
&__content,
|
|
51
51
|
&__content.@{base-prefix}-popup {
|
|
52
52
|
position: absolute;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
53
55
|
max-height: @dropdown-menu-content-max-height;
|
|
54
56
|
padding-left: @padding-md;
|
|
55
57
|
box-sizing: border-box;
|
|
@@ -57,12 +59,14 @@
|
|
|
57
59
|
|
|
58
60
|
&__options {
|
|
59
61
|
position: absolute;
|
|
60
|
-
top:
|
|
62
|
+
top: 0;
|
|
63
|
+
height: calc(100% - 68px);
|
|
61
64
|
width: 100%;
|
|
62
65
|
overflow-y: scroll;
|
|
63
66
|
}
|
|
64
67
|
&__button {
|
|
65
68
|
position: absolute;
|
|
69
|
+
bottom: 0;
|
|
66
70
|
z-index: 1;
|
|
67
71
|
width: 100%;
|
|
68
72
|
height: 68px;
|
|
@@ -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;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)}
|
|
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)}
|
|
@@ -123,7 +123,9 @@ export default createComponent({
|
|
|
123
123
|
}, [h("div", {
|
|
124
124
|
"class": "zt2-ellipsis",
|
|
125
125
|
"style": 'padding-right: 20px'
|
|
126
|
-
}, [item.slots('title') || item.displayTitle
|
|
126
|
+
}, [item.slots('title') || item.displayTitle ? item.displayTitle : h("div", {
|
|
127
|
+
"class": [bem('placeholder')]
|
|
128
|
+
}, [item.placeholder]), item.slots('icon') || h(Icon, {
|
|
127
129
|
"class": bem('icon'),
|
|
128
130
|
"attrs": {
|
|
129
131
|
"name": "spinner-expand",
|
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.71';
|
|
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/media-player/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createNamespace } from '../utils';
|
|
2
|
-
import { MediaType } from "../media-picker/type";
|
|
3
|
-
|
|
2
|
+
import { MediaType } from "../media-picker/type"; // import Toast from '../toast';
|
|
3
|
+
|
|
4
4
|
import Popup from '../popup';
|
|
5
5
|
import Button from '../button';
|
|
6
6
|
import { isIOS, isWeixin } from "../utils/device";
|
|
@@ -132,7 +132,8 @@ export default createComponent({
|
|
|
132
132
|
"overlay": true,
|
|
133
133
|
"safe-area-inset-bottom": true,
|
|
134
134
|
"close-on-popstate": true,
|
|
135
|
-
"customOnClickOverlay": this.onClose
|
|
135
|
+
"customOnClickOverlay": this.onClose,
|
|
136
|
+
"getContainer": this.getContainer
|
|
136
137
|
},
|
|
137
138
|
"on": {
|
|
138
139
|
"open": this.onOpen
|
|
@@ -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: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}
|
|
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;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;height:calc(100% - 68px);width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;bottom:0;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}
|
|
@@ -66,7 +66,8 @@ var _default2 = createComponent({
|
|
|
66
66
|
return {
|
|
67
67
|
transition: true,
|
|
68
68
|
showPopup: false,
|
|
69
|
-
showWrapper: false
|
|
69
|
+
showWrapper: false,
|
|
70
|
+
innerValue: []
|
|
70
71
|
};
|
|
71
72
|
},
|
|
72
73
|
computed: {
|
|
@@ -88,8 +89,6 @@ var _default2 = createComponent({
|
|
|
88
89
|
value = value.substr(0, value.length - 1);
|
|
89
90
|
return value;
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
-
return this.placeholder;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
var match = this.options.filter(function (option) {
|
|
@@ -140,6 +139,7 @@ var _default2 = createComponent({
|
|
|
140
139
|
this.showPopup = show;
|
|
141
140
|
|
|
142
141
|
if (show) {
|
|
142
|
+
this.innerValue = [].concat(this.value);
|
|
143
143
|
this.parent.updateOffset();
|
|
144
144
|
this.showWrapper = true;
|
|
145
145
|
}
|
|
@@ -159,28 +159,27 @@ var _default2 = createComponent({
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
select: function select(value) {
|
|
162
|
-
if (this.
|
|
163
|
-
this.
|
|
162
|
+
if (this.innerValue.indexOf(value) >= 0) {
|
|
163
|
+
this.innerValue.splice(this.innerValue.indexOf(value), 1);
|
|
164
164
|
} else {
|
|
165
|
-
this.
|
|
165
|
+
this.innerValue.push(value);
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
isSelect: function isSelect(value) {
|
|
169
|
-
if (this.
|
|
169
|
+
if (this.innerValue.indexOf(value) >= 0) {
|
|
170
170
|
return true;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
return false;
|
|
174
174
|
},
|
|
175
175
|
reset: function reset() {
|
|
176
|
-
this.
|
|
177
|
-
this.$emit('input', []);
|
|
178
|
-
this.$emit('reset', []);
|
|
176
|
+
this.innerValue = [];
|
|
179
177
|
},
|
|
180
178
|
confirm: function confirm() {
|
|
181
179
|
this.showPopup = false;
|
|
182
|
-
this.$emit('input', this.
|
|
183
|
-
this.$emit('change', this.
|
|
180
|
+
this.$emit('input', this.innerValue);
|
|
181
|
+
this.$emit('change', this.innerValue);
|
|
182
|
+
this.$emit('confirm', this.innerValue);
|
|
184
183
|
}
|
|
185
184
|
},
|
|
186
185
|
render: function render() {
|
|
@@ -199,7 +198,7 @@ var _default2 = createComponent({
|
|
|
199
198
|
|
|
200
199
|
if (this.multiSelect) {
|
|
201
200
|
Options = this.options.map(function (option, index) {
|
|
202
|
-
var active = _this3.
|
|
201
|
+
var active = _this3.innerValue.indexOf(option.value) >= 0;
|
|
203
202
|
return h(_cell.default, {
|
|
204
203
|
"attrs": {
|
|
205
204
|
"clickable": true,
|
|
@@ -263,25 +262,18 @@ var _default2 = createComponent({
|
|
|
263
262
|
});
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
var buttonStyle = {};
|
|
267
|
-
var optionStyle = {};
|
|
268
265
|
var popupStyle = {};
|
|
269
266
|
|
|
270
267
|
if (this.multiSelect) {
|
|
271
268
|
var optionsLength = this.options.length;
|
|
272
269
|
|
|
273
|
-
if (this.options.length <
|
|
274
|
-
var height = optionsLength * 44;
|
|
270
|
+
if (this.options.length < 7) {
|
|
275
271
|
var popupHeight = optionsLength * 44 + 68;
|
|
276
|
-
buttonStyle.top = height + "px";
|
|
277
|
-
optionStyle.height = height + "px";
|
|
278
272
|
popupStyle.height = popupHeight + "px";
|
|
279
273
|
popupStyle.paddingLeft = "0px";
|
|
280
274
|
} else {
|
|
281
|
-
buttonStyle.top = '176px';
|
|
282
|
-
optionStyle.height = '174px';
|
|
283
275
|
popupStyle.paddingLeft = "0px";
|
|
284
|
-
popupStyle.height = "
|
|
276
|
+
popupStyle.height = "378px";
|
|
285
277
|
}
|
|
286
278
|
}
|
|
287
279
|
|
|
@@ -344,14 +336,12 @@ var _default2 = createComponent({
|
|
|
344
336
|
}]
|
|
345
337
|
}, [Options]), h("div", {
|
|
346
338
|
"class": bem('options'),
|
|
347
|
-
"style": optionStyle,
|
|
348
339
|
"directives": [{
|
|
349
340
|
name: "show",
|
|
350
341
|
value: this.multiSelect
|
|
351
342
|
}]
|
|
352
343
|
}, [Options]), h("div", {
|
|
353
344
|
"class": bem('button'),
|
|
354
|
-
"style": buttonStyle,
|
|
355
345
|
"directives": [{
|
|
356
346
|
name: "show",
|
|
357
347
|
value: this.multiSelect
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
&__content,
|
|
51
51
|
&__content.@{base-prefix}-popup {
|
|
52
52
|
position: absolute;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
53
55
|
max-height: @dropdown-menu-content-max-height;
|
|
54
56
|
padding-left: @padding-md;
|
|
55
57
|
box-sizing: border-box;
|
|
@@ -57,12 +59,14 @@
|
|
|
57
59
|
|
|
58
60
|
&__options {
|
|
59
61
|
position: absolute;
|
|
60
|
-
top:
|
|
62
|
+
top: 0;
|
|
63
|
+
height: calc(100% - 68px);
|
|
61
64
|
width: 100%;
|
|
62
65
|
overflow-y: scroll;
|
|
63
66
|
}
|
|
64
67
|
&__button {
|
|
65
68
|
position: absolute;
|
|
69
|
+
bottom: 0;
|
|
66
70
|
z-index: 1;
|
|
67
71
|
width: 100%;
|
|
68
72
|
height: 68px;
|
|
@@ -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;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)}
|
|
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)}
|
|
@@ -134,7 +134,9 @@ var _default = createComponent({
|
|
|
134
134
|
}, [h("div", {
|
|
135
135
|
"class": "zt2-ellipsis",
|
|
136
136
|
"style": 'padding-right: 20px'
|
|
137
|
-
}, [item.slots('title') || item.displayTitle
|
|
137
|
+
}, [item.slots('title') || item.displayTitle ? item.displayTitle : h("div", {
|
|
138
|
+
"class": [bem('placeholder')]
|
|
139
|
+
}, [item.placeholder]), item.slots('icon') || h(_icon.default, {
|
|
138
140
|
"class": bem('icon'),
|
|
139
141
|
"attrs": {
|
|
140
142
|
"name": "spinner-expand",
|