zartui 0.1.98 → 0.1.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.js +31 -2
- package/es/dropdown-item/index.less +10 -0
- package/es/index.js +1 -1
- package/es/pdf-viewer/index.js +13 -13
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.js +31 -2
- package/lib/dropdown-item/index.less +10 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/pdf-viewer/index.js +13 -13
- package/lib/zart.js +45 -16
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt-dropdown-item .zt-cell::after{border:none}.zt-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt-dropdown-item__option--active{color:#0091fa}.zt-dropdown-item__option--active .zt-dropdown-item__icon{color:#0091fa}.zt-dropdown-item--up{top:0}.zt-dropdown-item--down{bottom:0}.zt-dropdown-item__content,.zt-dropdown-item__content.zt-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.button{width:100%;height:44px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;font-size:16px;color:#ff9623;text-align:center;padding-top:11px}.button-confirm{width:50%;background-color:#0091fa;font-family:PingFangSC-Semibold;font-weight:600;font-size:16px;color:#f5f5fa;text-align:center;padding-top:11px}
|
|
1
|
+
.zt-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt-dropdown-item .zt-cell::after{border:none}.zt-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt-dropdown-item__option--active{color:#0091fa}.zt-dropdown-item__option--active .zt-dropdown-item__icon{color:#0091fa}.zt-dropdown-item--up{top:0}.zt-dropdown-item--down{bottom:0}.zt-dropdown-item__content,.zt-dropdown-item__content.zt-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.options{position:absolute;top:0;width:100%;overflow-y:scroll}.button{position:absolute;z-index:1;width:100%;height:44px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;font-size:16px;color:#ff9623;text-align:center;padding-top:11px}.button-confirm{width:50%;background-color:#0091fa;font-family:PingFangSC-Semibold;font-weight:600;font-size:16px;color:#f5f5fa;text-align:center;padding-top:11px}
|
|
@@ -246,6 +246,22 @@ export default createComponent({
|
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
var buttonStyle;
|
|
250
|
+
var optionStyle;
|
|
251
|
+
var popupStyle;
|
|
252
|
+
|
|
253
|
+
if (this.options.length < 7) {
|
|
254
|
+
var height = this.options.length * 44;
|
|
255
|
+
var popupHeight = this.options.length * 44 + 44;
|
|
256
|
+
buttonStyle = 'top:' + (height + "px");
|
|
257
|
+
optionStyle = 'height:' + (height + "px");
|
|
258
|
+
popupStyle = "padding-left: 0px;height:" + (popupHeight + "px");
|
|
259
|
+
} else {
|
|
260
|
+
buttonStyle = 'top: 308px';
|
|
261
|
+
optionStyle = 'height: 308px';
|
|
262
|
+
popupStyle = "padding-left: 0px;height: 352px";
|
|
263
|
+
}
|
|
264
|
+
|
|
249
265
|
var style = {
|
|
250
266
|
zIndex: zIndex
|
|
251
267
|
};
|
|
@@ -279,7 +295,7 @@ export default createComponent({
|
|
|
279
295
|
"closeOnClickOverlay": closeOnClickOverlay
|
|
280
296
|
},
|
|
281
297
|
"class": bem('content'),
|
|
282
|
-
"style": this.multiSelect ?
|
|
298
|
+
"style": this.multiSelect ? popupStyle : "",
|
|
283
299
|
"on": {
|
|
284
300
|
"open": this.onOpen,
|
|
285
301
|
"close": this.onClose,
|
|
@@ -296,8 +312,21 @@ export default createComponent({
|
|
|
296
312
|
_this3.showPopup = $$v;
|
|
297
313
|
}
|
|
298
314
|
}
|
|
299
|
-
}, [
|
|
315
|
+
}, [h("div", {
|
|
316
|
+
"directives": [{
|
|
317
|
+
name: "show",
|
|
318
|
+
value: !this.multiSelect
|
|
319
|
+
}]
|
|
320
|
+
}, [Options]), h("div", {
|
|
321
|
+
"class": "options",
|
|
322
|
+
"style": optionStyle,
|
|
323
|
+
"directives": [{
|
|
324
|
+
name: "show",
|
|
325
|
+
value: this.multiSelect
|
|
326
|
+
}]
|
|
327
|
+
}, [Options]), h("div", {
|
|
300
328
|
"class": "button",
|
|
329
|
+
"style": buttonStyle,
|
|
301
330
|
"directives": [{
|
|
302
331
|
name: "show",
|
|
303
332
|
value: this.multiSelect
|
package/es/index.js
CHANGED
|
@@ -75,7 +75,7 @@ import Tag from './tag';
|
|
|
75
75
|
import Timeline from './timeline';
|
|
76
76
|
import Toast from './toast';
|
|
77
77
|
import Uploader from './uploader';
|
|
78
|
-
var version = '0.1.
|
|
78
|
+
var version = '0.1.101';
|
|
79
79
|
|
|
80
80
|
function install(Vue) {
|
|
81
81
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
package/es/pdf-viewer/index.js
CHANGED
|
@@ -30,7 +30,8 @@ var defaultData = function defaultData() {
|
|
|
30
30
|
bodyInitialMinHeight: "",
|
|
31
31
|
metaContent: "",
|
|
32
32
|
pdfScrollEvent: function pdfScrollEvent() {},
|
|
33
|
-
scrollEvent: function scrollEvent() {}
|
|
33
|
+
scrollEvent: function scrollEvent() {},
|
|
34
|
+
privateUrl: ""
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -49,6 +50,7 @@ export default createComponent({
|
|
|
49
50
|
this.getPdfNumPages();
|
|
50
51
|
},
|
|
51
52
|
activated: function activated() {
|
|
53
|
+
this.privateUrl = this.url;
|
|
52
54
|
this.recordMeta();
|
|
53
55
|
this.recordHeight();
|
|
54
56
|
this.recordScrollEvent();
|
|
@@ -61,14 +63,14 @@ export default createComponent({
|
|
|
61
63
|
this.setMeta(true);
|
|
62
64
|
this.setScrollEvent(true);
|
|
63
65
|
this.reset();
|
|
64
|
-
this.
|
|
66
|
+
this.privateUrl = "";
|
|
65
67
|
},
|
|
66
68
|
destroyed: function destroyed() {
|
|
67
69
|
this.setHeight(true);
|
|
68
70
|
this.setMeta(true);
|
|
69
71
|
this.setScrollEvent(true);
|
|
70
72
|
this.reset();
|
|
71
|
-
this.
|
|
73
|
+
this.privateUrl = "";
|
|
72
74
|
},
|
|
73
75
|
computed: {
|
|
74
76
|
// 只显示当前页前后几页的pdf
|
|
@@ -90,7 +92,10 @@ export default createComponent({
|
|
|
90
92
|
}
|
|
91
93
|
},
|
|
92
94
|
watch: {
|
|
93
|
-
url: function url() {
|
|
95
|
+
url: function url(nv) {
|
|
96
|
+
this.privateUrl = nv;
|
|
97
|
+
},
|
|
98
|
+
privateUrl: function privateUrl() {
|
|
94
99
|
this.getPdfNumPages();
|
|
95
100
|
},
|
|
96
101
|
pageNum: function pageNum(nv) {
|
|
@@ -191,13 +196,8 @@ export default createComponent({
|
|
|
191
196
|
},
|
|
192
197
|
setHeight: function setHeight(restore) {
|
|
193
198
|
if (restore) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (this.bodyInitialMinHeight) {
|
|
199
|
-
document.body.style.minHeight = this.bodyInitialMinHeight;
|
|
200
|
-
}
|
|
199
|
+
document.body.style.height = this.bodyInitialHeight;
|
|
200
|
+
document.body.style.minHeight = this.bodyInitialMinHeight;
|
|
201
201
|
} else {
|
|
202
202
|
document.body.style.height = 'auto';
|
|
203
203
|
document.body.style.minHeight = '100%';
|
|
@@ -209,12 +209,12 @@ export default createComponent({
|
|
|
209
209
|
getPdfNumPages: function getPdfNumPages() {
|
|
210
210
|
var _this5 = this;
|
|
211
211
|
|
|
212
|
-
if (!this.
|
|
212
|
+
if (!this.privateUrl) {
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
this.loading = true;
|
|
217
|
-
this.loadingTask = pdf.createLoadingTask(this.
|
|
217
|
+
this.loadingTask = pdf.createLoadingTask(this.privateUrl);
|
|
218
218
|
this.loadingTask.promise.then(function (v) {
|
|
219
219
|
_this5.pdfPageCount = v.numPages;
|
|
220
220
|
var pdfArr = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt-dropdown-item .zt-cell::after{border:none}.zt-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt-dropdown-item__option--active{color:#0091fa}.zt-dropdown-item__option--active .zt-dropdown-item__icon{color:#0091fa}.zt-dropdown-item--up{top:0}.zt-dropdown-item--down{bottom:0}.zt-dropdown-item__content,.zt-dropdown-item__content.zt-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.button{width:100%;height:44px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;font-size:16px;color:#ff9623;text-align:center;padding-top:11px}.button-confirm{width:50%;background-color:#0091fa;font-family:PingFangSC-Semibold;font-weight:600;font-size:16px;color:#f5f5fa;text-align:center;padding-top:11px}
|
|
1
|
+
.zt-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt-dropdown-item .zt-cell::after{border:none}.zt-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt-dropdown-item__option--active{color:#0091fa}.zt-dropdown-item__option--active .zt-dropdown-item__icon{color:#0091fa}.zt-dropdown-item--up{top:0}.zt-dropdown-item--down{bottom:0}.zt-dropdown-item__content,.zt-dropdown-item__content.zt-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.options{position:absolute;top:0;width:100%;overflow-y:scroll}.button{position:absolute;z-index:1;width:100%;height:44px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;font-size:16px;color:#ff9623;text-align:center;padding-top:11px}.button-confirm{width:50%;background-color:#0091fa;font-family:PingFangSC-Semibold;font-weight:600;font-size:16px;color:#f5f5fa;text-align:center;padding-top:11px}
|
|
@@ -260,6 +260,22 @@ var _default2 = createComponent({
|
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
var buttonStyle;
|
|
264
|
+
var optionStyle;
|
|
265
|
+
var popupStyle;
|
|
266
|
+
|
|
267
|
+
if (this.options.length < 7) {
|
|
268
|
+
var height = this.options.length * 44;
|
|
269
|
+
var popupHeight = this.options.length * 44 + 44;
|
|
270
|
+
buttonStyle = 'top:' + (height + "px");
|
|
271
|
+
optionStyle = 'height:' + (height + "px");
|
|
272
|
+
popupStyle = "padding-left: 0px;height:" + (popupHeight + "px");
|
|
273
|
+
} else {
|
|
274
|
+
buttonStyle = 'top: 308px';
|
|
275
|
+
optionStyle = 'height: 308px';
|
|
276
|
+
popupStyle = "padding-left: 0px;height: 352px";
|
|
277
|
+
}
|
|
278
|
+
|
|
263
279
|
var style = {
|
|
264
280
|
zIndex: zIndex
|
|
265
281
|
};
|
|
@@ -293,7 +309,7 @@ var _default2 = createComponent({
|
|
|
293
309
|
"closeOnClickOverlay": closeOnClickOverlay
|
|
294
310
|
},
|
|
295
311
|
"class": bem('content'),
|
|
296
|
-
"style": this.multiSelect ?
|
|
312
|
+
"style": this.multiSelect ? popupStyle : "",
|
|
297
313
|
"on": {
|
|
298
314
|
"open": this.onOpen,
|
|
299
315
|
"close": this.onClose,
|
|
@@ -310,8 +326,21 @@ var _default2 = createComponent({
|
|
|
310
326
|
_this3.showPopup = $$v;
|
|
311
327
|
}
|
|
312
328
|
}
|
|
313
|
-
}, [
|
|
329
|
+
}, [h("div", {
|
|
330
|
+
"directives": [{
|
|
331
|
+
name: "show",
|
|
332
|
+
value: !this.multiSelect
|
|
333
|
+
}]
|
|
334
|
+
}, [Options]), h("div", {
|
|
335
|
+
"class": "options",
|
|
336
|
+
"style": optionStyle,
|
|
337
|
+
"directives": [{
|
|
338
|
+
name: "show",
|
|
339
|
+
value: this.multiSelect
|
|
340
|
+
}]
|
|
341
|
+
}, [Options]), h("div", {
|
|
314
342
|
"class": "button",
|
|
343
|
+
"style": buttonStyle,
|
|
315
344
|
"directives": [{
|
|
316
345
|
name: "show",
|
|
317
346
|
value: this.multiSelect
|