zartui 0.1.96 → 0.1.99
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/hierarchy-select/hierarchySelect.js +10 -1
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.js +11 -1
- package/es/hierarchy-select/index.less +7 -0
- package/es/hierarchy-select/markList.js +21 -3
- package/es/index.js +4 -3
- package/es/pdf-viewer/index.js +120 -114
- package/es/timeline/index.css +1 -0
- package/es/timeline/index.js +185 -0
- package/es/timeline/index.less +130 -0
- package/es/timeline/style/index.js +4 -0
- package/es/timeline/style/less.js +4 -0
- package/lib/hierarchy-select/hierarchySelect.js +10 -1
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.js +11 -1
- package/lib/hierarchy-select/index.less +7 -0
- package/lib/hierarchy-select/markList.js +21 -3
- package/lib/index.css +1 -1
- package/lib/index.js +6 -2
- package/lib/index.less +1 -0
- package/lib/pdf-viewer/index.js +120 -114
- package/lib/timeline/index.css +1 -0
- package/lib/timeline/index.js +194 -0
- package/lib/timeline/index.less +130 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/timeline/style/less.js +4 -0
- package/lib/zart.js +350 -119
- package/lib/zart.min.js +2 -2
- package/package.json +1 -1
|
@@ -43,6 +43,10 @@ export default createComponent({
|
|
|
43
43
|
type: Boolean,
|
|
44
44
|
default: false
|
|
45
45
|
},
|
|
46
|
+
resetReplaceCancel: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
46
50
|
valueKey: {
|
|
47
51
|
type: String,
|
|
48
52
|
default: "id"
|
|
@@ -110,6 +114,9 @@ export default createComponent({
|
|
|
110
114
|
this.dataList = this.historyLayers[index + 1];
|
|
111
115
|
this.historyLayers.splice(index + 1);
|
|
112
116
|
},
|
|
117
|
+
reset: function reset() {
|
|
118
|
+
this.$emit("reset");
|
|
119
|
+
},
|
|
113
120
|
cancel: function cancel() {
|
|
114
121
|
this.$emit("cancel");
|
|
115
122
|
},
|
|
@@ -138,6 +145,7 @@ export default createComponent({
|
|
|
138
145
|
"attrs": {
|
|
139
146
|
"dataList": this.dataList,
|
|
140
147
|
"multiple": this.multiple,
|
|
148
|
+
"resetReplaceCancel": this.resetReplaceCancel,
|
|
141
149
|
"disableParent": this.disableParent,
|
|
142
150
|
"valueKey": this.valueKey,
|
|
143
151
|
"textKey": this.textKey
|
|
@@ -146,7 +154,8 @@ export default createComponent({
|
|
|
146
154
|
"clickNext": this.clickNext,
|
|
147
155
|
"selected": this.selected,
|
|
148
156
|
"cancel": this.cancel,
|
|
149
|
-
"confirm": this.confirm
|
|
157
|
+
"confirm": this.confirm,
|
|
158
|
+
"reset": this.reset
|
|
150
159
|
}
|
|
151
160
|
})])]);
|
|
152
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-hierarchy-select__popup{height:100%}.zt-hierarchy-select__popup .zt-hierarchy-select{background-color:#f5f5ff;height:100%}.zt-hierarchy-select__popup .zt-hierarchy-select__title{height:44px;position:relative;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.1)}.zt-hierarchy-select__popup .zt-hierarchy-select__title i{font-size:14px;position:absolute;left:15px;top:16px}.zt-hierarchy-select__popup .zt-hierarchy-select__title div{line-height:44px;text-align:center;font-weight:700;font-size:18px;color:#142841}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core .zt-loading{position:absolute;top:50%;left:50%;margin-left:-18px;margin-right:-18px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core__list span{height:24px;font-size:16px;font-family:PingFangSC,PingFangSC-Semibold;font-weight:600;color:#0091fa;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core__list .flex{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;padding:10px 0;background-color:#fff;margin-bottom:16px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;overflow-x:auto}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list span{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;white-space:nowrap;height:24px;font-size:16px;font-family:PingFangSC,PingFangSC-Regular;text-align:left;color:#000;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list__icon-arrow{margin:0 4px;width:20px;height:20px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__crumb-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__fill-blur{position:absolute;top:0;width:16px;height:44px;background:-webkit-gradient(linear,right top,left top,from(rgba(255,255,255,0)),to(#fff))}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__fill-blur:last-child{right:0;top:0;background:-webkit-gradient(linear,right top,left top,from(#fff),to(rgba(255,255,255,0)))}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list{background-color:#fff}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__multiple-button{margin-right:8px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__check-icon{color:#0091fa;font-size:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__uncheck-icon{width:24px;height:24px;border:1px solid rgba(0,0,0,.1);border-radius:50%}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__score-item{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:10px 0;background-color:#fff;margin-left:16px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__score-item:after{content:" ";position:absolute;bottom:0;height:1px;width:100%;background-color:rgba(0,0,0,.1);box-shadow:0 0 0 0 #000 inset}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-content{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin-right:16px;width:278px;font-size:16px;font-family:PingFangSC,PingFangSC-Regular;font-weight:400;text-align:left;color:#000;line-height:24px;word-break:break-all}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-content span{color:#0091fa}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level span{color:#0091fa}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level--disable{opacity:.2}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-icon{margin-right:4px;font-size:0;width:20px;height:20px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__result-box{position:fixed;left:0;bottom:0;background:#fff;width:100%}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__result-list{height:160px;box-shadow:0 -4px 8px 0 rgba(0,0,0,.1);border-radius:8px 8px 0 0;padding:12px 16px;font-size:14px;color:#000;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__operate-box{display:-webkit-box;display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected{border-top:1px solid rgba(0,0,0,.1);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected i{color:#0091fa;font-size:20px;margin-right:4px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected span{font-size:14px;color:rgba(0,0,0,.6)}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected span.zt-hierarchy-mark-list__blue{color:#0091fa;margin-left:8px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__line{width:1px;height:24px;background:rgba(0,0,0,.1);-webkit-transform:scaleX(.5);transform:scaleX(.5);border-top:1px solid rgba(0,0,0,.1)}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__cancel-button{width:110px;border-top:1px solid rgba(0,0,0,.1);font-size:16px;color:#000;text-align:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__confirm-button{width:110px;border-top:1px solid #0091fa;font-weight:700;font-size:16px;color:#fff;text-align:center;background:#0091fa}
|
|
1
|
+
.zt-hierarchy-select__popup{height:100%}.zt-hierarchy-select__popup .zt-hierarchy-select{background-color:#f5f5ff;height:100%}.zt-hierarchy-select__popup .zt-hierarchy-select__title{height:44px;position:relative;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.1)}.zt-hierarchy-select__popup .zt-hierarchy-select__title i{font-size:14px;position:absolute;left:15px;top:16px}.zt-hierarchy-select__popup .zt-hierarchy-select__title div{line-height:44px;text-align:center;font-weight:700;font-size:18px;color:#142841}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core .zt-loading{position:absolute;top:50%;left:50%;margin-left:-18px;margin-right:-18px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core__list span{height:24px;font-size:16px;font-family:PingFangSC,PingFangSC-Semibold;font-weight:600;color:#0091fa;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-core__list .flex{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;padding:10px 0;background-color:#fff;margin-bottom:16px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;overflow-x:auto}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list span{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;white-space:nowrap;height:24px;font-size:16px;font-family:PingFangSC,PingFangSC-Regular;text-align:left;color:#000;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__indicator-crumb-list__icon-arrow{margin:0 4px;width:20px;height:20px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__crumb-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__fill-blur{position:absolute;top:0;width:16px;height:44px;background:-webkit-gradient(linear,right top,left top,from(rgba(255,255,255,0)),to(#fff))}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-select-breadcrumb__fill-blur:last-child{right:0;top:0;background:-webkit-gradient(linear,right top,left top,from(#fff),to(rgba(255,255,255,0)))}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list{background-color:#fff}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__multiple-button{margin-right:8px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__check-icon{color:#0091fa;font-size:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__uncheck-icon{width:24px;height:24px;border:1px solid rgba(0,0,0,.1);border-radius:50%}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__score-item{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:10px 0;background-color:#fff;margin-left:16px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__score-item:after{content:" ";position:absolute;bottom:0;height:1px;width:100%;background-color:rgba(0,0,0,.1);box-shadow:0 0 0 0 #000 inset}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-content{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin-right:16px;width:278px;font-size:16px;font-family:PingFangSC,PingFangSC-Regular;font-weight:400;text-align:left;color:#000;line-height:24px;word-break:break-all}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-content span{color:#0091fa}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level span{color:#0091fa}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-level--disable{opacity:.2}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__sub-icon{margin-right:4px;font-size:0;width:20px;height:20px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__result-box{position:fixed;left:0;bottom:0;background:#fff;width:100%}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__result-list{height:160px;box-shadow:0 -4px 8px 0 rgba(0,0,0,.1);border-radius:8px 8px 0 0;padding:12px 16px;font-size:14px;color:#000;line-height:24px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__operate-box{display:-webkit-box;display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected{border-top:1px solid rgba(0,0,0,.1);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected i{color:#0091fa;font-size:20px;margin-right:4px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected span{font-size:14px;color:rgba(0,0,0,.6)}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__selected span.zt-hierarchy-mark-list__blue{color:#0091fa;margin-left:8px}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__line{width:1px;height:24px;background:rgba(0,0,0,.1);-webkit-transform:scaleX(.5);transform:scaleX(.5);border-top:1px solid rgba(0,0,0,.1)}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__reset-button{width:110px;border-top:1px solid rgba(0,0,0,.1);font-size:16px;color:#000;text-align:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__cancel-button{width:110px;border-top:1px solid rgba(0,0,0,.1);font-size:16px;color:#000;text-align:center}.zt-hierarchy-select__popup .zt-hierarchy-select .zt-hierarchy-mark-list__confirm-button{width:110px;border-top:1px solid #0091fa;font-weight:700;font-size:16px;color:#fff;text-align:center;background:#0091fa}
|
|
@@ -52,6 +52,10 @@ export default createComponent({
|
|
|
52
52
|
customCancel: {
|
|
53
53
|
type: Boolean,
|
|
54
54
|
default: false
|
|
55
|
+
},
|
|
56
|
+
resetReplaceCancel: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
data: function data() {
|
|
@@ -69,6 +73,10 @@ export default createComponent({
|
|
|
69
73
|
hide: function hide() {
|
|
70
74
|
this.showPicker = false;
|
|
71
75
|
},
|
|
76
|
+
reset: function reset() {
|
|
77
|
+
this.$emit("reset");
|
|
78
|
+
this.hide();
|
|
79
|
+
},
|
|
72
80
|
cancel: function cancel() {
|
|
73
81
|
if (this.customCancel) {
|
|
74
82
|
this.$emit("cancel");
|
|
@@ -117,6 +125,7 @@ export default createComponent({
|
|
|
117
125
|
"treeData": this.treeData,
|
|
118
126
|
"disableParent": this.disableParent,
|
|
119
127
|
"asyncGetter": this.asyncGetter,
|
|
128
|
+
"resetReplaceCancel": this.resetReplaceCancel,
|
|
120
129
|
"multiple": this.multiple,
|
|
121
130
|
"valueKey": this.valueKey,
|
|
122
131
|
"textKey": this.textKey,
|
|
@@ -125,7 +134,8 @@ export default createComponent({
|
|
|
125
134
|
"on": {
|
|
126
135
|
"selected": this.onSelected,
|
|
127
136
|
"cancel": this.cancel,
|
|
128
|
-
"confirm": this.confirm
|
|
137
|
+
"confirm": this.confirm,
|
|
138
|
+
"reset": this.reset
|
|
129
139
|
}
|
|
130
140
|
})])]);
|
|
131
141
|
}
|
|
@@ -211,6 +211,13 @@
|
|
|
211
211
|
transform: scaleX(0.5);
|
|
212
212
|
border-top: 1px solid rgba(0,0,0,.1);
|
|
213
213
|
}
|
|
214
|
+
&__reset-button {
|
|
215
|
+
width: 110px;
|
|
216
|
+
border-top: 1px solid rgba(0,0,0,.1);
|
|
217
|
+
font-size: 16px;
|
|
218
|
+
color: #000000;
|
|
219
|
+
text-align: center;
|
|
220
|
+
}
|
|
214
221
|
&__cancel-button {
|
|
215
222
|
width: 110px;
|
|
216
223
|
border-top: 1px solid rgba(0,0,0,.1);
|
|
@@ -25,6 +25,10 @@ export default createComponent({
|
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: false
|
|
27
27
|
},
|
|
28
|
+
resetReplaceCancel: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
28
32
|
valueKey: {
|
|
29
33
|
type: String,
|
|
30
34
|
default: "id"
|
|
@@ -60,9 +64,6 @@ export default createComponent({
|
|
|
60
64
|
this.choosedValue = item[this.valueKey];
|
|
61
65
|
this.$emit('selected', item);
|
|
62
66
|
},
|
|
63
|
-
reset: function reset() {
|
|
64
|
-
this.choosedValue = "";
|
|
65
|
-
},
|
|
66
67
|
getMultipleDom: function getMultipleDom(item) {
|
|
67
68
|
var h = this.$createElement;
|
|
68
69
|
return this.getChecked(item) ? h(Icon, {
|
|
@@ -149,6 +150,10 @@ export default createComponent({
|
|
|
149
150
|
},
|
|
150
151
|
confirm: function confirm() {
|
|
151
152
|
this.$emit("confirm", this.checkedList);
|
|
153
|
+
},
|
|
154
|
+
reset: function reset() {
|
|
155
|
+
this.checkedList = [];
|
|
156
|
+
this.$emit("reset");
|
|
152
157
|
}
|
|
153
158
|
},
|
|
154
159
|
render: function render(h) {
|
|
@@ -210,6 +215,19 @@ export default createComponent({
|
|
|
210
215
|
}, [this.checkedList.length])]), h("div", {
|
|
211
216
|
"class": bem("line")
|
|
212
217
|
}), h("div", {
|
|
218
|
+
"directives": [{
|
|
219
|
+
name: "show",
|
|
220
|
+
value: this.resetReplaceCancel
|
|
221
|
+
}],
|
|
222
|
+
"class": bem("reset-button"),
|
|
223
|
+
"on": {
|
|
224
|
+
"click": this.reset
|
|
225
|
+
}
|
|
226
|
+
}, ["\u91CD\u7F6E"]), h("div", {
|
|
227
|
+
"directives": [{
|
|
228
|
+
name: "show",
|
|
229
|
+
value: !this.resetReplaceCancel
|
|
230
|
+
}],
|
|
213
231
|
"class": bem("cancel-button"),
|
|
214
232
|
"on": {
|
|
215
233
|
"click": this.cancel
|
package/es/index.js
CHANGED
|
@@ -72,12 +72,13 @@ import TabbarItem from './tabbar-item';
|
|
|
72
72
|
import Table from './table';
|
|
73
73
|
import Tabs from './tabs';
|
|
74
74
|
import Tag from './tag';
|
|
75
|
+
import Timeline from './timeline';
|
|
75
76
|
import Toast from './toast';
|
|
76
77
|
import Uploader from './uploader';
|
|
77
|
-
var version = '0.1.
|
|
78
|
+
var version = '0.1.99';
|
|
78
79
|
|
|
79
80
|
function install(Vue) {
|
|
80
|
-
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, 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, Toast, Uploader];
|
|
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];
|
|
81
82
|
components.forEach(function (item) {
|
|
82
83
|
if (item.install) {
|
|
83
84
|
Vue.use(item);
|
|
@@ -91,7 +92,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
91
92
|
install(window.Vue);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
export { install, version, 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, Toast, Uploader };
|
|
95
|
+
export { install, version, 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 };
|
|
95
96
|
export default {
|
|
96
97
|
install: install,
|
|
97
98
|
version: version
|
package/es/pdf-viewer/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _methods;
|
|
2
|
-
|
|
3
1
|
import { createNamespace } from '../utils';
|
|
4
2
|
|
|
5
3
|
var _createNamespace = createNamespace('pdf-viewer'),
|
|
@@ -31,7 +29,7 @@ var defaultData = function defaultData() {
|
|
|
31
29
|
bodyInitialHeight: "",
|
|
32
30
|
bodyInitialMinHeight: "",
|
|
33
31
|
metaContent: "",
|
|
34
|
-
|
|
32
|
+
pdfScrollEvent: function pdfScrollEvent() {},
|
|
35
33
|
scrollEvent: function scrollEvent() {}
|
|
36
34
|
};
|
|
37
35
|
};
|
|
@@ -125,7 +123,7 @@ export default createComponent({
|
|
|
125
123
|
}
|
|
126
124
|
}
|
|
127
125
|
},
|
|
128
|
-
methods:
|
|
126
|
+
methods: {
|
|
129
127
|
recordScrollEvent: function recordScrollEvent() {
|
|
130
128
|
this.scrollEvent = window.onscroll;
|
|
131
129
|
},
|
|
@@ -135,9 +133,9 @@ export default createComponent({
|
|
|
135
133
|
if (restore) {
|
|
136
134
|
window.onscroll = this.scrollEvent;
|
|
137
135
|
} else {
|
|
138
|
-
if (this.
|
|
136
|
+
if (this.pdfScrollEvent) {
|
|
139
137
|
window.onscroll = function () {
|
|
140
|
-
_this3.
|
|
138
|
+
_this3.pdfScrollEvent();
|
|
141
139
|
};
|
|
142
140
|
}
|
|
143
141
|
}
|
|
@@ -193,13 +191,8 @@ export default createComponent({
|
|
|
193
191
|
},
|
|
194
192
|
setHeight: function setHeight(restore) {
|
|
195
193
|
if (restore) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (this.bodyInitialMinHeight) {
|
|
201
|
-
document.body.style.minHeight = this.bodyInitialMinHeight;
|
|
202
|
-
}
|
|
194
|
+
document.body.style.height = this.bodyInitialHeight;
|
|
195
|
+
document.body.style.minHeight = this.bodyInitialMinHeight;
|
|
203
196
|
} else {
|
|
204
197
|
document.body.style.height = 'auto';
|
|
205
198
|
document.body.style.minHeight = '100%';
|
|
@@ -230,120 +223,133 @@ export default createComponent({
|
|
|
230
223
|
_this5.pageNum = 1;
|
|
231
224
|
_this5.pdfArr = pdfArr;
|
|
232
225
|
|
|
233
|
-
_this5.
|
|
226
|
+
_this5.buildPdfScrollEvent();
|
|
234
227
|
}).catch(function (err) {
|
|
235
228
|
console.error("pdf 加载失败", err);
|
|
236
229
|
}).finally(function () {
|
|
237
230
|
_this5.loading = false;
|
|
238
231
|
});
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
232
|
+
},
|
|
233
|
+
buildPdfScrollEvent: function buildPdfScrollEvent() {
|
|
234
|
+
var _this6 = this;
|
|
235
|
+
|
|
236
|
+
this.pdfScrollEvent = window.onscroll = _.throttle(function () {
|
|
237
|
+
if (_this6.pageChangeByButton) {
|
|
238
|
+
_this6.pageChangeByButton = false;
|
|
239
|
+
} else {
|
|
240
|
+
_this6.changePage();
|
|
241
|
+
}
|
|
242
|
+
}, 1000);
|
|
243
|
+
},
|
|
244
|
+
changePage: function changePage() {
|
|
245
|
+
if (window.pageYOffset === 0) {
|
|
246
|
+
this.pageNum = 1;
|
|
247
|
+
return;
|
|
248
248
|
}
|
|
249
|
-
}, 1000);
|
|
250
|
-
}, _methods.changePage = function changePage() {
|
|
251
|
-
if (window.pageYOffset === 0) {
|
|
252
|
-
this.pageNum = 1;
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
249
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
var i = 1,
|
|
251
|
+
count = this.pdfPageCount;
|
|
252
|
+
var clientHeight = document.documentElement.clientHeight;
|
|
259
253
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
254
|
+
do {
|
|
255
|
+
var start = this.findPos(document.getElementById("pdfContent" + i));
|
|
256
|
+
var end = start + document.getElementById("pdfContent" + i).offsetHeight;
|
|
263
257
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
258
|
+
if (window.pageYOffset + clientHeight >= start && window.pageYOffset + clientHeight <= end) {
|
|
259
|
+
this.pageNum = i;
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
268
262
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
263
|
+
if (i === count && window.pageYOffset + clientHeight > end) {
|
|
264
|
+
this.pageNum = i;
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
273
267
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
this.
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
268
|
+
i++;
|
|
269
|
+
} while (i < count + 1);
|
|
270
|
+
},
|
|
271
|
+
findPos: function findPos(obj) {
|
|
272
|
+
if (obj) {
|
|
273
|
+
return obj.offsetTop;
|
|
274
|
+
} else {
|
|
275
|
+
return 0;
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
perPage: function perPage() {
|
|
279
|
+
if (this.pageNum > 1) {
|
|
280
|
+
this.pageNum = this.pageNum - 1;
|
|
281
|
+
this.pageChangeByButton = true;
|
|
282
|
+
} else {
|
|
283
|
+
Toast("已经是首页!");
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
nextPage: function nextPage() {
|
|
287
|
+
if (this.pageNum < this.pdfPageCount) {
|
|
288
|
+
this.pageNum = this.pageNum + 1;
|
|
289
|
+
this.pageChangeByButton = true;
|
|
290
|
+
} else {
|
|
291
|
+
Toast("已经是尾页!");
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
onPdfLoaded: function onPdfLoaded(e) {
|
|
295
|
+
this.pdfArr[e - 1].loaded = true;
|
|
296
|
+
this.$emit("loaded", e);
|
|
297
|
+
console.log("pdf loaded", e);
|
|
298
|
+
},
|
|
299
|
+
onPdfError: function onPdfError(e) {
|
|
300
|
+
this.$emit("error", e);
|
|
301
|
+
console.log("pdf viewer error: " + e);
|
|
302
|
+
},
|
|
303
|
+
rotate: function rotate() {
|
|
304
|
+
this.rotateDegree += 90;
|
|
305
|
+
},
|
|
306
|
+
genPdf: function genPdf(i) {
|
|
307
|
+
var h = this.$createElement;
|
|
308
|
+
|
|
309
|
+
if (this.currentShowArr.includes(i) || this.pdfArr[i - 1].loaded) {
|
|
310
|
+
return h("div", [h(pdf, {
|
|
311
|
+
"attrs": {
|
|
312
|
+
"src": this.loadingTask,
|
|
313
|
+
"page": i,
|
|
314
|
+
"id": "pdfContent" + i,
|
|
315
|
+
"rotate": this.rotateDegree
|
|
316
|
+
},
|
|
317
|
+
"key": i,
|
|
318
|
+
"on": {
|
|
319
|
+
"page-loaded": this.onPdfLoaded,
|
|
320
|
+
"error": this.onPdfError
|
|
321
|
+
}
|
|
322
|
+
}), h("div", {
|
|
323
|
+
"class": bem("page-margin")
|
|
324
|
+
})]);
|
|
325
|
+
} else {
|
|
326
|
+
return h("div", [h("div", {
|
|
327
|
+
"attrs": {
|
|
328
|
+
"id": "pdfContent" + i
|
|
329
|
+
},
|
|
330
|
+
"style": "width:100vw;height:100vh;"
|
|
331
|
+
}), h("div", {
|
|
332
|
+
"class": bem("page-margin")
|
|
333
|
+
})]);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
showPagePicker: function showPagePicker() {
|
|
337
|
+
this.showPicker = true;
|
|
338
|
+
},
|
|
339
|
+
getPageList: function getPageList() {
|
|
340
|
+
return this.pdfArr.map(function (v, i) {
|
|
341
|
+
return i + 1;
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
setPage: function setPage(i) {
|
|
345
|
+
this.pageNum = i;
|
|
292
346
|
this.pageChangeByButton = true;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
this.pdfArr[e - 1].loaded = true;
|
|
298
|
-
this.$emit("loaded", e);
|
|
299
|
-
console.log("pdf loaded", e);
|
|
300
|
-
}, _methods.onPdfError = function onPdfError(e) {
|
|
301
|
-
this.$emit("error", e);
|
|
302
|
-
console.log("pdf viewer error: " + e);
|
|
303
|
-
}, _methods.rotate = function rotate() {
|
|
304
|
-
this.rotateDegree += 90;
|
|
305
|
-
}, _methods.genPdf = function genPdf(i) {
|
|
306
|
-
var h = this.$createElement;
|
|
307
|
-
|
|
308
|
-
if (this.currentShowArr.includes(i) || this.pdfArr[i - 1].loaded) {
|
|
309
|
-
return h("div", [h(pdf, {
|
|
310
|
-
"attrs": {
|
|
311
|
-
"src": this.loadingTask,
|
|
312
|
-
"page": i,
|
|
313
|
-
"id": "pdfContent" + i,
|
|
314
|
-
"rotate": this.rotateDegree
|
|
315
|
-
},
|
|
316
|
-
"key": i,
|
|
317
|
-
"on": {
|
|
318
|
-
"page-loaded": this.onPdfLoaded,
|
|
319
|
-
"error": this.onPdfError
|
|
320
|
-
}
|
|
321
|
-
}), h("div", {
|
|
322
|
-
"class": bem("page-margin")
|
|
323
|
-
})]);
|
|
324
|
-
} else {
|
|
325
|
-
return h("div", [h("div", {
|
|
326
|
-
"attrs": {
|
|
327
|
-
"id": "pdfContent" + i
|
|
328
|
-
},
|
|
329
|
-
"style": "width:100vw;height:100vh;"
|
|
330
|
-
}), h("div", {
|
|
331
|
-
"class": bem("page-margin")
|
|
332
|
-
})]);
|
|
347
|
+
this.showPicker = false;
|
|
348
|
+
},
|
|
349
|
+
cancel: function cancel() {
|
|
350
|
+
this.showPicker = false;
|
|
333
351
|
}
|
|
334
|
-
},
|
|
335
|
-
this.showPicker = true;
|
|
336
|
-
}, _methods.getPageList = function getPageList() {
|
|
337
|
-
return this.pdfArr.map(function (v, i) {
|
|
338
|
-
return i + 1;
|
|
339
|
-
});
|
|
340
|
-
}, _methods.setPage = function setPage(i) {
|
|
341
|
-
this.pageNum = i;
|
|
342
|
-
this.pageChangeByButton = true;
|
|
343
|
-
this.showPicker = false;
|
|
344
|
-
}, _methods.cancel = function cancel() {
|
|
345
|
-
this.showPicker = false;
|
|
346
|
-
}, _methods),
|
|
352
|
+
},
|
|
347
353
|
render: function render(h) {
|
|
348
354
|
var _this7 = this;
|
|
349
355
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zt-timeline{background-color:#fff}.zt-timeline__top-bar{height:44px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-timeline__top-left{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-timeline__bar{width:4px;height:16px;background:#0091fa;margin-right:12px}.zt-timeline__title{font-size:16px;font-weight:700;color:#000;line-height:24px}.zt-timeline__top-right{padding-right:16px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-timeline__fold-text{font-size:16px;color:rgba(0,0,0,.6);line-height:24px;margin-right:8px}.zt-timeline__container{padding-top:16px}.zt-timeline__item{padding:0 16px 16px 16px;display:-webkit-box;display:-webkit-flex;display:flex}.zt-timeline__item.last-item .zt-timeline__line{height:0}.zt-timeline__left-container{margin-right:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-timeline__right-container{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-timeline__avatar-box{width:40px;height:40px}.zt-timeline__avatar{width:40px;height:40px;background:#0091fa;border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt-timeline__title-box{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-bottom:8px}.zt-timeline__title{font-size:16px;font-weight:700;color:#000;line-height:24px}.zt-timeline__time{font-size:12px;color:rgba(0,0,0,.8);line-height:16px}.zt-timeline__content-box{font-size:14px;color:rgba(0,0,0,.8);line-height:20px;padding-bottom:8px}.zt-timeline__main-container{background:rgba(0,0,0,.02);border-radius:4px;padding:8px 12px}.zt-timeline__main-container::before{border-radius:4px}.zt-timeline__main-container .zt-timeline__text-bold{font-weight:700;color:#000}.zt-timeline__opinion-box{padding-top:7px}.zt-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:rgba(0,0,0,.4);line-height:20px}.zt-timeline__opinion{font-size:14px;color:#000;line-height:20px}
|