zartui 1.0.2 → 2.0.2
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/action-sheet/index.css +1 -1
- package/es/action-sheet/index.js +3 -3
- package/es/action-sheet/index.less +12 -8
- package/es/area/style/index.js +1 -0
- package/es/area/style/less.js +1 -0
- package/es/avatar/index.css +1 -1
- package/es/button/index.css +1 -1
- package/es/button/index.js +28 -13
- package/es/button/index.less +60 -27
- package/es/calendar/components/Header.js +1 -6
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.js +31 -8
- package/es/calendar/index.less +16 -10
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +62 -40
- package/es/cell/index.less +67 -12
- package/es/cell/shared.js +2 -0
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +18 -15
- package/es/checkbox-group/index.js +1 -0
- package/es/datetime-picker/style/index.js +1 -0
- package/es/datetime-picker/style/less.js +1 -0
- package/es/field/index.css +1 -1
- package/es/field/index.js +94 -9
- package/es/field/index.less +81 -11
- package/es/hierarchy-select/hierarchySelect.js +1 -8
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.js +6 -14
- package/es/hierarchy-select/index.less +4 -5
- package/es/hierarchy-select/markList.js +1 -16
- package/es/icon/index.css +1 -1
- package/es/image/index.css +1 -1
- package/es/image-preview/ImagePreview.js +1 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +4 -2
- package/es/index.js +3 -4
- package/es/loading/index.css +1 -1
- package/es/loading/index.js +3 -3
- package/es/loading/index.less +1 -1
- package/es/media-picker/image/PickFileIcon.js +2 -9
- package/es/media-picker/image/PickPhotoIcon.js +2 -9
- package/es/media-picker/image/TakeAudioIcon.js +2 -9
- package/es/media-picker/image/TakePhotoIcon.js +2 -9
- package/es/media-picker/image/TakeVideoIcon.js +2 -9
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/index.js +22 -17
- package/es/media-picker/index.less +6 -4
- package/es/media-picker/style/index.js +4 -0
- package/es/media-picker/style/less.js +4 -0
- package/es/mixins/checkbox.js +12 -30
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.js +18 -11
- package/es/multiple-picker/index.less +11 -7
- package/es/multiple-picker/style/index.js +1 -0
- package/es/multiple-picker/style/less.js +1 -0
- package/es/pdf-viewer/style/index.js +1 -0
- package/es/pdf-viewer/style/less.js +1 -0
- package/es/picker/index.css +1 -1
- package/es/picker/index.js +18 -9
- package/es/picker/index.less +18 -2
- package/es/picker/style/index.js +1 -0
- package/es/picker/style/less.js +1 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.js +120 -49
- package/es/popup/index.less +31 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +24 -29
- package/es/radio-group/index.js +1 -0
- package/es/search/index.css +1 -1
- package/es/search/index.js +1 -1
- package/es/search/index.less +31 -3
- package/es/signature/index.js +7 -6
- package/es/signature/index.less +1 -1
- package/es/step/index.css +1 -1
- package/es/step/index.js +3 -5
- package/es/step/index.less +3 -1
- package/es/stepper/index.css +1 -1
- package/es/steps/index.css +1 -1
- package/es/steps/index.less +3 -3
- package/es/style/reset.css +1 -1
- package/es/style/var.less +106 -62
- package/es/switch-cell/index.css +1 -1
- package/es/tabs/Title.js +6 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.js +2 -4
- package/es/tabs/index.less +18 -15
- package/es/toast/index.css +1 -1
- package/es/uploader/index.css +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.js +3 -3
- package/lib/action-sheet/index.less +12 -8
- package/lib/area/style/index.js +1 -0
- package/lib/area/style/less.js +1 -0
- package/lib/avatar/index.css +1 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.js +28 -13
- package/lib/button/index.less +60 -27
- package/lib/calendar/components/Header.js +1 -6
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +31 -8
- package/lib/calendar/index.less +16 -10
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +62 -40
- package/lib/cell/index.less +67 -12
- package/lib/cell/shared.js +2 -0
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +18 -15
- package/lib/checkbox-group/index.js +1 -0
- package/lib/datetime-picker/style/index.js +1 -0
- package/lib/datetime-picker/style/less.js +1 -0
- package/lib/field/index.css +1 -1
- package/lib/field/index.js +94 -9
- package/lib/field/index.less +81 -11
- package/lib/hierarchy-select/hierarchySelect.js +1 -8
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.js +6 -15
- package/lib/hierarchy-select/index.less +4 -5
- package/lib/hierarchy-select/markList.js +1 -16
- package/lib/icon/index.css +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image-preview/ImagePreview.js +1 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +4 -2
- package/lib/index.css +1 -1
- package/lib/index.js +2 -6
- package/lib/index.less +3 -4
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.js +3 -3
- package/lib/loading/index.less +1 -1
- package/lib/media-picker/image/PickFileIcon.js +2 -9
- package/lib/media-picker/image/PickPhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeAudioIcon.js +2 -9
- package/lib/media-picker/image/TakePhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeVideoIcon.js +2 -9
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.js +22 -11
- package/lib/media-picker/index.less +6 -4
- package/lib/media-picker/style/index.js +4 -0
- package/lib/media-picker/style/less.js +4 -0
- package/lib/mixins/checkbox.js +12 -30
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.js +19 -11
- package/lib/multiple-picker/index.less +11 -7
- package/lib/multiple-picker/style/index.js +1 -0
- package/lib/multiple-picker/style/less.js +1 -0
- package/lib/pdf-viewer/style/index.js +1 -0
- package/lib/pdf-viewer/style/less.js +1 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.js +19 -9
- package/lib/picker/index.less +18 -2
- package/lib/picker/style/index.js +1 -0
- package/lib/picker/style/less.js +1 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +120 -49
- package/lib/popup/index.less +31 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +24 -29
- package/lib/radio-group/index.js +1 -0
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -1
- package/lib/search/index.less +31 -3
- package/lib/signature/index.js +7 -6
- package/lib/signature/index.less +1 -1
- package/lib/step/index.css +1 -1
- package/lib/step/index.js +3 -5
- package/lib/step/index.less +3 -1
- package/lib/stepper/index.css +1 -1
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.less +3 -3
- package/lib/style/reset.css +1 -1
- package/lib/style/var.less +106 -62
- package/lib/switch-cell/index.css +1 -1
- package/lib/tabs/Title.js +6 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +2 -4
- package/lib/tabs/index.less +18 -15
- package/lib/toast/index.css +1 -1
- package/lib/uploader/index.css +1 -1
- package/lib/zart.js +1199 -2181
- package/lib/zart.min.js +4 -4
- package/package.json +5 -6
- package/es/pdf-viewer-v2/index.css +0 -1
- package/es/pdf-viewer-v2/index.js +0 -231
- package/es/pdf-viewer-v2/index.less +0 -40
- package/es/pdf-viewer-v2/style/index.js +0 -8
- package/es/pdf-viewer-v2/style/less.js +0 -8
- package/lib/pdf-viewer-v2/index.css +0 -1
- package/lib/pdf-viewer-v2/index.js +0 -242
- package/lib/pdf-viewer-v2/index.less +0 -40
- package/lib/pdf-viewer-v2/style/index.js +0 -8
- package/lib/pdf-viewer-v2/style/less.js +0 -8
package/es/mixins/checkbox.js
CHANGED
|
@@ -17,6 +17,8 @@ export var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
17
17
|
disabled: Boolean,
|
|
18
18
|
iconSize: [Number, String],
|
|
19
19
|
checkedColor: String,
|
|
20
|
+
boxShadow: String,
|
|
21
|
+
border: String,
|
|
20
22
|
iconColor: String,
|
|
21
23
|
labelPosition: String,
|
|
22
24
|
labelDisabled: Boolean,
|
|
@@ -41,12 +43,15 @@ export var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
41
43
|
},
|
|
42
44
|
iconStyle: function iconStyle() {
|
|
43
45
|
var checkedColor = this.checkedColor || this.parent && this.parent.checkedColor;
|
|
46
|
+
var boxShadow = this.boxShadow || this.parent && this.parent.boxShadow;
|
|
47
|
+
var border = this.border || this.parent && this.parent.border;
|
|
44
48
|
var iconColor = this.iconColor || this.parent && this.parent.iconColor;
|
|
45
49
|
|
|
46
|
-
if (checkedColor && this.checked && !this.isDisabled) {
|
|
50
|
+
if ((boxShadow || checkedColor) && this.checked && !this.isDisabled) {
|
|
47
51
|
return {
|
|
48
52
|
color: iconColor,
|
|
49
|
-
|
|
53
|
+
boxShadow: boxShadow,
|
|
54
|
+
border: border,
|
|
50
55
|
backgroundColor: checkedColor
|
|
51
56
|
};
|
|
52
57
|
}
|
|
@@ -93,35 +98,11 @@ export var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
93
98
|
}
|
|
94
99
|
}, [this.slots('icon', {
|
|
95
100
|
checked: checked
|
|
96
|
-
}) ||
|
|
101
|
+
}) || h(Icon, {
|
|
97
102
|
"attrs": {
|
|
98
|
-
"name": "
|
|
103
|
+
"name": role === 'radio' ? "radio-round" : "checkBox-select"
|
|
99
104
|
},
|
|
100
105
|
"style": this.iconStyle
|
|
101
|
-
}))]);
|
|
102
|
-
},
|
|
103
|
-
genRadioIcon: function genRadioIcon() {
|
|
104
|
-
var h = this.$createElement;
|
|
105
|
-
var iconSize = this.iconSize || this.parent && this.parent.iconSize;
|
|
106
|
-
return h("svg", {
|
|
107
|
-
"attrs": {
|
|
108
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
109
|
-
"viewBox": "0 0 24 24"
|
|
110
|
-
},
|
|
111
|
-
"class": bem("custom-svg"),
|
|
112
|
-
"style": {
|
|
113
|
-
width: iconSize,
|
|
114
|
-
height: iconSize
|
|
115
|
-
}
|
|
116
|
-
}, [h("path", {
|
|
117
|
-
"style": {
|
|
118
|
-
fill: this.checkedColor
|
|
119
|
-
},
|
|
120
|
-
"attrs": {
|
|
121
|
-
"d": "M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,7 C9.23857625,7 7,9.23857625 7,12 C7,14.7614237 9.23857625,17 12,17 C14.7614237,17 17,14.7614237 17,12 C17,9.23857625 14.7614237,7 12,7 Z",
|
|
122
|
-
"fill": "#0091FA",
|
|
123
|
-
"fill-rule": "nonzero"
|
|
124
|
-
}
|
|
125
106
|
})]);
|
|
126
107
|
},
|
|
127
108
|
genLabel: function genLabel() {
|
|
@@ -147,16 +128,17 @@ export var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
147
128
|
Children.push(this.genLabel());
|
|
148
129
|
}
|
|
149
130
|
|
|
131
|
+
var checked = this.checked;
|
|
150
132
|
return h("div", {
|
|
151
133
|
"attrs": {
|
|
152
134
|
"role": role,
|
|
153
135
|
"tabindex": this.tabindex,
|
|
154
136
|
"aria-checked": String(this.checked)
|
|
155
137
|
},
|
|
156
|
-
"class": bem([{
|
|
138
|
+
"class": [bem([{
|
|
157
139
|
disabled: this.isDisabled,
|
|
158
140
|
'label-disabled': this.labelDisabled
|
|
159
|
-
}, this.direction]),
|
|
141
|
+
}, this.direction]), checked ? '' : bem('disable-icon')],
|
|
160
142
|
"on": {
|
|
161
143
|
"click": this.onClick
|
|
162
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-multiple-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-multiple-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px}.zt-multiple-picker__border{position:relative}.zt-multiple-picker__border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-multiple-picker__cancel,.zt-multiple-picker__confirm{height:100%;padding:0 16px;font-size:
|
|
1
|
+
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-multiple-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-multiple-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px;padding:8px 16px;border-top:1px solid rgba(45,75,115,.1)}.zt-multiple-picker__border{position:relative}.zt-multiple-picker__border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-multiple-picker__cancel,.zt-multiple-picker__confirm{height:100%;padding:0 16px;font-size:14px;background-color:transparent;border:none;cursor:pointer}.zt-multiple-picker__cancel:active,.zt-multiple-picker__confirm:active{opacity:.7}.zt-multiple-picker__confirm{color:#0091fa;font-weight:700}.zt-multiple-picker__cancel{color:#000;font-weight:400}.zt-multiple-picker__title{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#2d4b73;opacity:.4;padding:12px 0;border-bottom:1px solid rgba(45,75,115,.1)}.zt-multiple-picker__header{width:100%;height:40px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:14px;font-weight:400}.zt-multiple-picker__header>li{-webkit-box-flex:1;-webkit-flex:auto;flex:auto;text-align:center}.zt-multiple-picker__options{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;cursor:grab}.zt-multiple-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#0091fa;background-color:rgba(255,255,255,.9)}.zt-multiple-picker-options{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:scroll;font-size:14px}.zt-multiple-picker-options__wrapper{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;background-color:#fff;padding:12px 16px 4px 16px}.zt-multiple-picker-options__item{color:rgba(0,0,0,.6);padding:0 4px 8px 0;box-sizing:border-box;border-radius:2px;text-align:center;font-size:14px}.zt-multiple-picker-options__item .zt-ellipsis{height:28px;line-height:28px;border:1px solid rgba(45,75,115,.2);border-radius:18px}.zt-multiple-picker-options__item--disabled{cursor:not-allowed;opacity:.3}.zt-multiple-picker-options__item--last{padding-right:0}.zt-multiple-picker-options__item--selected .zt-ellipsis{background:rgba(0,145,250,.1);border:1px solid rgba(0,145,250,.6);border-radius:18px;color:#0091fa}
|
|
@@ -9,6 +9,7 @@ import MultiplePickerOptions from './MultiplePickerOptions';
|
|
|
9
9
|
import Popup from '../popup';
|
|
10
10
|
import { PopupMixin } from '../mixins/popup';
|
|
11
11
|
import { deepClone } from '../utils/deep-clone';
|
|
12
|
+
import Button from '../button';
|
|
12
13
|
|
|
13
14
|
var _createNamespace = createNamespace('multiple-picker'),
|
|
14
15
|
createComponent = _createNamespace[0],
|
|
@@ -36,7 +37,7 @@ export default createComponent({
|
|
|
36
37
|
},
|
|
37
38
|
toolbarPosition: {
|
|
38
39
|
type: String,
|
|
39
|
-
default: '
|
|
40
|
+
default: 'bottom'
|
|
40
41
|
},
|
|
41
42
|
valueKey: {
|
|
42
43
|
type: String,
|
|
@@ -125,11 +126,15 @@ export default createComponent({
|
|
|
125
126
|
},
|
|
126
127
|
genCancel: function genCancel() {
|
|
127
128
|
var h = this.$createElement;
|
|
128
|
-
return h(
|
|
129
|
+
return h(Button, {
|
|
129
130
|
"attrs": {
|
|
130
|
-
"
|
|
131
|
+
"size": "normal",
|
|
132
|
+
"block": true
|
|
133
|
+
},
|
|
134
|
+
"style": {
|
|
135
|
+
marginRigth: "4px",
|
|
136
|
+
backgroundColor: "white"
|
|
131
137
|
},
|
|
132
|
-
"class": bem('cancel'),
|
|
133
138
|
"on": {
|
|
134
139
|
"click": this.cancel
|
|
135
140
|
}
|
|
@@ -137,11 +142,15 @@ export default createComponent({
|
|
|
137
142
|
},
|
|
138
143
|
genConfirm: function genConfirm() {
|
|
139
144
|
var h = this.$createElement;
|
|
140
|
-
return h(
|
|
145
|
+
return h(Button, {
|
|
141
146
|
"attrs": {
|
|
142
|
-
"type": "
|
|
147
|
+
"type": "primary",
|
|
148
|
+
"size": "normal",
|
|
149
|
+
"block": true
|
|
150
|
+
},
|
|
151
|
+
"style": {
|
|
152
|
+
marginLeft: "4px"
|
|
143
153
|
},
|
|
144
|
-
"class": bem('confirm'),
|
|
145
154
|
"on": {
|
|
146
155
|
"click": this.confirm
|
|
147
156
|
}
|
|
@@ -153,7 +162,7 @@ export default createComponent({
|
|
|
153
162
|
if (this.showToolbar) {
|
|
154
163
|
return h("div", {
|
|
155
164
|
"class": bem('toolbar')
|
|
156
|
-
}, [this.slots() || [this.genCancel(), this.
|
|
165
|
+
}, [this.slots() || [this.genCancel(), this.genConfirm()]]);
|
|
157
166
|
}
|
|
158
167
|
},
|
|
159
168
|
genOptions: function genOptions() {
|
|
@@ -225,9 +234,7 @@ export default createComponent({
|
|
|
225
234
|
}, [h("div", {
|
|
226
235
|
"class": bem(),
|
|
227
236
|
"ref": 'columnParent'
|
|
228
|
-
}, [this.
|
|
229
|
-
"class": bem('border')
|
|
230
|
-
}) : h(), this.loading ? h(Loading, {
|
|
237
|
+
}, [this.genTitle(), this.loading ? h(Loading, {
|
|
231
238
|
"class": bem('loading')
|
|
232
239
|
}) : h(), this.genOptions(), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()])]);
|
|
233
240
|
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
height: @picker-toolbar-height;
|
|
14
|
+
padding: 8px 16px;
|
|
15
|
+
border-top: 1px solid rgba(45,75,115,0.10);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
&__border {
|
|
@@ -46,12 +48,14 @@
|
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
&__title {
|
|
49
|
-
max-width: 50%;
|
|
50
51
|
font-weight: @plain-font-weight;
|
|
51
52
|
font-size: @picker-title-font-size;
|
|
52
53
|
line-height: @picker-title-line-height;
|
|
53
54
|
text-align: center;
|
|
54
|
-
color:
|
|
55
|
+
color: #2D4B73;
|
|
56
|
+
opacity: 0.4;
|
|
57
|
+
padding: 12px 0;
|
|
58
|
+
border-bottom: 1px solid rgba(45,75,115,0.10);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
&__header {
|
|
@@ -107,12 +111,12 @@
|
|
|
107
111
|
border-radius: 2px;
|
|
108
112
|
text-align: center;
|
|
109
113
|
font-size: 14px;
|
|
114
|
+
|
|
110
115
|
.zt-ellipsis {
|
|
111
116
|
height: 28px;
|
|
112
117
|
line-height: 28px;
|
|
113
|
-
|
|
114
|
-
border:
|
|
115
|
-
border-radius: 2px;
|
|
118
|
+
border: 1px solid rgba(45,75,115,0.20);
|
|
119
|
+
border-radius: 18px;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
&--disabled {
|
|
@@ -127,8 +131,8 @@
|
|
|
127
131
|
&--selected {
|
|
128
132
|
.zt-ellipsis {
|
|
129
133
|
background: rgba(0,145,250,0.10);
|
|
130
|
-
border: 1px solid
|
|
131
|
-
border-radius:
|
|
134
|
+
border: 1px solid rgba(0,145,250,0.60);
|
|
135
|
+
border-radius: 18px;
|
|
132
136
|
color: #0091FA;
|
|
133
137
|
}
|
|
134
138
|
}
|
package/es/picker/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px}.zt-picker__border{position:relative}.zt-picker__border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-picker__cancel,.zt-picker__confirm{height:100%;padding:0 16px;font-size:
|
|
1
|
+
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px;padding:8px 16px 8px 16px;border-top:1px solid rgba(45,75,115,.1);position:relative}.zt-picker__border{position:relative}.zt-picker__border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-picker__cancel,.zt-picker__confirm{height:100%;padding:0 16px;font-size:14px;background-color:transparent;border:none;cursor:pointer}.zt-picker__cancel:active,.zt-picker__confirm:active{opacity:.7}.zt-picker__confirm{color:#0091fa;font-weight:700}.zt-picker__cancel{color:#000;font-weight:400}.zt-picker__title{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#2d4b73;opacity:.4;padding:12px 0;border-bottom:1px solid rgba(45,75,115,.1)}.zt-picker__header{width:100%;height:40px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:14px;font-weight:400}.zt-picker__header>li{-webkit-box-flex:1;-webkit-flex:auto;flex:auto;text-align:center}.zt-picker__columns{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;cursor:grab}.zt-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#0091fa;background-color:rgba(255,255,255,.9)}.zt-picker__frame{position:absolute;top:50%;right:16px;left:16px;z-index:2;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.zt-picker__background{position:absolute;width:100%;height:100%;opacity:.04;background-color:#000}.zt-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:-webkit-linear-gradient(top,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),-webkit-linear-gradient(bottom,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-repeat:no-repeat;background-position:top,bottom;-webkit-transform:translateZ(0);transform:translateZ(0);pointer-events:none}.zt-picker-column{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:hidden;font-size:14px}.zt-picker-column__wrapper{-webkit-transition-timing-function:cubic-bezier(.23,1,.68,1);transition-timing-function:cubic-bezier(.23,1,.68,1)}.zt-picker-column__item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;padding:0 4px;color:#000}.zt-picker-column__item--disabled{cursor:not-allowed;opacity:.3}.zt-picker-column__item--selected{font-weight:700}
|
package/es/picker/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { unitToPx } from '../utils/format/unit'; // Components
|
|
|
8
8
|
import Loading from '../loading';
|
|
9
9
|
import PickerColumn from './PickerColumn';
|
|
10
10
|
import Popup from '../popup';
|
|
11
|
+
import Button from '../button';
|
|
11
12
|
import { PopupMixin } from '../mixins/popup';
|
|
12
13
|
|
|
13
14
|
var _createNamespace = createNamespace('picker'),
|
|
@@ -38,7 +39,7 @@ export default createComponent({
|
|
|
38
39
|
},
|
|
39
40
|
toolbarPosition: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: '
|
|
42
|
+
default: 'bottom'
|
|
42
43
|
},
|
|
43
44
|
valueKey: {
|
|
44
45
|
type: String,
|
|
@@ -322,11 +323,15 @@ export default createComponent({
|
|
|
322
323
|
},
|
|
323
324
|
genCancel: function genCancel() {
|
|
324
325
|
var h = this.$createElement;
|
|
325
|
-
return h(
|
|
326
|
+
return h(Button, {
|
|
326
327
|
"attrs": {
|
|
327
|
-
"
|
|
328
|
+
"size": "normal",
|
|
329
|
+
"block": true
|
|
330
|
+
},
|
|
331
|
+
"style": {
|
|
332
|
+
marginRigth: "4px",
|
|
333
|
+
backgroundColor: "white"
|
|
328
334
|
},
|
|
329
|
-
"class": bem('cancel'),
|
|
330
335
|
"on": {
|
|
331
336
|
"click": this.cancel
|
|
332
337
|
}
|
|
@@ -334,11 +339,15 @@ export default createComponent({
|
|
|
334
339
|
},
|
|
335
340
|
genConfirm: function genConfirm() {
|
|
336
341
|
var h = this.$createElement;
|
|
337
|
-
return h(
|
|
342
|
+
return h(Button, {
|
|
338
343
|
"attrs": {
|
|
339
|
-
"type": "
|
|
344
|
+
"type": "primary",
|
|
345
|
+
"size": "normal",
|
|
346
|
+
"block": true
|
|
347
|
+
},
|
|
348
|
+
"style": {
|
|
349
|
+
marginLeft: "4px"
|
|
340
350
|
},
|
|
341
|
-
"class": bem('confirm'),
|
|
342
351
|
"on": {
|
|
343
352
|
"click": this.confirm
|
|
344
353
|
}
|
|
@@ -350,7 +359,7 @@ export default createComponent({
|
|
|
350
359
|
if (this.showToolbar) {
|
|
351
360
|
return h("div", {
|
|
352
361
|
"class": bem('toolbar')
|
|
353
|
-
}, [this.slots() || [this.genCancel(), this.
|
|
362
|
+
}, [this.slots() || [this.genCancel(), this.genConfirm()]]);
|
|
354
363
|
}
|
|
355
364
|
},
|
|
356
365
|
genHeaders: function genHeaders() {
|
|
@@ -439,7 +448,7 @@ export default createComponent({
|
|
|
439
448
|
}, [h("div", {
|
|
440
449
|
"class": bem(),
|
|
441
450
|
"ref": 'columnParent'
|
|
442
|
-
}, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.toolbarPosition === 'top' ? h("div", {
|
|
451
|
+
}, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.toolbarPosition === 'top' ? h() : this.genTitle(), this.toolbarPosition === 'top' ? h("div", {
|
|
443
452
|
"class": bem('border')
|
|
444
453
|
}) : h(), this.loading ? h(Loading, {
|
|
445
454
|
"class": bem('loading')
|
package/es/picker/index.less
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
height: @picker-toolbar-height;
|
|
14
|
+
padding: 8px 16px 8px 16px;
|
|
15
|
+
border-top: 1px solid rgba(45,75,115,0.10);
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
// &::before {
|
|
19
|
+
// content: '';
|
|
20
|
+
// display: inline-block;
|
|
21
|
+
// width: 100%;
|
|
22
|
+
// height: 1px;
|
|
23
|
+
// box-shadow: inset 0 0 0 0 rgba(45,75,115,0.10);
|
|
24
|
+
// position: absolute;
|
|
25
|
+
// top: 0;
|
|
26
|
+
// right: 0;
|
|
27
|
+
// }
|
|
14
28
|
}
|
|
15
29
|
|
|
16
30
|
&__border {
|
|
@@ -46,12 +60,14 @@
|
|
|
46
60
|
}
|
|
47
61
|
|
|
48
62
|
&__title {
|
|
49
|
-
max-width: 50%;
|
|
50
63
|
font-weight: @plain-font-weight;
|
|
51
64
|
font-size: @picker-title-font-size;
|
|
52
65
|
line-height: @picker-title-line-height;
|
|
53
66
|
text-align: center;
|
|
54
|
-
color:
|
|
67
|
+
color: #2D4B73;
|
|
68
|
+
opacity: 0.4;
|
|
69
|
+
padding: 12px 0;
|
|
70
|
+
border-bottom: 1px solid rgba(45,75,115,0.10);
|
|
55
71
|
}
|
|
56
72
|
|
|
57
73
|
&__header {
|
package/es/picker/style/index.js
CHANGED
package/es/picker/style/less.js
CHANGED
package/es/popup/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:#fff;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-overflow-scrolling:touch}.zt-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.zt-popup--center.zt-popup--round{border-radius:
|
|
1
|
+
.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:#fff;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-overflow-scrolling:touch}.zt-popup__slider{position:fixed;width:100%;bottom:0;border-radius:16px 16px 0 0;background-color:#fff}.zt-popup__slider-title{height:40px;text-align:center}.zt-popup__slider-bar{display:inline-block;width:32px;height:4px;-webkit-transform:scaleY(-1);transform:scaleY(-1);background:rgba(45,75,115,.2);border-radius:3px}.zt-popup__slider-content{overflow-y:auto}.zt-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.zt-popup--center.zt-popup--round{border-radius:16px}.zt-popup--top{top:0;left:0;width:100%}.zt-popup--top.zt-popup--round{border-radius:0 0 16px 16px}.zt-popup--right{top:50%;right:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.zt-popup--right.zt-popup--round{border-radius:16px 0 0 16px}.zt-popup--bottom{bottom:0;left:0;width:100%}.zt-popup--bottom.zt-popup--round{border-radius:16px 16px 0 0}.zt-popup--left{top:50%;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.zt-popup--left.zt-popup--round{border-radius:0 16px 16px 0}.zt-popup--safe-area-inset-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-popup-slide-bottom-enter-active,.zt-popup-slide-left-enter-active,.zt-popup-slide-right-enter-active,.zt-popup-slide-top-enter-active{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.zt-popup-slide-bottom-leave-active,.zt-popup-slide-left-leave-active,.zt-popup-slide-right-leave-active,.zt-popup-slide-top-leave-active{-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.zt-popup-slide-top-enter,.zt-popup-slide-top-leave-active{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.zt-popup-slide-right-enter,.zt-popup-slide-right-leave-active{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}.zt-popup-slide-bottom-enter,.zt-popup-slide-bottom-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.zt-popup-slide-left-enter,.zt-popup-slide-left-leave-active{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.zt-popup__slider-icon{z-index:1;color:rgba(45,75,115,.6);font-size:24px;cursor:pointer}.zt-popup__close-icon{position:absolute;z-index:1;color:rgba(45,75,115,.6);font-size:24px;cursor:pointer}.zt-popup__close-icon:active{color:#969799}.zt-popup__close-icon--top-left{top:12px;left:16px}.zt-popup__close-icon--top-right{top:12px;right:16px}.zt-popup__close-icon--bottom-left{bottom:16px;left:16px}.zt-popup__close-icon--bottom-right{right:16px;bottom:16px}
|
package/es/popup/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export default createComponent({
|
|
|
16
16
|
safeAreaInsetBottom: Boolean,
|
|
17
17
|
closeIcon: {
|
|
18
18
|
type: String,
|
|
19
|
-
default: '
|
|
19
|
+
default: 'clear'
|
|
20
20
|
},
|
|
21
21
|
closeIconPosition: {
|
|
22
22
|
type: String,
|
|
@@ -37,6 +37,14 @@ export default createComponent({
|
|
|
37
37
|
customOnClickOverlay: {
|
|
38
38
|
type: Function,
|
|
39
39
|
default: null
|
|
40
|
+
},
|
|
41
|
+
sliderContentHeight: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 60
|
|
44
|
+
},
|
|
45
|
+
sliderShow: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
40
48
|
}
|
|
41
49
|
},
|
|
42
50
|
beforeCreate: function beforeCreate() {
|
|
@@ -52,71 +60,134 @@ export default createComponent({
|
|
|
52
60
|
this.onOpened = createEmitter('opened');
|
|
53
61
|
this.onClosed = createEmitter('closed');
|
|
54
62
|
},
|
|
63
|
+
data: function data() {
|
|
64
|
+
return {
|
|
65
|
+
positionY: 0,
|
|
66
|
+
timerId: null,
|
|
67
|
+
contentStyle: "height:" + this.sliderContentHeight + "px;",
|
|
68
|
+
touchHeight: 0
|
|
69
|
+
};
|
|
70
|
+
},
|
|
55
71
|
methods: {
|
|
56
72
|
onClickCloseIcon: function onClickCloseIcon(event) {
|
|
57
73
|
this.$emit('click-close-icon', event);
|
|
58
74
|
this.close();
|
|
59
75
|
},
|
|
60
76
|
onClickOverlay: function onClickOverlay() {
|
|
77
|
+
if (this.sliderShow) {
|
|
78
|
+
this.contentStyle = 'height:60px';
|
|
79
|
+
}
|
|
80
|
+
|
|
61
81
|
if (this.customOnClickOverlay) {
|
|
62
82
|
this.customOnClickOverlay();
|
|
63
83
|
} else if (this.closeOnClickOverlay) {
|
|
64
84
|
this.close();
|
|
65
85
|
}
|
|
86
|
+
},
|
|
87
|
+
move: function move(event) {
|
|
88
|
+
var _this2 = this;
|
|
89
|
+
|
|
90
|
+
if (this.timerId) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
|
95
|
+
this.positionY = event.touches[0].clientY;
|
|
96
|
+
this.timerId = setTimeout(function () {
|
|
97
|
+
if (_this2.positionY === 0 || _this2.positionY < h * 0.15) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
_this2.touchHeight = _this2.positionY - 40 > h - 40 ? h - 40 : _this2.positionY;
|
|
102
|
+
_this2.contentStyle = "height:" + (h - _this2.touchHeight - 40) + "px;";
|
|
103
|
+
}, 10);
|
|
104
|
+
},
|
|
105
|
+
endMove: function endMove() {
|
|
106
|
+
clearInterval(this.timerId);
|
|
107
|
+
this.timerId = null;
|
|
108
|
+
},
|
|
109
|
+
startMove: function startMove() {
|
|
110
|
+
if (this.timerId) {
|
|
111
|
+
clearInterval(this.timerId);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
allowSliderRender: function allowSliderRender() {
|
|
115
|
+
var h = this.$createElement;
|
|
116
|
+
return h("div", {
|
|
117
|
+
"class": bem('slider'),
|
|
118
|
+
"directives": [{
|
|
119
|
+
name: "show",
|
|
120
|
+
value: this.value
|
|
121
|
+
}]
|
|
122
|
+
}, [h("div", {
|
|
123
|
+
"class": bem('slider-title'),
|
|
124
|
+
"on": {
|
|
125
|
+
"touchmove": this.move,
|
|
126
|
+
"touchend": this.endMove,
|
|
127
|
+
"touchstart": this.startMove
|
|
128
|
+
}
|
|
129
|
+
}, [h("div", {
|
|
130
|
+
"class": bem('slider-bar')
|
|
131
|
+
})]), h("div", {
|
|
132
|
+
"class": bem('slider-content'),
|
|
133
|
+
"style": this.contentStyle
|
|
134
|
+
}, [this.slots()])]);
|
|
135
|
+
},
|
|
136
|
+
popupRender: function popupRender() {
|
|
137
|
+
var _bem;
|
|
138
|
+
|
|
139
|
+
var h = this.$createElement;
|
|
140
|
+
var round = this.round,
|
|
141
|
+
position = this.position,
|
|
142
|
+
duration = this.duration;
|
|
143
|
+
var isCenter = position === 'center';
|
|
144
|
+
var transitionName = this.transition || (isCenter ? 'zt-fade' : "zt-popup-slide-" + position);
|
|
145
|
+
var style = {};
|
|
146
|
+
|
|
147
|
+
if (isDef(duration)) {
|
|
148
|
+
var key = isCenter ? 'animationDuration' : 'transitionDuration';
|
|
149
|
+
style[key] = duration + "s";
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return h("transition", {
|
|
153
|
+
"attrs": {
|
|
154
|
+
"appear": this.transitionAppear,
|
|
155
|
+
"name": transitionName
|
|
156
|
+
},
|
|
157
|
+
"on": {
|
|
158
|
+
"afterEnter": this.onOpened,
|
|
159
|
+
"afterLeave": this.onClosed
|
|
160
|
+
}
|
|
161
|
+
}, [h("div", {
|
|
162
|
+
"directives": [{
|
|
163
|
+
name: "show",
|
|
164
|
+
value: this.value
|
|
165
|
+
}],
|
|
166
|
+
"style": style,
|
|
167
|
+
"class": bem((_bem = {
|
|
168
|
+
round: round
|
|
169
|
+
}, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
|
|
170
|
+
"on": {
|
|
171
|
+
"click": this.onClick
|
|
172
|
+
}
|
|
173
|
+
}, [this.slots(), this.closeable && h(Icon, {
|
|
174
|
+
"attrs": {
|
|
175
|
+
"role": "button",
|
|
176
|
+
"tabindex": "0",
|
|
177
|
+
"name": this.closeIcon
|
|
178
|
+
},
|
|
179
|
+
"class": bem('close-icon', this.closeIconPosition),
|
|
180
|
+
"on": {
|
|
181
|
+
"click": this.onClickCloseIcon
|
|
182
|
+
}
|
|
183
|
+
})])]);
|
|
66
184
|
}
|
|
67
185
|
},
|
|
68
186
|
render: function render() {
|
|
69
|
-
var _bem;
|
|
70
|
-
|
|
71
|
-
var h = arguments[0];
|
|
72
|
-
|
|
73
187
|
if (!this.shouldRender) {
|
|
74
188
|
return;
|
|
75
189
|
}
|
|
76
190
|
|
|
77
|
-
|
|
78
|
-
position = this.position,
|
|
79
|
-
duration = this.duration;
|
|
80
|
-
var isCenter = position === 'center';
|
|
81
|
-
var transitionName = this.transition || (isCenter ? 'zt-fade' : "zt-popup-slide-" + position);
|
|
82
|
-
var style = {};
|
|
83
|
-
|
|
84
|
-
if (isDef(duration)) {
|
|
85
|
-
var key = isCenter ? 'animationDuration' : 'transitionDuration';
|
|
86
|
-
style[key] = duration + "s";
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return h("transition", {
|
|
90
|
-
"attrs": {
|
|
91
|
-
"appear": this.transitionAppear,
|
|
92
|
-
"name": transitionName
|
|
93
|
-
},
|
|
94
|
-
"on": {
|
|
95
|
-
"afterEnter": this.onOpened,
|
|
96
|
-
"afterLeave": this.onClosed
|
|
97
|
-
}
|
|
98
|
-
}, [h("div", {
|
|
99
|
-
"directives": [{
|
|
100
|
-
name: "show",
|
|
101
|
-
value: this.value
|
|
102
|
-
}],
|
|
103
|
-
"style": style,
|
|
104
|
-
"class": bem((_bem = {
|
|
105
|
-
round: round
|
|
106
|
-
}, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
|
|
107
|
-
"on": {
|
|
108
|
-
"click": this.onClick
|
|
109
|
-
}
|
|
110
|
-
}, [this.slots(), this.closeable && h(Icon, {
|
|
111
|
-
"attrs": {
|
|
112
|
-
"role": "button",
|
|
113
|
-
"tabindex": "0",
|
|
114
|
-
"name": this.closeIcon
|
|
115
|
-
},
|
|
116
|
-
"class": bem('close-icon', this.closeIconPosition),
|
|
117
|
-
"on": {
|
|
118
|
-
"click": this.onClickCloseIcon
|
|
119
|
-
}
|
|
120
|
-
})])]);
|
|
191
|
+
return this.sliderShow ? this.allowSliderRender() : this.popupRender();
|
|
121
192
|
}
|
|
122
193
|
});
|