zartui 2.0.1 → 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/button/index.css +1 -1
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +3 -3
- package/es/cell/index.less +5 -5
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +10 -19
- package/es/field/index.css +1 -1
- package/es/field/index.js +16 -4
- package/es/field/index.less +21 -3
- package/es/index.js +1 -1
- package/es/media-picker/index.js +22 -17
- package/es/media-picker/style/index.js +4 -0
- package/es/media-picker/style/less.js +4 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.js +119 -48
- package/es/popup/index.less +29 -0
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +9 -15
- package/es/search/index.css +1 -1
- package/es/search/index.js +1 -1
- package/es/search/index.less +31 -3
- package/es/style/var.less +16 -11
- package/es/switch-cell/index.css +1 -1
- package/lib/7893e51cf0a4877dac80.worker.js +10 -0
- package/lib/be09b519a460e229fd8d.worker.js +2527 -0
- package/lib/button/index.css +1 -1
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +3 -3
- package/lib/cell/index.less +5 -5
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +10 -19
- package/lib/field/index.css +1 -1
- package/lib/field/index.js +16 -4
- package/lib/field/index.less +21 -3
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +2 -2
- package/lib/media-picker/index.js +22 -11
- package/lib/media-picker/style/index.js +4 -0
- package/lib/media-picker/style/less.js +4 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +119 -48
- package/lib/popup/index.less +29 -0
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +9 -15
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -1
- package/lib/search/index.less +31 -3
- package/lib/style/var.less +16 -11
- package/lib/switch-cell/index.css +1 -1
- package/lib/zart.js +17812 -49870
- package/lib/zart.min.js +4 -4
- package/package.json +2 -2
- package/lib/a037f57fc4d92a8a1f1e.worker.js +0 -60600
- package/lib/b7cf90b4775181215df7.worker.js +0 -10
package/lib/index.js
CHANGED
|
@@ -313,7 +313,7 @@ exports.Toast = _toast.default;
|
|
|
313
313
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
314
314
|
|
|
315
315
|
exports.Uploader = _uploader.default;
|
|
316
|
-
var version = '2.0.
|
|
316
|
+
var version = '2.0.2';
|
|
317
317
|
exports.version = version;
|
|
318
318
|
|
|
319
319
|
function install(Vue) {
|
package/lib/index.less
CHANGED
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
@import "./swipe-item/index.less";
|
|
57
57
|
@import "./image-preview/index.less";
|
|
58
58
|
@import "./uploader/index.less";
|
|
59
|
-
@import "./media-picker/index.less";
|
|
60
|
-
@import "./media-player/index.less";
|
|
61
59
|
@import "./index-anchor/index.less";
|
|
62
60
|
@import "./index-bar/index.less";
|
|
61
|
+
@import "./media-picker/index.less";
|
|
62
|
+
@import "./media-player/index.less";
|
|
63
63
|
@import "./password-input/index.less";
|
|
64
64
|
@import "./radio-group/index.less";
|
|
65
65
|
@import "./row/index.less";
|
|
@@ -7,6 +7,20 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _utils = require("../utils");
|
|
9
9
|
|
|
10
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
|
+
|
|
12
|
+
var _loading = _interopRequireDefault(require("../loading"));
|
|
13
|
+
|
|
14
|
+
var _image = _interopRequireDefault(require("../image"));
|
|
15
|
+
|
|
16
|
+
var _gridItem = _interopRequireDefault(require("../grid-item"));
|
|
17
|
+
|
|
18
|
+
var _mediaPlayer = _interopRequireDefault(require("../media-player"));
|
|
19
|
+
|
|
20
|
+
var _actionSheet = _interopRequireDefault(require("../action-sheet"));
|
|
21
|
+
|
|
22
|
+
var _grid = _interopRequireDefault(require("../grid"));
|
|
23
|
+
|
|
10
24
|
var _type = require("./type");
|
|
11
25
|
|
|
12
26
|
var _media = require("@egova/media");
|
|
@@ -35,19 +49,16 @@ var _DefaultFileIcon = _interopRequireDefault(require("./image/DefaultFileIcon")
|
|
|
35
49
|
|
|
36
50
|
var _mediaUtil = require("./media-util");
|
|
37
51
|
|
|
38
|
-
var _icon = _interopRequireDefault(require("../icon"));
|
|
39
|
-
|
|
40
|
-
var _loading = _interopRequireDefault(require("../loading"));
|
|
41
|
-
|
|
42
52
|
// Utils
|
|
43
53
|
// Types
|
|
54
|
+
// import components
|
|
55
|
+
// Images
|
|
44
56
|
// 单个文件最大限制,单位为M(目前限制是100M)
|
|
45
57
|
var FILE_SIZE_LIMIT = 100;
|
|
46
58
|
|
|
47
59
|
var _createNamespace = (0, _utils.createNamespace)('media-picker'),
|
|
48
60
|
createComponent = _createNamespace[0],
|
|
49
|
-
bem = _createNamespace[1];
|
|
50
|
-
|
|
61
|
+
bem = _createNamespace[1];
|
|
51
62
|
|
|
52
63
|
var _default2 = createComponent({
|
|
53
64
|
props: {
|
|
@@ -919,7 +930,7 @@ var _default2 = createComponent({
|
|
|
919
930
|
var h = this.$createElement;
|
|
920
931
|
|
|
921
932
|
if (media.showSrc) {
|
|
922
|
-
return h(
|
|
933
|
+
return h(_image.default, {
|
|
923
934
|
"attrs": {
|
|
924
935
|
"src": media.showSrc,
|
|
925
936
|
"fit": 'fill',
|
|
@@ -956,7 +967,7 @@ var _default2 = createComponent({
|
|
|
956
967
|
}
|
|
957
968
|
}
|
|
958
969
|
});
|
|
959
|
-
return h(
|
|
970
|
+
return h(_gridItem.default, {
|
|
960
971
|
"key": media.uniqueCode,
|
|
961
972
|
"on": {
|
|
962
973
|
"click": function click() {
|
|
@@ -980,7 +991,7 @@ var _default2 = createComponent({
|
|
|
980
991
|
}, [this.title]);
|
|
981
992
|
return h("div", {
|
|
982
993
|
"class": bem()
|
|
983
|
-
}, [title, this.hiddenInput(), h(
|
|
994
|
+
}, [title, this.hiddenInput(), h(_mediaPlayer.default, {
|
|
984
995
|
"attrs": {
|
|
985
996
|
"mediaType": this.mediaTypeToPlay,
|
|
986
997
|
"mediaUrl": this.mediaUrlToPlay
|
|
@@ -991,7 +1002,7 @@ var _default2 = createComponent({
|
|
|
991
1002
|
_this9.mediaPlayerVisible = $$v;
|
|
992
1003
|
}
|
|
993
1004
|
}
|
|
994
|
-
}), h(
|
|
1005
|
+
}), h(_actionSheet.default, {
|
|
995
1006
|
"attrs": {
|
|
996
1007
|
"actions": this.actionOptions,
|
|
997
1008
|
"title": '请选择',
|
|
@@ -1009,7 +1020,7 @@ var _default2 = createComponent({
|
|
|
1009
1020
|
}
|
|
1010
1021
|
}), h("div", {
|
|
1011
1022
|
"class": bem('line')
|
|
1012
|
-
}, [this.renderButtons()]), h(
|
|
1023
|
+
}, [this.renderButtons()]), h(_grid.default, {
|
|
1013
1024
|
"directives": [{
|
|
1014
1025
|
name: "show",
|
|
1015
1026
|
value: this.mediaList.length
|
|
@@ -3,10 +3,14 @@ require('../../overlay/index.css');
|
|
|
3
3
|
require('../../info/index.css');
|
|
4
4
|
require('../../icon/index.css');
|
|
5
5
|
require('../../image/index.css');
|
|
6
|
+
require('../../grid-item/index.css');
|
|
6
7
|
require('../../popup/index.css');
|
|
7
8
|
require('../../loading/index.css');
|
|
8
9
|
require('../../toast/index.css');
|
|
10
|
+
require('../../action-sheet/index.css');
|
|
11
|
+
require('../../grid/index.css');
|
|
9
12
|
require('../../swipe/index.css');
|
|
10
13
|
require('../../swipe-item/index.css');
|
|
11
14
|
require('../../image-preview/index.css');
|
|
15
|
+
require('../../media-player/index.css');
|
|
12
16
|
require('../index.css');
|
|
@@ -3,10 +3,14 @@ require('../../overlay/index.less');
|
|
|
3
3
|
require('../../info/index.less');
|
|
4
4
|
require('../../icon/index.less');
|
|
5
5
|
require('../../image/index.less');
|
|
6
|
+
require('../../grid-item/index.less');
|
|
6
7
|
require('../../popup/index.less');
|
|
7
8
|
require('../../loading/index.less');
|
|
8
9
|
require('../../toast/index.less');
|
|
10
|
+
require('../../action-sheet/index.less');
|
|
11
|
+
require('../../grid/index.less');
|
|
9
12
|
require('../../swipe/index.less');
|
|
10
13
|
require('../../swipe-item/index.less');
|
|
11
14
|
require('../../image-preview/index.less');
|
|
15
|
+
require('../../media-player/index.less');
|
|
12
16
|
require('../index.less');
|
package/lib/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: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__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}
|
|
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/lib/popup/index.js
CHANGED
|
@@ -46,6 +46,14 @@ var _default = createComponent({
|
|
|
46
46
|
customOnClickOverlay: {
|
|
47
47
|
type: Function,
|
|
48
48
|
default: null
|
|
49
|
+
},
|
|
50
|
+
sliderContentHeight: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 60
|
|
53
|
+
},
|
|
54
|
+
sliderShow: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
49
57
|
}
|
|
50
58
|
},
|
|
51
59
|
beforeCreate: function beforeCreate() {
|
|
@@ -61,72 +69,135 @@ var _default = createComponent({
|
|
|
61
69
|
this.onOpened = createEmitter('opened');
|
|
62
70
|
this.onClosed = createEmitter('closed');
|
|
63
71
|
},
|
|
72
|
+
data: function data() {
|
|
73
|
+
return {
|
|
74
|
+
positionY: 0,
|
|
75
|
+
timerId: null,
|
|
76
|
+
contentStyle: "height:" + this.sliderContentHeight + "px;",
|
|
77
|
+
touchHeight: 0
|
|
78
|
+
};
|
|
79
|
+
},
|
|
64
80
|
methods: {
|
|
65
81
|
onClickCloseIcon: function onClickCloseIcon(event) {
|
|
66
82
|
this.$emit('click-close-icon', event);
|
|
67
83
|
this.close();
|
|
68
84
|
},
|
|
69
85
|
onClickOverlay: function onClickOverlay() {
|
|
86
|
+
if (this.sliderShow) {
|
|
87
|
+
this.contentStyle = 'height:60px';
|
|
88
|
+
}
|
|
89
|
+
|
|
70
90
|
if (this.customOnClickOverlay) {
|
|
71
91
|
this.customOnClickOverlay();
|
|
72
92
|
} else if (this.closeOnClickOverlay) {
|
|
73
93
|
this.close();
|
|
74
94
|
}
|
|
95
|
+
},
|
|
96
|
+
move: function move(event) {
|
|
97
|
+
var _this2 = this;
|
|
98
|
+
|
|
99
|
+
if (this.timerId) {
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
|
104
|
+
this.positionY = event.touches[0].clientY;
|
|
105
|
+
this.timerId = setTimeout(function () {
|
|
106
|
+
if (_this2.positionY === 0 || _this2.positionY < h * 0.15) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_this2.touchHeight = _this2.positionY - 40 > h - 40 ? h - 40 : _this2.positionY;
|
|
111
|
+
_this2.contentStyle = "height:" + (h - _this2.touchHeight - 40) + "px;";
|
|
112
|
+
}, 10);
|
|
113
|
+
},
|
|
114
|
+
endMove: function endMove() {
|
|
115
|
+
clearInterval(this.timerId);
|
|
116
|
+
this.timerId = null;
|
|
117
|
+
},
|
|
118
|
+
startMove: function startMove() {
|
|
119
|
+
if (this.timerId) {
|
|
120
|
+
clearInterval(this.timerId);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
allowSliderRender: function allowSliderRender() {
|
|
124
|
+
var h = this.$createElement;
|
|
125
|
+
return h("div", {
|
|
126
|
+
"class": bem('slider'),
|
|
127
|
+
"directives": [{
|
|
128
|
+
name: "show",
|
|
129
|
+
value: this.value
|
|
130
|
+
}]
|
|
131
|
+
}, [h("div", {
|
|
132
|
+
"class": bem('slider-title'),
|
|
133
|
+
"on": {
|
|
134
|
+
"touchmove": this.move,
|
|
135
|
+
"touchend": this.endMove,
|
|
136
|
+
"touchstart": this.startMove
|
|
137
|
+
}
|
|
138
|
+
}, [h("div", {
|
|
139
|
+
"class": bem('slider-bar')
|
|
140
|
+
})]), h("div", {
|
|
141
|
+
"class": bem('slider-content'),
|
|
142
|
+
"style": this.contentStyle
|
|
143
|
+
}, [this.slots()])]);
|
|
144
|
+
},
|
|
145
|
+
popupRender: function popupRender() {
|
|
146
|
+
var _bem;
|
|
147
|
+
|
|
148
|
+
var h = this.$createElement;
|
|
149
|
+
var round = this.round,
|
|
150
|
+
position = this.position,
|
|
151
|
+
duration = this.duration;
|
|
152
|
+
var isCenter = position === 'center';
|
|
153
|
+
var transitionName = this.transition || (isCenter ? 'zt-fade' : "zt-popup-slide-" + position);
|
|
154
|
+
var style = {};
|
|
155
|
+
|
|
156
|
+
if ((0, _utils.isDef)(duration)) {
|
|
157
|
+
var key = isCenter ? 'animationDuration' : 'transitionDuration';
|
|
158
|
+
style[key] = duration + "s";
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return h("transition", {
|
|
162
|
+
"attrs": {
|
|
163
|
+
"appear": this.transitionAppear,
|
|
164
|
+
"name": transitionName
|
|
165
|
+
},
|
|
166
|
+
"on": {
|
|
167
|
+
"afterEnter": this.onOpened,
|
|
168
|
+
"afterLeave": this.onClosed
|
|
169
|
+
}
|
|
170
|
+
}, [h("div", {
|
|
171
|
+
"directives": [{
|
|
172
|
+
name: "show",
|
|
173
|
+
value: this.value
|
|
174
|
+
}],
|
|
175
|
+
"style": style,
|
|
176
|
+
"class": bem((_bem = {
|
|
177
|
+
round: round
|
|
178
|
+
}, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
|
|
179
|
+
"on": {
|
|
180
|
+
"click": this.onClick
|
|
181
|
+
}
|
|
182
|
+
}, [this.slots(), this.closeable && h(_icon.default, {
|
|
183
|
+
"attrs": {
|
|
184
|
+
"role": "button",
|
|
185
|
+
"tabindex": "0",
|
|
186
|
+
"name": this.closeIcon
|
|
187
|
+
},
|
|
188
|
+
"class": bem('close-icon', this.closeIconPosition),
|
|
189
|
+
"on": {
|
|
190
|
+
"click": this.onClickCloseIcon
|
|
191
|
+
}
|
|
192
|
+
})])]);
|
|
75
193
|
}
|
|
76
194
|
},
|
|
77
195
|
render: function render() {
|
|
78
|
-
var _bem;
|
|
79
|
-
|
|
80
|
-
var h = arguments[0];
|
|
81
|
-
|
|
82
196
|
if (!this.shouldRender) {
|
|
83
197
|
return;
|
|
84
198
|
}
|
|
85
199
|
|
|
86
|
-
|
|
87
|
-
position = this.position,
|
|
88
|
-
duration = this.duration;
|
|
89
|
-
var isCenter = position === 'center';
|
|
90
|
-
var transitionName = this.transition || (isCenter ? 'zt-fade' : "zt-popup-slide-" + position);
|
|
91
|
-
var style = {};
|
|
92
|
-
|
|
93
|
-
if ((0, _utils.isDef)(duration)) {
|
|
94
|
-
var key = isCenter ? 'animationDuration' : 'transitionDuration';
|
|
95
|
-
style[key] = duration + "s";
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return h("transition", {
|
|
99
|
-
"attrs": {
|
|
100
|
-
"appear": this.transitionAppear,
|
|
101
|
-
"name": transitionName
|
|
102
|
-
},
|
|
103
|
-
"on": {
|
|
104
|
-
"afterEnter": this.onOpened,
|
|
105
|
-
"afterLeave": this.onClosed
|
|
106
|
-
}
|
|
107
|
-
}, [h("div", {
|
|
108
|
-
"directives": [{
|
|
109
|
-
name: "show",
|
|
110
|
-
value: this.value
|
|
111
|
-
}],
|
|
112
|
-
"style": style,
|
|
113
|
-
"class": bem((_bem = {
|
|
114
|
-
round: round
|
|
115
|
-
}, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
|
|
116
|
-
"on": {
|
|
117
|
-
"click": this.onClick
|
|
118
|
-
}
|
|
119
|
-
}, [this.slots(), this.closeable && h(_icon.default, {
|
|
120
|
-
"attrs": {
|
|
121
|
-
"role": "button",
|
|
122
|
-
"tabindex": "0",
|
|
123
|
-
"name": this.closeIcon
|
|
124
|
-
},
|
|
125
|
-
"class": bem('close-icon', this.closeIconPosition),
|
|
126
|
-
"on": {
|
|
127
|
-
"click": this.onClickCloseIcon
|
|
128
|
-
}
|
|
129
|
-
})])]);
|
|
200
|
+
return this.sliderShow ? this.allowSliderRender() : this.popupRender();
|
|
130
201
|
}
|
|
131
202
|
});
|
|
132
203
|
|
package/lib/popup/index.less
CHANGED
|
@@ -13,6 +13,29 @@
|
|
|
13
13
|
transition: @popup-transition;
|
|
14
14
|
-webkit-overflow-scrolling: touch;
|
|
15
15
|
|
|
16
|
+
&__slider {
|
|
17
|
+
position: fixed;
|
|
18
|
+
width: 100%;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
border-radius: 16px 16px 0 0;
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
|
|
23
|
+
&-title {
|
|
24
|
+
height: 40px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
&-bar {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
width: 32px;
|
|
30
|
+
height: 4px;
|
|
31
|
+
transform: scaleY(-1);
|
|
32
|
+
background: rgba(45,75,115,0.20);
|
|
33
|
+
border-radius: 3px;
|
|
34
|
+
}
|
|
35
|
+
&-content {
|
|
36
|
+
overflow-y: auto;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
16
39
|
&--center {
|
|
17
40
|
top: 50%;
|
|
18
41
|
left: 50%;
|
|
@@ -101,7 +124,13 @@
|
|
|
101
124
|
&-slide-left-leave-active {
|
|
102
125
|
transform: translate3d(-100%, -50%, 0);
|
|
103
126
|
}
|
|
127
|
+
&__slider-icon{
|
|
128
|
+
z-index: @popup-close-icon-z-index;
|
|
129
|
+
color: @popup-close-icon-color;
|
|
130
|
+
font-size: @popup-close-icon-size;
|
|
131
|
+
cursor: pointer;
|
|
104
132
|
|
|
133
|
+
}
|
|
105
134
|
&__close-icon {
|
|
106
135
|
position: absolute;
|
|
107
136
|
z-index: @popup-close-icon-z-index;
|
package/lib/radio/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-radio{display:-webkit-box;display:-webkit-flex;display:flex
|
|
1
|
+
.zt-radio{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:14px 0}.zt-radio--disabled{cursor:not-allowed}.zt-radio--label-disabled{cursor:default}.zt-radio--horizontal{margin-left:12px}.zt-radio__icon{font-size:20px;cursor:pointer}.zt-radio__icon .zt-icon{display:block;box-sizing:border-box;width:1em;height:1em;color:transparent;font-size:inherit;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.zt-radio__icon--round .zt-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;border-radius:100%}.zt-radio__icon--checked .zt-icon{color:#fff;background-color:#0091fa;border:1px solid rgba(255,255,255,.5);box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.2)}.zt-radio__icon--disabled{cursor:not-allowed}.zt-radio__icon--disabled .zt-icon{background-image:-webkit-linear-gradient(316deg,#e1e6eb 0,#e5edf5 100%);background-image:linear-gradient(134deg,#e1e6eb 0,#e5edf5 100%);border:1px solid rgba(45,75,115,.08);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2)}.zt-radio__icon--disabled.zt-radio__icon--checked .zt-icon{opacity:.4;background:#0091fa;color:#fff}.zt-radio__label{margin-left:8px;color:#000;line-height:20px}.zt-radio__label--left{margin:0 8px 0 0}.zt-radio__label--disabled{color:#c8c9cc}.zt-radio__disable-icon .zt-radio__icon--round:not(.zt-radio__icon--disabled,.zt-radio__icon--checked){width:1em;height:1em;box-sizing:border-box;border-radius:100%;background-image:-webkit-linear-gradient(315deg,#e6ebf0 0,#fff 100%);background-image:linear-gradient(135deg,#e6ebf0 0,#fff 100%);border:1px solid rgba(45,75,115,.13);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2)}
|
package/lib/radio/index.less
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
.zt-radio {
|
|
4
4
|
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
5
|
overflow: hidden;
|
|
7
6
|
cursor: pointer;
|
|
8
7
|
user-select: none;
|
|
@@ -21,31 +20,25 @@
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
&__icon {
|
|
24
|
-
flex: none;
|
|
25
|
-
height: 1em;
|
|
26
23
|
font-size: @radio-size;
|
|
27
|
-
line-height: 1em;
|
|
28
24
|
cursor: pointer;
|
|
29
|
-
i, img {
|
|
30
|
-
transform: scale(0.8333);
|
|
31
|
-
transform-origin: center;
|
|
32
|
-
}
|
|
33
25
|
|
|
34
26
|
.zt-icon {
|
|
35
27
|
display: block;
|
|
36
28
|
box-sizing: border-box;
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
29
|
+
width: 1em;
|
|
30
|
+
height: 1em;
|
|
39
31
|
color: transparent;
|
|
40
|
-
font-size:
|
|
41
|
-
line-height: 1.15em;
|
|
42
|
-
text-align: center;
|
|
32
|
+
font-size: inherit;
|
|
43
33
|
transition-duration: @radio-transition-duration;
|
|
44
34
|
transition-property: color, border-color, background-color;
|
|
45
35
|
}
|
|
46
36
|
|
|
47
37
|
&--round {
|
|
48
38
|
.zt-icon {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
49
42
|
border-radius: 100%;
|
|
50
43
|
}
|
|
51
44
|
}
|
|
@@ -95,8 +88,9 @@
|
|
|
95
88
|
|
|
96
89
|
.zt-radio__disable-icon {
|
|
97
90
|
.zt-radio__icon--round:not(.zt-radio__icon--disabled,.zt-radio__icon--checked){
|
|
98
|
-
width:
|
|
99
|
-
height:
|
|
91
|
+
width: 1em;
|
|
92
|
+
height: 1em;
|
|
93
|
+
box-sizing: border-box;
|
|
100
94
|
border-radius: 100%;
|
|
101
95
|
background-image: @gradient-white-1;
|
|
102
96
|
border: 1px solid @radio-border-color;
|
package/lib/search/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:8px 16px;background-color:#
|
|
1
|
+
.zt-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:8px 16px;background-color:#f5faff}.zt-search__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:rgba(45,75,115,.04);border:1px solid transparent;border-radius:2px;box-shadow:inset 4px 4px 8px 0 rgba(45,75,115,.1);background-clip:padding-box;position:relative}.zt-search__content::before{content:'';position:absolute;top:0;right:0;left:0;bottom:0;z-index:-1;margin:-1px;border-radius:inherit;background:-webkit-linear-gradient(#fff,rgba(255,255,255,.4));background:linear-gradient(#fff,rgba(255,255,255,.4))}.zt-search__content--round{border-radius:999px}.zt-search__label{padding:8px 0 8px 12px;color:rgba(0,0,0,.6);font-family:PingFangSC-Semibold;font-weight:400;font-size:14px;line-height:20px}.zt-search .zt-field__root{background-color:transparent;padding:0}.zt-search .zt-field__label{margin-right:0}.zt-search .zt-cell__title.zt-field__label{-webkit-box-flex:unset;-webkit-flex:unset;flex:unset}.zt-search .zt-cell{-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:8px 12px;background:0 0;line-height:20px;font-size:14px;font-family:PingFangSC-Regular;font-weight:400}.zt-search .zt-cell__left-icon{color:#969799}.zt-search .zt-field{margin:0}.zt-search .zt-field__control{color:#000}.zt-search--show-action{padding-right:0}.zt-search input{caret-color:#0091fa}.zt-search input::-webkit-search-cancel-button,.zt-search input::-webkit-search-decoration,.zt-search input::-webkit-search-results-button,.zt-search input::-webkit-search-results-decoration{display:none}.zt-search input::-webkit-input-placeholder{color:rgba(45,75,115,.2)}.zt-search input::placeholder{color:rgba(45,75,115,.2)}.zt-search__action{padding:0 16px 0 12px;color:#0091fa;font-size:16px;font-family:PingFangSC-Semibold;height:28px;font-weight:600;cursor:pointer;-webkit-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-search__action:active{background-color:rgba(0,0,0,.04)}
|
package/lib/search/index.js
CHANGED
package/lib/search/index.less
CHANGED
|
@@ -11,8 +11,24 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
flex: 1;
|
|
13
13
|
background-color: @search-content-background-color;
|
|
14
|
-
border:
|
|
14
|
+
border: 1px solid transparent;
|
|
15
15
|
border-radius: @border-radius-sm;
|
|
16
|
+
box-shadow: @search-content-box-shadow;
|
|
17
|
+
background-clip: padding-box;
|
|
18
|
+
position: relative;
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
content: '';
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
right: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
z-index: -1;
|
|
28
|
+
margin: -1px;
|
|
29
|
+
border-radius: inherit;
|
|
30
|
+
background: @search-content-border-color;
|
|
31
|
+
}
|
|
16
32
|
|
|
17
33
|
&--round {
|
|
18
34
|
border-radius: @border-radius-max;
|
|
@@ -33,10 +49,18 @@
|
|
|
33
49
|
padding: 0;
|
|
34
50
|
}
|
|
35
51
|
|
|
52
|
+
.zt-field__label {
|
|
53
|
+
margin-right: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.zt-cell__title.zt-field__label {
|
|
57
|
+
flex: unset;
|
|
58
|
+
}
|
|
59
|
+
|
|
36
60
|
.zt-cell {
|
|
37
61
|
flex: 1;
|
|
38
|
-
padding:
|
|
39
|
-
background
|
|
62
|
+
padding: @search-cell-padding;
|
|
63
|
+
background: transparent;
|
|
40
64
|
line-height: @search-input-height;
|
|
41
65
|
font-size: @font-size-md;
|
|
42
66
|
font-family: PingFangSC-Regular;
|
|
@@ -66,6 +90,10 @@
|
|
|
66
90
|
display: none;
|
|
67
91
|
}
|
|
68
92
|
|
|
93
|
+
&::placeholder {
|
|
94
|
+
color: @text-color-5;
|
|
95
|
+
}
|
|
96
|
+
|
|
69
97
|
caret-color:@search-input-caret-color;
|
|
70
98
|
}
|
|
71
99
|
|
package/lib/style/var.less
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
@text-color-2: rgba(45, 75, 115, 0.8);
|
|
47
47
|
@text-color-3: #2d4b73;
|
|
48
48
|
@text-color-4: rgba(45, 75, 115, 0.4);
|
|
49
|
+
@text-color-5: rgba(45, 75, 115, 0.2);
|
|
49
50
|
@active-color: @gray-a04;
|
|
50
51
|
@active-opacity: 0.7;
|
|
51
52
|
@disabled-opacity: 0.4;
|
|
@@ -198,7 +199,7 @@
|
|
|
198
199
|
@button-border-width: @border-width-base;
|
|
199
200
|
@button-border-radius: 22px;
|
|
200
201
|
@button-round-border-radius: @border-radius-max;
|
|
201
|
-
@button-plain-background-color:
|
|
202
|
+
@button-plain-background-color: transparent;
|
|
202
203
|
@button-disabled-opacity: @disabled-opacity;
|
|
203
204
|
@button-icon-mini-size: 16px;
|
|
204
205
|
@button-icon-small-size: 20px;
|
|
@@ -270,8 +271,8 @@
|
|
|
270
271
|
|
|
271
272
|
// Cell
|
|
272
273
|
@cell-font-size: @font-size-lg;
|
|
273
|
-
@cell-line-height:
|
|
274
|
-
@cell-vertical-padding:
|
|
274
|
+
@cell-line-height: 20px;
|
|
275
|
+
@cell-vertical-padding: 12px;
|
|
275
276
|
@cell-horizontal-padding: @padding-md;
|
|
276
277
|
@cell-text-color: #2D4B73;
|
|
277
278
|
@cell-background-color: @white;
|
|
@@ -300,7 +301,7 @@
|
|
|
300
301
|
@cell-group-inset-title-padding: @padding-md @padding-md @padding-xs @padding-xl;
|
|
301
302
|
|
|
302
303
|
// Checkbox
|
|
303
|
-
@checkbox-size:
|
|
304
|
+
@checkbox-size: 20px;
|
|
304
305
|
@checkbox-padding: 14px 0;
|
|
305
306
|
@checkbox-border-color: @border-color-3;
|
|
306
307
|
@checkbox-transition-duration: @animation-duration-fast;
|
|
@@ -475,9 +476,10 @@
|
|
|
475
476
|
@field-text-area-min-height: 60px;
|
|
476
477
|
@field-word-limit-color: @gray-7;
|
|
477
478
|
@field-word-limit-font-size: @font-size-sm;
|
|
478
|
-
@field-word-limit-line-height:
|
|
479
|
+
@field-word-limit-line-height: 20px;
|
|
479
480
|
@field-disabled-text-color: @gray-5;
|
|
480
481
|
@field-zt-icon-size: 20px;
|
|
482
|
+
@field-zt-icon-color: rgba(45, 75, 115, .4);
|
|
481
483
|
|
|
482
484
|
// GridItem
|
|
483
485
|
@grid-item-content-padding: @padding-md @padding-xs;
|
|
@@ -729,8 +731,8 @@
|
|
|
729
731
|
@pull-refresh-head-text-color: @gray-6;
|
|
730
732
|
|
|
731
733
|
// Radio
|
|
732
|
-
@radio-size:
|
|
733
|
-
@radio-padding:
|
|
734
|
+
@radio-size: 20px;
|
|
735
|
+
@radio-padding: 14px 0;
|
|
734
736
|
@radio-border-color: @border-color-3;
|
|
735
737
|
@radio-transition-duration: @animation-duration-fast;
|
|
736
738
|
@radio-label-margin: @padding-xs;
|
|
@@ -767,18 +769,21 @@
|
|
|
767
769
|
|
|
768
770
|
// Search
|
|
769
771
|
@search-padding: 8px @padding-md;
|
|
770
|
-
@search-background-color: @
|
|
771
|
-
@search-content-background-color:
|
|
772
|
+
@search-background-color: @gray-9;
|
|
773
|
+
@search-content-background-color: rgba(45,75,115,0.04);
|
|
774
|
+
@search-content-box-shadow: inset 4px 4px 8px 0 rgba(45,75,115,0.10);
|
|
775
|
+
@search-content-border-color: linear-gradient(#fff, rgba(255, 255, 255, 0.4));
|
|
772
776
|
@search-input-height: 20px;
|
|
773
|
-
@search-label-padding:
|
|
777
|
+
@search-label-padding: 8px 0 8px 12px;
|
|
774
778
|
@search-label-color: @text-color;
|
|
775
779
|
@search-label-font-size: @font-size-md;
|
|
776
780
|
@search-left-icon-color: @gray-6;
|
|
777
|
-
@search-action-padding: 0 @padding-md;
|
|
781
|
+
@search-action-padding: 0 @padding-md 0 @padding-sm;
|
|
778
782
|
@search-action-text-color: @blue;
|
|
779
783
|
@search-action-font-size: @font-size-lg;
|
|
780
784
|
@search-action-height: 28px;
|
|
781
785
|
@search-input-caret-color: #0091FA;
|
|
786
|
+
@search-cell-padding: 8px 12px;
|
|
782
787
|
|
|
783
788
|
// Sidebar
|
|
784
789
|
@sidebar-width: 80px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-switch-cell{padding-top:
|
|
1
|
+
.zt-switch-cell{padding-top:11px;padding-bottom:11px}.zt-switch-cell--large{padding-top:11px;padding-bottom:11px}.zt-switch-cell .zt-switch{float:right}
|