zartui 0.1.44 → 0.1.45
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/dialog/index.css +1 -1
- package/es/dialog/index.less +0 -1
- package/es/index.js +1 -1
- package/es/pdf-viewer/index.less +68 -68
- package/es/slider/index.css +1 -1
- package/es/slider/index.js +2 -1
- package/es/slider/index.less +0 -1
- package/es/sticky/index.js +67 -16
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.js +12 -1
- package/es/swipe/index.less +7 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +5 -3
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.less +0 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/pdf-viewer/index.less +68 -68
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.js +2 -1
- package/lib/slider/index.less +0 -1
- package/lib/sticky/index.js +67 -16
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.js +12 -1
- package/lib/swipe/index.less +7 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +5 -3
- package/lib/zart.js +82 -19
- package/lib/zart.min.js +4 -4
- package/package.json +1 -1
package/es/dialog/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;
|
|
1
|
+
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content--isolated{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:100px}.zt-dialog__message{-webkit-box-flex:1;-webkit-flex:1;flex:1;max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel,.zt-dialog__confirm{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm,.zt-dialog__confirm:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
package/es/dialog/index.less
CHANGED
package/es/index.js
CHANGED
|
@@ -59,7 +59,7 @@ import Tabs from './tabs';
|
|
|
59
59
|
import Tag from './tag';
|
|
60
60
|
import Toast from './toast';
|
|
61
61
|
import Uploader from './uploader';
|
|
62
|
-
var version = '0.1.
|
|
62
|
+
var version = '0.1.45';
|
|
63
63
|
|
|
64
64
|
function install(Vue) {
|
|
65
65
|
var components = [ActionSheet, Area, Avatar, Badge, Button, Calendar, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Icon, Image, ImagePreview, Info, Lazyload, Loading, Locale, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, Picker, Popup, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, Uploader];
|
package/es/pdf-viewer/index.less
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
@import '../style/var';
|
|
2
|
-
.zt-pdf-viewer {
|
|
3
|
-
background-color: #fff !important;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
.zt-pdf-viewer__loading {
|
|
7
|
-
position: fixed;
|
|
8
|
-
top: 50%;
|
|
9
|
-
left: 50%;
|
|
10
|
-
margin-left: -15px;
|
|
11
|
-
margin-top: -15px;
|
|
12
|
-
}
|
|
13
|
-
.zt-pdf-viewer__pdf-top {
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
height: 44px;
|
|
18
|
-
background-color: #FFF;
|
|
19
|
-
flex-wrap: wrap;
|
|
20
|
-
padding: 0 10px;
|
|
21
|
-
position: fixed;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
padding-bottom: constant(safe-area-inset-bottom);
|
|
24
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
25
|
-
left: 0;
|
|
26
|
-
width: calc(100% - 20px);
|
|
27
|
-
z-index: 9;
|
|
28
|
-
.zt-pdf-viewer__page-btn {
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
flex: 1;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
}
|
|
34
|
-
.zt-pdf-viewer__rotate-btn {
|
|
35
|
-
flex: 1;
|
|
36
|
-
.zt-pdf-viewer__rotate-btn__icon {
|
|
37
|
-
display: block;
|
|
38
|
-
margin: auto;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
.zt-pdf-viewer__handle-btn {
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
border: none;
|
|
44
|
-
outline: none;
|
|
45
|
-
color: #0091fa;
|
|
46
|
-
}
|
|
47
|
-
.zt-pdf-viewer__page-count {
|
|
48
|
-
margin: 0 10px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.zt-pdf-viewer__page-margin {
|
|
52
|
-
height: 16px;
|
|
53
|
-
background: rgba(0,0,0,.1);
|
|
54
|
-
}
|
|
55
|
-
.zt-pdf-viewer__popup {
|
|
56
|
-
padding: 10px 0;
|
|
57
|
-
max-height: 70%;
|
|
58
|
-
.zt-pdf-viewer__page-item {
|
|
59
|
-
height: 30px;
|
|
60
|
-
line-height: 30px;
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
text-align: center;
|
|
63
|
-
border-bottom: 1px solid rgba(0,0,0,.1);
|
|
64
|
-
&:last-child {
|
|
65
|
-
border: none;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
.zt-pdf-viewer {
|
|
3
|
+
background-color: #fff !important;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
.zt-pdf-viewer__loading {
|
|
7
|
+
position: fixed;
|
|
8
|
+
top: 50%;
|
|
9
|
+
left: 50%;
|
|
10
|
+
margin-left: -15px;
|
|
11
|
+
margin-top: -15px;
|
|
12
|
+
}
|
|
13
|
+
.zt-pdf-viewer__pdf-top {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
height: 44px;
|
|
18
|
+
background-color: #FFF;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
padding: 0 10px;
|
|
21
|
+
position: fixed;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
24
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
25
|
+
left: 0;
|
|
26
|
+
width: calc(100% - 20px);
|
|
27
|
+
z-index: 9;
|
|
28
|
+
.zt-pdf-viewer__page-btn {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
flex: 1;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
}
|
|
34
|
+
.zt-pdf-viewer__rotate-btn {
|
|
35
|
+
flex: 1;
|
|
36
|
+
.zt-pdf-viewer__rotate-btn__icon {
|
|
37
|
+
display: block;
|
|
38
|
+
margin: auto;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.zt-pdf-viewer__handle-btn {
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
border: none;
|
|
44
|
+
outline: none;
|
|
45
|
+
color: #0091fa;
|
|
46
|
+
}
|
|
47
|
+
.zt-pdf-viewer__page-count {
|
|
48
|
+
margin: 0 10px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.zt-pdf-viewer__page-margin {
|
|
52
|
+
height: 16px;
|
|
53
|
+
background: rgba(0,0,0,.1);
|
|
54
|
+
}
|
|
55
|
+
.zt-pdf-viewer__popup {
|
|
56
|
+
padding: 10px 0;
|
|
57
|
+
max-height: 70%;
|
|
58
|
+
.zt-pdf-viewer__page-item {
|
|
59
|
+
height: 30px;
|
|
60
|
+
line-height: 30px;
|
|
61
|
+
font-size: 16px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
border-bottom: 1px solid rgba(0,0,0,.1);
|
|
64
|
+
&:last-child {
|
|
65
|
+
border: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
69
|
}
|
package/es/slider/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-slider__container{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-slider__container .zt-slider__progress{-webkit-box-flex:3;-webkit-flex:3;flex:3;text-align:center;font-size:14px}.zt-slider__container .zt-slider__title{-webkit-box-flex:2;-webkit-flex:2;flex:2;text-align:left;font-size:14px;font-weight:700}.zt-slider__container .zt-slider{position:relative;width:100%;height:4px;background-color:#ebedf0;cursor:pointer;-webkit-box-flex:10;-webkit-flex:10;flex:10
|
|
1
|
+
.zt-slider__container{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-slider__container .zt-slider__progress{-webkit-box-flex:3;-webkit-flex:3;flex:3;text-align:center;font-size:14px}.zt-slider__container .zt-slider__title{-webkit-box-flex:2;-webkit-flex:2;flex:2;text-align:left;font-size:14px;font-weight:700}.zt-slider__container .zt-slider{position:relative;width:100%;height:4px;background-color:#ebedf0;cursor:pointer;-webkit-box-flex:10;-webkit-flex:10;flex:10}.zt-slider__container .zt-slider::before{position:absolute;top:-8px;right:0;bottom:-8px;left:0;content:''}.zt-slider__container .zt-slider__bar{position:relative;width:100%;height:100%;background-color:#0091fa;border-radius:inherit;-webkit-transition:all .2s;transition:all .2s}.zt-slider__container .zt-slider__button{width:24px;height:24px;background-color:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.5)}.zt-slider__container .zt-slider__button-wrapper,.zt-slider__container .zt-slider__button-wrapper-right{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0);cursor:grab}.zt-slider__container .zt-slider__button-wrapper-left{position:absolute;top:50%;left:0;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);cursor:grab}.zt-slider__container .zt-slider--disabled{cursor:not-allowed;opacity:.4}.zt-slider__container .zt-slider--disabled .zt-slider__button-wrapper,.zt-slider__container .zt-slider--disabled .zt-slider__button-wrapper-left,.zt-slider__container .zt-slider--disabled .zt-slider__button-wrapper-right{cursor:not-allowed}.zt-slider__container .zt-slider--vertical{display:inline-block;width:4px;height:100%}.zt-slider__container .zt-slider--vertical .zt-slider__button-wrapper,.zt-slider__container .zt-slider--vertical .zt-slider__button-wrapper-right{top:auto;right:50%;bottom:0;-webkit-transform:translate3d(50%,50%,0);transform:translate3d(50%,50%,0)}.zt-slider__container .zt-slider--vertical .zt-slider__button-wrapper-left{top:0;right:50%;left:auto;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.zt-slider__container .zt-slider--vertical::before{top:0;right:-8px;bottom:0;left:-8px}
|
package/es/slider/index.js
CHANGED
|
@@ -217,7 +217,8 @@ export default createComponent({
|
|
|
217
217
|
|
|
218
218
|
if (range) {
|
|
219
219
|
return (value[1] - value[0]) * 100 / scope + "%";
|
|
220
|
-
}
|
|
220
|
+
} // return `calc(${((value - min) * 100) / scope}% + 12px - ${24 * (value - min) / scope}px)` ;
|
|
221
|
+
|
|
221
222
|
|
|
222
223
|
return (value - min) * 100 / scope + "%";
|
|
223
224
|
}; // 计算选中条的开始位置的偏移量
|
package/es/slider/index.less
CHANGED
package/es/sticky/index.js
CHANGED
|
@@ -53,6 +53,14 @@ export default createComponent({
|
|
|
53
53
|
scrollSpeed: {
|
|
54
54
|
type: [Number, String],
|
|
55
55
|
default: 20
|
|
56
|
+
},
|
|
57
|
+
delayTime: {
|
|
58
|
+
type: [Number, String],
|
|
59
|
+
default: 300
|
|
60
|
+
},
|
|
61
|
+
pc: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
56
64
|
}
|
|
57
65
|
},
|
|
58
66
|
data: function data() {
|
|
@@ -65,7 +73,9 @@ export default createComponent({
|
|
|
65
73
|
overpx: 0,
|
|
66
74
|
refreshtopToPageTop: null,
|
|
67
75
|
touchOn: false,
|
|
68
|
-
refreshOffsetTop: null
|
|
76
|
+
refreshOffsetTop: null,
|
|
77
|
+
t1: 0,
|
|
78
|
+
t2: 0
|
|
69
79
|
};
|
|
70
80
|
},
|
|
71
81
|
computed: {
|
|
@@ -100,14 +110,14 @@ export default createComponent({
|
|
|
100
110
|
}
|
|
101
111
|
},
|
|
102
112
|
created: function created() {
|
|
103
|
-
var
|
|
113
|
+
var _this2 = this;
|
|
104
114
|
|
|
105
115
|
// compatibility: https://caniuse.com/#feat=intersectionobserver
|
|
106
116
|
if (!isServer && window.IntersectionObserver) {
|
|
107
117
|
this.observer = new IntersectionObserver(function (entries) {
|
|
108
118
|
// trigger scroll when visibility changed
|
|
109
119
|
if (entries[0].intersectionRatio > 0) {
|
|
110
|
-
|
|
120
|
+
_this2.onScroll();
|
|
111
121
|
}
|
|
112
122
|
}, {
|
|
113
123
|
root: document.body
|
|
@@ -119,33 +129,36 @@ export default createComponent({
|
|
|
119
129
|
},
|
|
120
130
|
methods: {
|
|
121
131
|
onScroll: function onScroll() {
|
|
122
|
-
var
|
|
132
|
+
var _this3 = this;
|
|
123
133
|
|
|
124
134
|
// if(!this.overScroll&&this.refresh){
|
|
125
135
|
// return
|
|
126
136
|
// }
|
|
137
|
+
var container = this.container,
|
|
138
|
+
offsetTopPx = this.offsetTopPx;
|
|
139
|
+
|
|
127
140
|
if (isHidden(this.$el)) {
|
|
128
141
|
return;
|
|
129
142
|
}
|
|
130
143
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
144
|
+
setTimeout(function () {
|
|
145
|
+
if (_this3.refresh && _this3.refreshtopToPageTop === null) {
|
|
146
|
+
_this3.refreshtopToPageTop = getElementTop(_this3.$el);
|
|
147
|
+
}
|
|
148
|
+
}, 500);
|
|
134
149
|
|
|
135
150
|
if (this.refresh && this.refreshOffsetTop === null) {
|
|
136
151
|
this.refreshOffsetTop = this.offsetTopPx;
|
|
137
152
|
}
|
|
138
153
|
|
|
139
154
|
this.height = this.$el.offsetHeight;
|
|
140
|
-
var container = this.container,
|
|
141
|
-
offsetTopPx = this.offsetTopPx;
|
|
142
155
|
var scrollTop = getScrollTop(window);
|
|
143
156
|
var topToPageTop = getElementTop(this.$el);
|
|
144
157
|
|
|
145
158
|
var emitScrollEvent = function emitScrollEvent() {
|
|
146
|
-
|
|
159
|
+
_this3.$emit('scroll', {
|
|
147
160
|
scrollTop: scrollTop,
|
|
148
|
-
isFixed:
|
|
161
|
+
isFixed: _this3.fixed
|
|
149
162
|
});
|
|
150
163
|
};
|
|
151
164
|
|
|
@@ -180,6 +193,44 @@ export default createComponent({
|
|
|
180
193
|
this.fixed = false;
|
|
181
194
|
}
|
|
182
195
|
|
|
196
|
+
if (this.refresh && this.pc && !this.touchOn) {
|
|
197
|
+
this.t1 = getScrollTop(window);
|
|
198
|
+
clearTimeout(this.timer);
|
|
199
|
+
|
|
200
|
+
var _this = this;
|
|
201
|
+
|
|
202
|
+
this.timer = setTimeout(function () {
|
|
203
|
+
_this.t2 = getScrollTop(window);
|
|
204
|
+
|
|
205
|
+
if (!_this.autoScroll) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
var currentY = document.documentElement.scrollTop || document.body.scrollTop;
|
|
210
|
+
|
|
211
|
+
if (_this.refresh && !_this.fixed && getScrollTop(window) > _this.refreshtopToPageTop * _this.updownPercent / 100) {
|
|
212
|
+
_this.scrollAnimation(currentY, _this.refreshtopToPageTop - _this.refreshOffsetTop, true);
|
|
213
|
+
|
|
214
|
+
_this.touchOn = false;
|
|
215
|
+
return;
|
|
216
|
+
} else if (_this.refresh && !_this.fixed && getScrollTop(window) <= _this.refreshtopToPageTop * _this.updownPercent / 100) {
|
|
217
|
+
_this.scrollAnimation(currentY, 0, false);
|
|
218
|
+
|
|
219
|
+
_this.touchOn = false;
|
|
220
|
+
return;
|
|
221
|
+
} else if (_this.refresh && _this.fixed && currentY < _this.refreshtopToPageTop - _this.offsetTopPx) {
|
|
222
|
+
_this.$emit('refleshcallback');
|
|
223
|
+
|
|
224
|
+
_this.scrollAnimation(currentY, _this.refreshtopToPageTop - _this.refreshOffsetTop, true);
|
|
225
|
+
|
|
226
|
+
_this.touchOn = false;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
_this.touchOn = false;
|
|
231
|
+
}, _this.delayTime);
|
|
232
|
+
}
|
|
233
|
+
|
|
183
234
|
emitScrollEvent();
|
|
184
235
|
},
|
|
185
236
|
onTouchStart: function onTouchStart(event) {
|
|
@@ -230,7 +281,7 @@ export default createComponent({
|
|
|
230
281
|
}
|
|
231
282
|
},
|
|
232
283
|
scrollAnimation: function scrollAnimation(currentY, targetY, lockfixed) {
|
|
233
|
-
var
|
|
284
|
+
var _this4 = this;
|
|
234
285
|
|
|
235
286
|
// 获取当前位置方法
|
|
236
287
|
// 计算需要移动的距离
|
|
@@ -238,15 +289,15 @@ export default createComponent({
|
|
|
238
289
|
var _currentY = currentY;
|
|
239
290
|
setTimeout(function () {
|
|
240
291
|
// 一次调用滑动帧数,每次调用会不一样
|
|
241
|
-
var dist = Math.ceil(needScrollTop /
|
|
292
|
+
var dist = Math.ceil(needScrollTop / _this4.scrollSpeed);
|
|
242
293
|
_currentY += dist;
|
|
243
294
|
window.scrollTo(_currentY, currentY); // 如果移动幅度小于十个像素,直接移动,否则递归调用,实现动画效果
|
|
244
295
|
|
|
245
|
-
if (needScrollTop >
|
|
246
|
-
|
|
296
|
+
if (needScrollTop > _this4.scrollSpeed || needScrollTop < -_this4.scrollSpeed) {
|
|
297
|
+
_this4.scrollAnimation(_currentY, targetY, lockfixed);
|
|
247
298
|
} else {
|
|
248
299
|
window.scrollTo(_currentY, targetY);
|
|
249
|
-
|
|
300
|
+
_this4.lockfixed = lockfixed;
|
|
250
301
|
}
|
|
251
302
|
}, 1);
|
|
252
303
|
}
|
package/es/swipe/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-swipe{position:relative;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.zt-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.zt-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.zt-swipe__indicators{position:absolute;bottom:20px;right:16px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.zt-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.zt-swipe__indicators--vertical .zt-swipe__indicator:not(:last-child){margin-bottom:4px}.zt-swipe__indicator{width:4px;height:4px;background-color:rgba(0,0,0,.6);border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.zt-swipe__indicator:not(:last-child){margin-right:4px}.zt-swipe__indicator--active{background-color:#fff;opacity:1}.zt-swipe__title{position:absolute;bottom:12px;left:16px;line-height:20px;font-size:16px;color:#fff;z-index:999}
|
|
1
|
+
.zt-swipe{position:relative;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.zt-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.zt-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.zt-swipe__foot{background-image:-webkit-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.6));background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.6));height:44px;position:absolute;bottom:0;width:100%}.zt-swipe__indicators{position:absolute;bottom:20px;right:16px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.zt-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.zt-swipe__indicators--vertical .zt-swipe__indicator:not(:last-child){margin-bottom:4px}.zt-swipe__indicator{width:4px;height:4px;background-color:rgba(0,0,0,.6);border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.zt-swipe__indicator:not(:last-child){margin-right:4px}.zt-swipe__indicator--active{background-color:#fff;opacity:1}.zt-swipe__title{position:absolute;bottom:12px;left:16px;line-height:20px;font-size:16px;color:#fff;z-index:999}
|
package/es/swipe/index.js
CHANGED
|
@@ -409,6 +409,17 @@ export default createComponent({
|
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
},
|
|
412
|
+
foot: function foot() {
|
|
413
|
+
var h = this.$createElement;
|
|
414
|
+
|
|
415
|
+
if (this.title) {
|
|
416
|
+
return h("div", {
|
|
417
|
+
"class": bem('foot')
|
|
418
|
+
}, [this.titleDiv(), this.genIndicator()]);
|
|
419
|
+
} else {
|
|
420
|
+
return h("div", [this.titleDiv(), this.genIndicator()]);
|
|
421
|
+
}
|
|
422
|
+
},
|
|
412
423
|
genIndicator: function genIndicator() {
|
|
413
424
|
var _this5 = this;
|
|
414
425
|
|
|
@@ -447,6 +458,6 @@ export default createComponent({
|
|
|
447
458
|
"class": bem('track', {
|
|
448
459
|
vertical: this.vertical
|
|
449
460
|
})
|
|
450
|
-
}, [this.slots()]), this.
|
|
461
|
+
}, [this.slots()]), this.foot()]);
|
|
451
462
|
}
|
|
452
463
|
});
|
package/es/swipe/index.less
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
&__foot{
|
|
18
|
+
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.6));
|
|
19
|
+
height: 44px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
bottom:0;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
18
24
|
&__indicators {
|
|
19
25
|
position: absolute;
|
|
20
26
|
bottom: @swipe-indicator-bottom;
|
package/es/tabs/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-tab{position:relative;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;box-sizing:border-box;padding:0 4px;color:#646566;font-size:14px;line-height:20px;cursor:pointer}.zt-tab--active{color:rgba(0,0,0,.6);font-weight:700}.zt-tab--disabled{color:#c8c9cc;cursor:not-allowed}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper{position:relative}.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__wrap--scrollable .zt-tab{-webkit-box-flex:1;-webkit-flex:1 0 auto;flex:1 0 auto;padding:0 12px}.zt-tabs__wrap--scrollable .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__wrap--scrollable .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.zt-tabs__nav--line.zt-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt-tabs__nav--card{box-sizing:border-box;height:30px;margin:0 16px;border:1px solid
|
|
1
|
+
.zt-tab{position:relative;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;box-sizing:border-box;padding:0 4px;color:#646566;font-size:14px;line-height:20px;cursor:pointer}.zt-tab--active{color:rgba(0,0,0,.6);font-weight:700}.zt-tab--disabled{color:#c8c9cc;cursor:not-allowed}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper{position:relative}.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__wrap--scrollable .zt-tab{-webkit-box-flex:1;-webkit-flex:1 0 auto;flex:1 0 auto;padding:0 12px}.zt-tabs__wrap--scrollable .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__wrap--scrollable .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.zt-tabs__nav--line.zt-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt-tabs__nav--card{box-sizing:border-box;height:30px;margin:0 16px;border:1px solid rgba(0,0,0,.2);border-radius:2px}.zt-tabs__nav--card .zt-tab{color:#000;border-right:1px solid rgba(0,0,0,.2)}.zt-tabs__nav--card .zt-tab:last-child{border-right:none}.zt-tabs__nav--card .zt-tab.zt-tab--active{color:#fff;background-color:#0091fa;border:1px solid #0091fa}.zt-tabs__nav--card .zt-tab--disabled{color:#c8c9cc}.zt-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:40px;height:3px;background-color:#0091fa}.zt-tabs__track{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:44px}.zt-tabs--card>.zt-tabs__wrap{height:30px}
|
package/es/tabs/index.less
CHANGED
|
@@ -91,12 +91,13 @@
|
|
|
91
91
|
box-sizing: border-box;
|
|
92
92
|
height: @tabs-card-height;
|
|
93
93
|
margin: 0 @padding-md;
|
|
94
|
-
border: @border-width-base solid
|
|
94
|
+
border: @border-width-base solid rgba(0, 0, 0, 0.2);
|
|
95
|
+
|
|
95
96
|
border-radius: @border-radius-sm;
|
|
96
97
|
|
|
97
98
|
.zt-tab {
|
|
98
|
-
color: @
|
|
99
|
-
border-right: @border-width-base solid
|
|
99
|
+
color: @black;
|
|
100
|
+
border-right: @border-width-base solid rgba(0, 0, 0, 0.2);
|
|
100
101
|
|
|
101
102
|
&:last-child {
|
|
102
103
|
border-right: none;
|
|
@@ -105,6 +106,7 @@
|
|
|
105
106
|
&.zt-tab--active {
|
|
106
107
|
color: @white;
|
|
107
108
|
background-color: @tabs-default-color;
|
|
109
|
+
border: @border-width-base solid @tabs-default-color;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
&--disabled {
|
package/lib/dialog/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;
|
|
1
|
+
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content--isolated{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:100px}.zt-dialog__message{-webkit-box-flex:1;-webkit-flex:1;flex:1;max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel,.zt-dialog__confirm{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm,.zt-dialog__confirm:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
package/lib/dialog/index.less
CHANGED