@web-utils/component 4.0.0 → 4.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/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/dictionary.DsN-2ukC.mjs +70 -0
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow-designer/index.mjs +343 -374
- package/flow-designer/style.css +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +54 -40
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +37 -69
- package/form-view/style.css +1 -1
- package/fy-curd/index.mjs +131 -140
- package/fy-curd/style.css +1 -1
- package/fy-draggable/index.mjs +16 -26
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +48 -57
- package/fy-empty/style.css +1 -1
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +314 -339
- package/fy-form-design/style.css +1 -1
- package/fy-input-map/index.mjs +40 -50
- package/fy-input-map/style.css +1 -1
- package/fy-input-table/index.mjs +31 -41
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/monaco-editor/index.mjs +43 -71
- package/name-avatar/style.css +1 -1
- package/package.json +5 -4
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +385 -218
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +56 -95
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +1 -1
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +166 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +177 -132
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/vue-cron/index.mjs +47 -65
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +13 -24
- package/vue-tags-input/index.mjs +10 -21
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +34 -63
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3840
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
package/pageable-table/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pageable-table{flex:auto;height:100%;position:relative}.pageable-table .single-select-column .el-radio__label{padding:0}.pageable-table.auto-height{height:auto;position:static}.pageable-table.auto-height .el-table{min-height:200px;position:
|
|
1
|
+
.table-column-filter .el-drawer__body{padding:10px}.table-column-filter .el-drawer__header{border-bottom:1px solid #f0f0f0;min-height:20px;margin-bottom:0;padding:16px 10px 16px 24px}.pageable-table{flex:auto;height:100%;position:relative}.pageable-table .single-select-column .el-radio__label{padding:0}.pageable-table.auto-height{height:auto;position:static}.pageable-table.auto-height .el-table{min-height:200px;position:relative}.pageable-table.auto-height .pageable-table-wrapper{position:static}.pageable-table .pageable-table-wrapper{flex-direction:column;display:flex}.pageable-table .el-pagination{background-color:#fff}.pageable-table .table-status-icon{font-size:20px}.pageable-table .pageable-table-loading{align-items:center;display:inline-flex}.pageable-table .pageable-table-error{color:red;border:1px solid #fca4a4;align-items:center;display:inline-flex}.pageable-table .pageable-table-error:hover{background-color:#fff0f0}.pageable-table .pageable-table-total{padding:0 10px 10px}.pageable-table .underline{position:relative}.pageable-table .underline:after{z-index:1;content:"";background-color:#606266;width:100%;height:1px;position:absolute;bottom:0;left:0}.pageable-table .el-table th{color:#000000d9;word-break:break-word;background-color:#fafafa}.pageable-table .total{padding:10px}
|
package/pageable-view/index.mjs
CHANGED
|
@@ -1,57 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var s in t || (t = {}))
|
|
7
|
-
m.call(t, s) && u(e, s, t[s]);
|
|
8
|
-
if (c)
|
|
9
|
-
for (var s of c(t))
|
|
10
|
-
b.call(t, s) && u(e, s, t[s]);
|
|
11
|
-
return e;
|
|
12
|
-
}, p = (e, t) => T(e, _(t));
|
|
13
|
-
var S = (e, t) => {
|
|
14
|
-
var s = {};
|
|
15
|
-
for (var l in e)
|
|
16
|
-
m.call(e, l) && t.indexOf(l) < 0 && (s[l] = e[l]);
|
|
17
|
-
if (e != null && c)
|
|
18
|
-
for (var l of c(e))
|
|
19
|
-
t.indexOf(l) < 0 && b.call(e, l) && (s[l] = e[l]);
|
|
20
|
-
return s;
|
|
21
|
-
};
|
|
22
|
-
var f = (e, t, s) => new Promise((l, o) => {
|
|
23
|
-
var g = (i) => {
|
|
24
|
-
try {
|
|
25
|
-
a(s.next(i));
|
|
26
|
-
} catch (h) {
|
|
27
|
-
o(h);
|
|
28
|
-
}
|
|
29
|
-
}, n = (i) => {
|
|
30
|
-
try {
|
|
31
|
-
a(s.throw(i));
|
|
32
|
-
} catch (h) {
|
|
33
|
-
o(h);
|
|
34
|
-
}
|
|
35
|
-
}, a = (i) => i.done ? l(i.value) : Promise.resolve(i.value).then(g, n);
|
|
36
|
-
a((s = s.apply(e, t)).next());
|
|
37
|
-
});
|
|
38
|
-
import { cloneDeep as y, merge as w } from "@web-utils/integrations/lodash";
|
|
39
|
-
import { hasOwn as P, copy as C } from "@web-utils/core";
|
|
40
|
-
import { f as v, h as x, i as O } from "../chunks/index.MAFc4eFi.mjs";
|
|
41
|
-
import { n as R } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
42
|
-
function k(e) {
|
|
1
|
+
import { cloneDeep as n, merge as g } from "@web-utils/integrations/lodash";
|
|
2
|
+
import { hasOwn as p, copy as f } from "@web-utils/core";
|
|
3
|
+
import { f as h, g as u, h as m } from "../chunks/index.d3MV3Wq2.mjs";
|
|
4
|
+
import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
function S(e) {
|
|
43
6
|
let t = "";
|
|
44
7
|
for (const s in e)
|
|
45
8
|
t += `<ElTableColumn prop="${s}" label="${s}"/>
|
|
46
9
|
`;
|
|
47
10
|
return t;
|
|
48
11
|
}
|
|
49
|
-
const
|
|
12
|
+
const i = {
|
|
50
13
|
loading: 1,
|
|
51
14
|
error: -1,
|
|
52
15
|
empty: 2,
|
|
53
16
|
success: 0
|
|
54
|
-
},
|
|
17
|
+
}, y = {
|
|
55
18
|
name: "PageableView",
|
|
56
19
|
bus: {
|
|
57
20
|
reloadTableView(e) {
|
|
@@ -111,13 +74,13 @@ const d = {
|
|
|
111
74
|
},
|
|
112
75
|
data() {
|
|
113
76
|
let e = { rules: [] };
|
|
114
|
-
this.rules && this.rules.length > 0 && (e.rules = this.rules), this.filters && (e = this.filters), this.filter && (e =
|
|
77
|
+
this.rules && this.rules.length > 0 && (e.rules = this.rules), this.filters && (e = this.filters), this.filter && (e = { ...e, ...this.filter });
|
|
115
78
|
let t = {};
|
|
116
|
-
this.model && (t =
|
|
79
|
+
this.model && (t = n(this.model));
|
|
117
80
|
const s = this.pageSize;
|
|
118
81
|
return {
|
|
119
82
|
// TABLE_STATUS: Object.freeze(TABLE_STATUS),
|
|
120
|
-
tableStatus:
|
|
83
|
+
tableStatus: i.empty,
|
|
121
84
|
records: [],
|
|
122
85
|
loading: !1,
|
|
123
86
|
currentRow: null,
|
|
@@ -155,11 +118,11 @@ const d = {
|
|
|
155
118
|
return e.length > 3 ? 50 + (e.length - 3) * 10 : 50;
|
|
156
119
|
},
|
|
157
120
|
mergeAttrs() {
|
|
158
|
-
return
|
|
121
|
+
return g({}, this.$attrs, { height: this.autoHeight ? null : "auto" });
|
|
159
122
|
},
|
|
160
123
|
headers() {
|
|
161
124
|
var e;
|
|
162
|
-
return ((e = this.columns) == null ? void 0 : e.map(
|
|
125
|
+
return ((e = this.columns) == null ? void 0 : e.map(h)) || [];
|
|
163
126
|
}
|
|
164
127
|
},
|
|
165
128
|
watch: {
|
|
@@ -192,13 +155,13 @@ const d = {
|
|
|
192
155
|
updateTableScrollPosition() {
|
|
193
156
|
this.$refs.scroller && this.scrollTo(this.tableScrollTop, this.tableScrollLeft);
|
|
194
157
|
},
|
|
195
|
-
filterTableProperties:
|
|
196
|
-
filterTableEvents:
|
|
197
|
-
filterTableColumnProperties:
|
|
158
|
+
filterTableProperties: m,
|
|
159
|
+
filterTableEvents: u,
|
|
160
|
+
filterTableColumnProperties: h,
|
|
198
161
|
onTableScroll() {
|
|
199
162
|
this.tableScrollTop = this.$refs.scroller.scrollTop, this.tableScrollLeft = this.$refs.scroller.scrollLeft;
|
|
200
163
|
},
|
|
201
|
-
copy: (e) =>
|
|
164
|
+
copy: (e) => f(S(e)),
|
|
202
165
|
onSortChange({ prop: e, order: t }) {
|
|
203
166
|
this.page.ascs = t === "ascending" ? e : "", this.page.descs = t === "descending" ? e : "";
|
|
204
167
|
},
|
|
@@ -219,7 +182,7 @@ const d = {
|
|
|
219
182
|
this.$set(this.page.model, e, t);
|
|
220
183
|
},
|
|
221
184
|
setModel(e) {
|
|
222
|
-
this.page.page = 1, this.page.model =
|
|
185
|
+
this.page.page = 1, this.page.model = n(e);
|
|
223
186
|
},
|
|
224
187
|
deleteModelField(e) {
|
|
225
188
|
delete this.page.model[e];
|
|
@@ -229,7 +192,8 @@ const d = {
|
|
|
229
192
|
s > -1 && t.splice(s, 1);
|
|
230
193
|
},
|
|
231
194
|
addFilter({ field: e, op: t, value: s }) {
|
|
232
|
-
this.page.filters =
|
|
195
|
+
this.page.filters = {
|
|
196
|
+
...this.page.filters,
|
|
233
197
|
rules: [
|
|
234
198
|
{
|
|
235
199
|
field: e,
|
|
@@ -238,7 +202,7 @@ const d = {
|
|
|
238
202
|
}
|
|
239
203
|
],
|
|
240
204
|
op: "and"
|
|
241
|
-
}
|
|
205
|
+
};
|
|
242
206
|
},
|
|
243
207
|
clearFilters() {
|
|
244
208
|
this.page.filters = {};
|
|
@@ -249,66 +213,63 @@ const d = {
|
|
|
249
213
|
search() {
|
|
250
214
|
this.setModel(this.model), this.getPage();
|
|
251
215
|
},
|
|
252
|
-
getPage() {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this.tableStatus = d.error, console.error(h), this.loading = !1;
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
} else {
|
|
271
|
-
this.$notify.warning({
|
|
272
|
-
title: "开发提示!",
|
|
273
|
-
message: "PageableTable 请提供 url(String) 或 api(Function) 属性"
|
|
274
|
-
});
|
|
216
|
+
async getPage() {
|
|
217
|
+
var o;
|
|
218
|
+
if (p(this.$attrs, "data")) {
|
|
219
|
+
this.records = this.$attrs.data, this.page.page = 1, this.page.total = this.records.length, this.page.limit = this.page.total;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.records = [];
|
|
223
|
+
let e;
|
|
224
|
+
const { filters: t, ...s } = this.page, l = { ...s };
|
|
225
|
+
if ((o = t == null ? void 0 : t.rules) != null && o.length && (l.filters = { rules: t.rules }), this.api || this.url) {
|
|
226
|
+
this.tableStatus = i.loading;
|
|
227
|
+
try {
|
|
228
|
+
this.loading = !0, this.api && (e = await this.api(l)), this.url && (e = await this.method(this.url, l)), this.loading = !1;
|
|
229
|
+
} catch (c) {
|
|
230
|
+
this.tableStatus = i.error, console.error(c), this.loading = !1;
|
|
275
231
|
return;
|
|
276
232
|
}
|
|
277
|
-
|
|
278
|
-
this
|
|
279
|
-
|
|
233
|
+
} else {
|
|
234
|
+
this.$notify.warning({
|
|
235
|
+
title: "开发提示!",
|
|
236
|
+
message: "PageableTable 请提供 url(String) 或 api(Function) 属性"
|
|
237
|
+
});
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const { data: r } = e || {}, { total: d, records: a } = r || {};
|
|
241
|
+
this.page.total = Number(d), this.records = a, !a || !a.length ? this.tableStatus = i.empty : this.tableStatus = i.success, this.$refs.table && (this.$refs.scroller.scrollTop = 0), this.$emit("page-loaded", r);
|
|
280
242
|
},
|
|
281
|
-
refresh() {
|
|
282
|
-
|
|
283
|
-
yield this.getPage();
|
|
284
|
-
});
|
|
243
|
+
async refresh() {
|
|
244
|
+
await this.getPage();
|
|
285
245
|
},
|
|
286
246
|
reload() {
|
|
287
|
-
this.page =
|
|
247
|
+
this.page = {
|
|
248
|
+
...this.$options.data.call(this).page,
|
|
288
249
|
total: this.page.total
|
|
289
|
-
}
|
|
250
|
+
};
|
|
290
251
|
},
|
|
291
252
|
scrollTo(e, t) {
|
|
292
253
|
e && (this.$refs.scroller.scrollTop = e), t && (this.$refs.scroller.scrollLeft = t);
|
|
293
254
|
}
|
|
294
255
|
}
|
|
295
256
|
};
|
|
296
|
-
var
|
|
257
|
+
var v = function() {
|
|
297
258
|
var t = this, s = t._self._c;
|
|
298
259
|
return s("div", { staticClass: "work", staticStyle: { height: "100%", "background-color": "#fff" } }, [s("div", { staticClass: "flex-column list-content", staticStyle: { height: "100%" } }, [s("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], staticClass: "flex-item-relative", attrs: { "element-loading-text": "加载中...", "element-loading-background": "#fff" } }, [s("div", { ref: "scroller", staticClass: "scroll-wrapper" }, [s("div", { staticClass: "cards-block" }, [t._t("prepend"), t._l(t.records, function(l) {
|
|
299
260
|
return [t._t("default", null, { item: l })];
|
|
300
261
|
}), t._t("append")], 2)])]), s("ElPagination", { staticClass: "flex-not-shrink", staticStyle: { "border-top": "1px solid #ebeef5" }, attrs: { "current-page": t.page.page, "hide-on-single-page": t.hideOnSinglePage, "page-size": t.page.limit, total: t.page.total, background: "", layout: "total, prev, pager, next, jumper" }, on: { "current-change": (l) => {
|
|
301
262
|
t.page.page = l;
|
|
302
263
|
} } })], 1)]);
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
264
|
+
}, $ = [], T = /* @__PURE__ */ b(
|
|
265
|
+
y,
|
|
266
|
+
v,
|
|
267
|
+
$,
|
|
307
268
|
!1,
|
|
308
269
|
null,
|
|
309
270
|
null
|
|
310
271
|
);
|
|
311
|
-
const
|
|
272
|
+
const x = T.exports;
|
|
312
273
|
export {
|
|
313
|
-
|
|
274
|
+
x as default
|
|
314
275
|
};
|
package/photo-swipe/index.mjs
CHANGED
|
@@ -1,71 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
var r = (o) => {
|
|
3
|
-
try {
|
|
4
|
-
s(t.next(o));
|
|
5
|
-
} catch (c) {
|
|
6
|
-
a(c);
|
|
7
|
-
}
|
|
8
|
-
}, e = (o) => {
|
|
9
|
-
try {
|
|
10
|
-
s(t.throw(o));
|
|
11
|
-
} catch (c) {
|
|
12
|
-
a(c);
|
|
13
|
-
}
|
|
14
|
-
}, s = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, e);
|
|
15
|
-
s((t = t.apply(i, n)).next());
|
|
16
|
-
});
|
|
17
|
-
import d from "photoswipe";
|
|
1
|
+
import u from "photoswipe";
|
|
18
2
|
import "photoswipe/dist/photoswipe.css";
|
|
19
|
-
import { n as
|
|
20
|
-
function
|
|
21
|
-
new
|
|
3
|
+
import { n as g } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
|
+
function d(t) {
|
|
5
|
+
new u(t).init();
|
|
22
6
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
yield w({ dataSource: o, index: s });
|
|
32
|
-
});
|
|
7
|
+
async function l(t, r, n = { selector: "chat-image" }) {
|
|
8
|
+
const c = t.target;
|
|
9
|
+
if (!(!c || c.classList.contains(n.selector) || c.tagName === "IMG"))
|
|
10
|
+
return;
|
|
11
|
+
const e = r.querySelectorAll(n.selector === "img" ? n.selector : `.${n.selector}`), a = [...e].findIndex((s) => s === c);
|
|
12
|
+
a >= 0 && (n.index = a);
|
|
13
|
+
const i = await w(e);
|
|
14
|
+
await d({ dataSource: i, index: a });
|
|
33
15
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return n;
|
|
48
|
-
});
|
|
16
|
+
async function w(t) {
|
|
17
|
+
const r = [];
|
|
18
|
+
for (let n = 0, c = t.length; n < c; n++) {
|
|
19
|
+
const e = t[n], a = e.getAttribute("data-src") || e.getAttribute("src"), i = {
|
|
20
|
+
src: a,
|
|
21
|
+
msrc: a,
|
|
22
|
+
alt: e.getAttribute("data-title") || e.getAttribute("alt"),
|
|
23
|
+
element: e
|
|
24
|
+
}, s = e.getAttribute("data-height"), h = e.getAttribute("data-width");
|
|
25
|
+
let o = { width: h, height: s };
|
|
26
|
+
!s && !h && (o = await f(e), e.setAttribute("data-height", o.height), e.setAttribute("data-width", o.width)), i.w = o.width, i.width = o.width, i.h = o.height, i.height = o.height, r.push(i);
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
49
29
|
}
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
width:
|
|
54
|
-
height:
|
|
55
|
-
} : new Promise((
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
30
|
+
function f(t) {
|
|
31
|
+
const r = t.getAttribute("data-src") || t.getAttribute("src"), n = t.getAttribute("data-height"), c = t.getAttribute("data-width");
|
|
32
|
+
return n && c ? { width: c, height: n } : t.complete ? {
|
|
33
|
+
width: t.naturalWidth,
|
|
34
|
+
height: t.naturalHeight
|
|
35
|
+
} : new Promise((e) => {
|
|
36
|
+
const a = new Image();
|
|
37
|
+
a.src = r;
|
|
38
|
+
const i = {};
|
|
39
|
+
a.complete ? (i.width = a.width, i.height = a.height, e(i)) : (a.onload = () => {
|
|
40
|
+
i.width = a.width, i.height = a.height, e(i);
|
|
41
|
+
}, a.onerror = () => {
|
|
42
|
+
i.width = 0, i.height = 0, e(i);
|
|
63
43
|
});
|
|
64
44
|
});
|
|
65
45
|
}
|
|
66
|
-
const
|
|
46
|
+
const m = {
|
|
67
47
|
name: "PhotoSwipe",
|
|
68
|
-
photoswipe: g,
|
|
69
48
|
props: {
|
|
70
49
|
urls: Array,
|
|
71
50
|
selector: {
|
|
@@ -74,29 +53,27 @@ const p = {
|
|
|
74
53
|
}
|
|
75
54
|
},
|
|
76
55
|
methods: {
|
|
77
|
-
preview(
|
|
78
|
-
|
|
79
|
-
yield g(i, this.$refs.wrapper, { selector: this.selector });
|
|
80
|
-
});
|
|
56
|
+
async preview(t) {
|
|
57
|
+
await l(t, this.$refs.wrapper, { selector: this.selector });
|
|
81
58
|
}
|
|
82
59
|
}
|
|
83
60
|
};
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
return
|
|
88
|
-
return
|
|
61
|
+
var p = function() {
|
|
62
|
+
var r = this, n = r._self._c;
|
|
63
|
+
return n("div", { ref: "wrapper" }, [r._t("default", function() {
|
|
64
|
+
return r._l(r.urls, function(c) {
|
|
65
|
+
return n("img", { key: c.src, staticStyle: { cursor: "pointer" }, attrs: { width: "100", src: c.src, alt: "" }, on: { click: r.preview } });
|
|
89
66
|
});
|
|
90
|
-
}, { urls:
|
|
91
|
-
},
|
|
67
|
+
}, { urls: r.urls, preview: r.preview })], 2);
|
|
68
|
+
}, _ = [], b = /* @__PURE__ */ g(
|
|
69
|
+
m,
|
|
92
70
|
p,
|
|
93
71
|
_,
|
|
94
|
-
b,
|
|
95
72
|
!1,
|
|
96
73
|
null,
|
|
97
74
|
null
|
|
98
75
|
);
|
|
99
|
-
const
|
|
76
|
+
const v = b.exports;
|
|
100
77
|
export {
|
|
101
|
-
|
|
78
|
+
v as default
|
|
102
79
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ref as l, onMounted as S } from "vue";
|
|
2
|
+
import N from "element-ui/lib/message";
|
|
3
|
+
import { isPlainObject as y, isFunction as P } from "@web-utils/core";
|
|
4
|
+
import { cloneDeep as T } from "@web-utils/integrations/lodash";
|
|
5
|
+
import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
6
|
+
const O = {
|
|
7
|
+
name: "PickerTableView"
|
|
8
|
+
}, E = /* @__PURE__ */ Object.assign(O, {
|
|
9
|
+
props: {
|
|
10
|
+
title: String,
|
|
11
|
+
treeTitle: String,
|
|
12
|
+
useTree: Boolean,
|
|
13
|
+
expandFirstNode: Boolean,
|
|
14
|
+
nodeKey: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "id"
|
|
17
|
+
},
|
|
18
|
+
width: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "80%"
|
|
21
|
+
},
|
|
22
|
+
height: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "90vh"
|
|
25
|
+
},
|
|
26
|
+
visible: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
multiple: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
descs: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: () => []
|
|
37
|
+
},
|
|
38
|
+
model: Object,
|
|
39
|
+
tableApi: Function,
|
|
40
|
+
treeApi: Function,
|
|
41
|
+
onNodeClick: Function,
|
|
42
|
+
treeProps: Object,
|
|
43
|
+
rowKey: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "id"
|
|
46
|
+
},
|
|
47
|
+
customRootNode: [Object, Function],
|
|
48
|
+
expandOnClickNode: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["cancel", "confirm", "update:visible"],
|
|
54
|
+
setup(f, { expose: e, emit: n }) {
|
|
55
|
+
const t = f, a = l([]), s = l(null), i = l([]), m = l([]), h = l(null), g = l(null), v = l(null), _ = l(null), b = (o) => {
|
|
56
|
+
a.value = o;
|
|
57
|
+
}, x = (o) => {
|
|
58
|
+
s.value = o;
|
|
59
|
+
}, d = () => {
|
|
60
|
+
h.value.reload();
|
|
61
|
+
}, k = () => {
|
|
62
|
+
g.value.resetFields(), d();
|
|
63
|
+
}, u = () => {
|
|
64
|
+
v.value.hide();
|
|
65
|
+
}, w = () => {
|
|
66
|
+
n("cancel"), u();
|
|
67
|
+
}, C = () => {
|
|
68
|
+
var p;
|
|
69
|
+
let o;
|
|
70
|
+
if (t.multiple ? (p = a.value) != null && p.length && (o = a.value) : s.value && (o = [s.value]), !o.length) {
|
|
71
|
+
N.warning("请选择!");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
n("confirm", o), u();
|
|
75
|
+
}, F = (o) => {
|
|
76
|
+
n("update:visible", o);
|
|
77
|
+
};
|
|
78
|
+
return S(async () => {
|
|
79
|
+
var o;
|
|
80
|
+
if (t.useTree) {
|
|
81
|
+
const c = (await t.treeApi()).data.data;
|
|
82
|
+
if (y(t.customRootNode)) {
|
|
83
|
+
const r = T(t.customRootNode);
|
|
84
|
+
r[t.treeProps.children || "children"] = c, i.value = [r];
|
|
85
|
+
} else if (P(t.customRootNode)) {
|
|
86
|
+
const r = t.customRootNode(c);
|
|
87
|
+
r[t.treeProps.children || "children"] = c, i.value = y(r) ? [r] : r;
|
|
88
|
+
} else
|
|
89
|
+
i.value = c;
|
|
90
|
+
t.expandFirstNode && (m.value = [(o = i.value[0]) == null ? void 0 : o.id]);
|
|
91
|
+
}
|
|
92
|
+
}), e({
|
|
93
|
+
search: d
|
|
94
|
+
}), { __sfc: !0, props: t, emits: n, rows: a, current: s, treeData: i, expandedKeys: m, table: h, form: g, dialog: v, tree: _, handleChange: b, handleCurrentChange: x, search: d, clear: k, closeDialog: u, onCancel: w, confirm: C, updateVisible: F };
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
var R = function() {
|
|
98
|
+
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
99
|
+
return n("ElementDialog", { ref: "dialog", attrs: { visible: e.visible, height: e.height, width: e.width, "body-padding": !1, "show-full-screen": "", title: e.title }, on: { "update:visible": t.updateVisible }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
100
|
+
return [n("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: t.confirm } }, [e._v("确定")]), n("ElButton", { attrs: { size: "mini" }, on: { click: t.onCancel } }, [e._v("取消")])];
|
|
101
|
+
}, proxy: !0 }]) }, [n("SkeletonPanel", { attrs: { "flex-column": "", "use-tab": !1, "hide-left": !e.useTree }, scopedSlots: e._u([e.useTree ? { key: "left", fn: function() {
|
|
102
|
+
return [n("div", { staticStyle: { padding: "10px 0", "font-size": "16px", "border-bottom": "1px solid #eee" } }, [e._v(e._s(e.treeTitle))]), n("ElTree", { ref: "tree", attrs: { "node-key": e.nodeKey, data: t.treeData, "default-expanded-keys": t.expandedKeys, props: e.treeProps, "expand-on-click-node": e.expandOnClickNode }, on: { "node-click": e.onNodeClick } })];
|
|
103
|
+
}, proxy: !0 } : null], null, !0) }, [n("FormHolder", { ref: "form", staticStyle: { padding: "10px" }, attrs: { model: e.model, "not-table-form": "" }, nativeOn: { submit: function(a) {
|
|
104
|
+
return a.preventDefault(), t.search.apply(null, arguments);
|
|
105
|
+
} } }, [n("FormItemConfigProvider", { attrs: { reactive: "" } }, [n("ElRow", { attrs: { gutter: 0 } }, [e._t("search-form"), n("FormItem", { staticStyle: { "text-align": "right" }, attrs: { "hide-label": "", span: 24 } }, [n("ElButton", { attrs: { type: "primary", "native-type": "submit" } }, [e._v("搜索")]), n("ElButton", { on: { click: t.clear } }, [e._v("清空")])], 1)], 2)], 1)], 1), n("PageableTable", { ref: "table", attrs: { "highlight-current-row": "", "hide-on-single-page": "", "click-row-select": "", "row-key": e.rowKey, descs: e.descs, "payload-style": "body", api: e.tableApi, model: e.model, multiple: e.multiple }, on: { "current-change": t.handleCurrentChange, "selection-change": t.handleChange } }, [e._t("columns")], 2)], 1)], 1);
|
|
106
|
+
}, D = [], K = /* @__PURE__ */ B(
|
|
107
|
+
E,
|
|
108
|
+
R,
|
|
109
|
+
D,
|
|
110
|
+
!1,
|
|
111
|
+
null,
|
|
112
|
+
null
|
|
113
|
+
);
|
|
114
|
+
const M = K.exports;
|
|
115
|
+
export {
|
|
116
|
+
M as default
|
|
117
|
+
};
|