@farris/ui-vue 1.3.0 → 1.3.1
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/components/accordion/index.esm.js +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var vt = Object.defineProperty;
|
|
2
2
|
var wt = (t, e, n) => e in t ? vt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
3
|
+
var U = (t, e, n) => wt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as te, toRefs as Ee, createVNode as s, Fragment as se, createTextVNode as C, ref as N, watch as K, inject as oe, getCurrentInstance as yt, onMounted as Fe, onUnmounted as Oe, computed as W, reactive as bt, createApp as xt, Transition as Dt, mergeProps as Tt, provide as Mt, resolveComponent as G, onBeforeMount as St } from "vue";
|
|
5
|
+
import { isPlainObject as Re, cloneDeep as kt } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
7
|
const Ct = {
|
|
8
8
|
// 是否被选中
|
|
@@ -52,7 +52,7 @@ const Ct = {
|
|
|
52
52
|
* 附件服务器端服务注入的Token
|
|
53
53
|
*/
|
|
54
54
|
uploadServerToken: { type: String, default: "" }
|
|
55
|
-
}, Ft = /* @__PURE__ */
|
|
55
|
+
}, Ft = /* @__PURE__ */ te({
|
|
56
56
|
name: "FUploadProgress",
|
|
57
57
|
props: Pt,
|
|
58
58
|
setup(t, e) {
|
|
@@ -61,7 +61,7 @@ const Ct = {
|
|
|
61
61
|
status: a,
|
|
62
62
|
maxWidth: r,
|
|
63
63
|
percent: i
|
|
64
|
-
} =
|
|
64
|
+
} = Ee(t);
|
|
65
65
|
return () => s("div", {
|
|
66
66
|
class: ["f-progress upload-progress", "upload-progress-status-" + a.value, "f-progress-status-" + a.value, "upload-progress-line", n.value ? "upload-progress-show-info" : ""]
|
|
67
67
|
}, [s("div", {
|
|
@@ -80,22 +80,22 @@ const Ct = {
|
|
|
80
80
|
class: "upload-progress-text"
|
|
81
81
|
}, [a.value === "error" || a.value === "success" ? s("span", {
|
|
82
82
|
class: ["upload-progress-text-icon f-icon", "f-icon-" + a.value]
|
|
83
|
-
}, null) : s(
|
|
83
|
+
}, null) : s(se, null, [i.value, C("%")])]) : ""]);
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), Ge = /* @__PURE__ */ te({
|
|
86
86
|
name: "FPreviewCheckbox",
|
|
87
87
|
props: Ct,
|
|
88
88
|
emits: ["checkedChange"],
|
|
89
89
|
setup(t, e) {
|
|
90
90
|
const {
|
|
91
91
|
disabled: n
|
|
92
|
-
} =
|
|
92
|
+
} = Ee(t), a = N(t.checked), r = (i) => {
|
|
93
93
|
i.stopPropagation(), n.value || (a.value = !a.value, e.emit("checkedChange", {
|
|
94
94
|
checked: a.value,
|
|
95
95
|
id: t.id
|
|
96
96
|
}));
|
|
97
97
|
};
|
|
98
|
-
return
|
|
98
|
+
return K(() => t.checked, (i) => {
|
|
99
99
|
a.value = i;
|
|
100
100
|
}), () => s("div", {
|
|
101
101
|
class: "preview-checkbox d-inline-flex align-middle"
|
|
@@ -113,12 +113,12 @@ const Ct = {
|
|
|
113
113
|
onMousedown: (i) => i.stopPropagation()
|
|
114
114
|
}, null)])]);
|
|
115
115
|
}
|
|
116
|
-
}), Ze = /* @__PURE__ */
|
|
116
|
+
}), Ze = /* @__PURE__ */ te({
|
|
117
117
|
name: "FFileSelect",
|
|
118
118
|
props: Et,
|
|
119
119
|
emits: ["change", "stateChange"],
|
|
120
120
|
setup(t, e) {
|
|
121
|
-
const n =
|
|
121
|
+
const n = oe("uploaderService");
|
|
122
122
|
n.setUploadContext(e);
|
|
123
123
|
const a = yt(), r = N("*");
|
|
124
124
|
let i;
|
|
@@ -128,13 +128,13 @@ const Ct = {
|
|
|
128
128
|
function o() {
|
|
129
129
|
i.value = null, n.reset();
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
K(() => t.disabled, () => {
|
|
132
132
|
o();
|
|
133
|
-
}),
|
|
133
|
+
}), K(() => t.uploadedCount, (d) => {
|
|
134
134
|
n.setOptions({
|
|
135
135
|
uploadedCount: d
|
|
136
136
|
});
|
|
137
|
-
}),
|
|
137
|
+
}), K(() => t.extendConfig, (d) => {
|
|
138
138
|
n.setExtendServerConfig(d);
|
|
139
139
|
});
|
|
140
140
|
function f(d) {
|
|
@@ -143,13 +143,13 @@ const Ct = {
|
|
|
143
143
|
function u(d) {
|
|
144
144
|
n.handleUploadEvent(d);
|
|
145
145
|
}
|
|
146
|
-
return
|
|
146
|
+
return Fe(() => {
|
|
147
147
|
var d, h;
|
|
148
148
|
i = (d = a == null ? void 0 : a.proxy) == null ? void 0 : d.$refs.uploadInput, o(), n.setOptions(t.options), n.setExtendServerConfig(t.extendConfig), r.value = (((h = t.options) == null ? void 0 : h.allowedContentTypes) || ["*"]).join(",");
|
|
149
|
-
}),
|
|
149
|
+
}), Oe(() => {
|
|
150
150
|
}), e.expose({
|
|
151
151
|
handleUploadEvent: u
|
|
152
|
-
}), () => s(
|
|
152
|
+
}), () => s(se, null, [s("input", {
|
|
153
153
|
ref: "uploadInput",
|
|
154
154
|
type: "file",
|
|
155
155
|
class: "ffileupload--browser",
|
|
@@ -168,23 +168,23 @@ const Ct = {
|
|
|
168
168
|
style: "top: 2px;position: relative;"
|
|
169
169
|
}, null), t.selectText])]);
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
172
|
-
function
|
|
173
|
-
const { properties: e, title: n, ignore: a } = t, r = a && Array.isArray(a), i = Object.keys(e).reduce((l, o) => ((!r || !a.find((f) => f == o)) && (l[o] = e[o].type === "object" && e[o].properties ?
|
|
174
|
-
return (!r || !a.find((l) => l == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
171
|
+
}), Je = {}, Ke = {};
|
|
172
|
+
function Ne(t) {
|
|
173
|
+
const { properties: e, title: n, ignore: a } = t, r = a && Array.isArray(a), i = Object.keys(e).reduce((l, o) => ((!r || !a.find((f) => f == o)) && (l[o] = e[o].type === "object" && e[o].properties ? Ne(e[o]) : kt(e[o].default)), l), {});
|
|
174
|
+
return n && (!r || !a.find((l) => l == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const a =
|
|
176
|
+
function et(t, e = {}, n) {
|
|
177
|
+
const a = Je[t];
|
|
178
178
|
if (a) {
|
|
179
|
-
let r =
|
|
180
|
-
const i =
|
|
181
|
-
return r = i ? i({ getSchemaByType:
|
|
179
|
+
let r = Ne(a);
|
|
180
|
+
const i = Ke[t];
|
|
181
|
+
return r = i ? i({ getSchemaByType: et }, r, e, n) : r, r;
|
|
182
182
|
}
|
|
183
183
|
return null;
|
|
184
184
|
}
|
|
185
185
|
function Ot(t, e) {
|
|
186
|
-
const n =
|
|
187
|
-
return Object.keys(t).reduce((a, r) => (a[r] &&
|
|
186
|
+
const n = Ne(e);
|
|
187
|
+
return Object.keys(t).reduce((a, r) => (a[r] && Re(a[r]) && Re(t[r]) ? Object.assign(a[r], t[r]) : a[r] = t[r], a), n), n;
|
|
188
188
|
}
|
|
189
189
|
function Nt(t, e) {
|
|
190
190
|
return Object.keys(t).filter((a) => t[a] != null).reduce((a, r) => {
|
|
@@ -254,20 +254,20 @@ function Ht(t = {}) {
|
|
|
254
254
|
return i(u).reduce((x, g) => x && l(g, d), !0);
|
|
255
255
|
}
|
|
256
256
|
function f(u, d) {
|
|
257
|
-
const h = Object.keys(u), m = h.includes("allOf"), x = h.includes("anyOf"), g = m || x, k = (g ? u[g ? m ? "allOf" : "anyOf" : "allOf"] : [u]).map((
|
|
257
|
+
const h = Object.keys(u), m = h.includes("allOf"), x = h.includes("anyOf"), g = m || x, k = (g ? u[g ? m ? "allOf" : "anyOf" : "allOf"] : [u]).map((M) => o(M, d));
|
|
258
258
|
return m ? !k.includes(!1) : k.includes(!0);
|
|
259
259
|
}
|
|
260
260
|
return { parseValueSchema: f };
|
|
261
261
|
}
|
|
262
|
-
const
|
|
262
|
+
const Bt = {}, _t = {};
|
|
263
263
|
Ht();
|
|
264
264
|
function Rt(t, e, n = /* @__PURE__ */ new Map(), a = (l, o, f) => o, r = {}, i = (l) => l) {
|
|
265
|
-
return
|
|
265
|
+
return Je[e.title] = e, Ke[e.title] = a, Bt[e.title] = r, _t[e.title] = i, (l = {}) => {
|
|
266
266
|
const o = At(l, e, n), f = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
267
267
|
return Object.assign(f, o);
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
const Yt = "https://json-schema.org/draft/2020-12/schema", Wt = "https://farris-design.gitee.io/uploader.schema.json", jt = "uploader",
|
|
270
|
+
const Yt = "https://json-schema.org/draft/2020-12/schema", Wt = "https://farris-design.gitee.io/uploader.schema.json", jt = "uploader", qt = "A Farris Component", $t = "object", Ut = {
|
|
271
271
|
id: {
|
|
272
272
|
description: "The unique identifier for uploader",
|
|
273
273
|
type: "string"
|
|
@@ -326,8 +326,8 @@ const Yt = "https://json-schema.org/draft/2020-12/schema", Wt = "https://farris-
|
|
|
326
326
|
$schema: Yt,
|
|
327
327
|
$id: Wt,
|
|
328
328
|
title: jt,
|
|
329
|
-
description:
|
|
330
|
-
type:
|
|
329
|
+
description: qt,
|
|
330
|
+
type: $t,
|
|
331
331
|
properties: Ut,
|
|
332
332
|
required: Lt
|
|
333
333
|
};
|
|
@@ -340,7 +340,7 @@ const Vt = /* @__PURE__ */ new Map([
|
|
|
340
340
|
function It(t, e, n) {
|
|
341
341
|
return e;
|
|
342
342
|
}
|
|
343
|
-
const Xt = "uploader", Gt = "A Farris Component",
|
|
343
|
+
const Xt = "uploader", Gt = "A Farris Component", Zt = "object", Jt = {
|
|
344
344
|
basic: {
|
|
345
345
|
description: "Basic Infomation",
|
|
346
346
|
title: "基本信息",
|
|
@@ -548,9 +548,9 @@ const Xt = "uploader", Gt = "A Farris Component", Jt = "object", Zt = {
|
|
|
548
548
|
}, Kt = {
|
|
549
549
|
title: Xt,
|
|
550
550
|
description: Gt,
|
|
551
|
-
type:
|
|
552
|
-
categories:
|
|
553
|
-
},
|
|
551
|
+
type: Zt,
|
|
552
|
+
categories: Jt
|
|
553
|
+
}, Ae = {
|
|
554
554
|
/** 内容区域填充 */
|
|
555
555
|
contentFill: { type: Boolean, default: !1 },
|
|
556
556
|
/** 排序字段 */
|
|
@@ -614,10 +614,10 @@ const Xt = "uploader", Gt = "A Farris Component", Jt = "object", Zt = {
|
|
|
614
614
|
* 提示服务注入的Token
|
|
615
615
|
*/
|
|
616
616
|
notifyServiceToken: { type: String, default: "" }
|
|
617
|
-
}, tt = Rt(
|
|
617
|
+
}, tt = Rt(Ae, zt, Vt, It, Kt), en = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, tn = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
618
618
|
class nn {
|
|
619
619
|
constructor() {
|
|
620
|
-
|
|
620
|
+
U(this, "regexes", {
|
|
621
621
|
YEAR: "[1-9]\\d{3}",
|
|
622
622
|
MONTH: "1[0-2]|0?[1-9]",
|
|
623
623
|
MONTH2: "1[0-2]|0[1-9]",
|
|
@@ -634,7 +634,7 @@ class nn {
|
|
|
634
634
|
AMPM: "am|pm",
|
|
635
635
|
UNIT: "year|month|week|day|hour|minute|second|millisecond"
|
|
636
636
|
});
|
|
637
|
-
|
|
637
|
+
U(this, "patterns", [
|
|
638
638
|
// 2010-03-15
|
|
639
639
|
["iso_8601", this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"), "$2/$3/$1"],
|
|
640
640
|
// 3-15-2010
|
|
@@ -737,11 +737,11 @@ class nn {
|
|
|
737
737
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function z(t) {
|
|
741
741
|
const e = Object.prototype.toString.call(t);
|
|
742
742
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function ee(t, e) {
|
|
745
745
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
746
746
|
}
|
|
747
747
|
const nt = 6048e5, an = 864e5, at = 6e4, rt = 36e5;
|
|
@@ -751,26 +751,26 @@ function Te() {
|
|
|
751
751
|
}
|
|
752
752
|
function pe(t, e) {
|
|
753
753
|
var o, f, u, d;
|
|
754
|
-
const n = Te(), a = (e == null ? void 0 : e.weekStartsOn) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, r =
|
|
754
|
+
const n = Te(), a = (e == null ? void 0 : e.weekStartsOn) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, r = z(t), i = r.getDay(), l = (i < a ? 7 : 0) + i - a;
|
|
755
755
|
return r.setDate(r.getDate() - l), r.setHours(0, 0, 0, 0), r;
|
|
756
756
|
}
|
|
757
757
|
function xe(t) {
|
|
758
758
|
return pe(t, { weekStartsOn: 1 });
|
|
759
759
|
}
|
|
760
760
|
function it(t) {
|
|
761
|
-
const e =
|
|
761
|
+
const e = z(t), n = e.getFullYear(), a = ee(t, 0);
|
|
762
762
|
a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
763
|
-
const r = xe(a), i =
|
|
763
|
+
const r = xe(a), i = ee(t, 0);
|
|
764
764
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
765
765
|
const l = xe(i);
|
|
766
766
|
return e.getTime() >= r.getTime() ? n + 1 : e.getTime() >= l.getTime() ? n : n - 1;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
const e =
|
|
768
|
+
function Ye(t) {
|
|
769
|
+
const e = z(t);
|
|
770
770
|
return e.setHours(0, 0, 0, 0), e;
|
|
771
771
|
}
|
|
772
|
-
function
|
|
773
|
-
const e =
|
|
772
|
+
function We(t) {
|
|
773
|
+
const e = z(t), n = new Date(
|
|
774
774
|
Date.UTC(
|
|
775
775
|
e.getFullYear(),
|
|
776
776
|
e.getMonth(),
|
|
@@ -784,11 +784,11 @@ function je(t) {
|
|
|
784
784
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
785
785
|
}
|
|
786
786
|
function sn(t, e) {
|
|
787
|
-
const n =
|
|
787
|
+
const n = Ye(t), a = Ye(e), r = +n - We(n), i = +a - We(a);
|
|
788
788
|
return Math.round((r - i) / an);
|
|
789
789
|
}
|
|
790
790
|
function on(t) {
|
|
791
|
-
const e = it(t), n =
|
|
791
|
+
const e = it(t), n = ee(t, 0);
|
|
792
792
|
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), xe(n);
|
|
793
793
|
}
|
|
794
794
|
function ln(t) {
|
|
@@ -797,11 +797,11 @@ function ln(t) {
|
|
|
797
797
|
function st(t) {
|
|
798
798
|
if (!ln(t) && typeof t != "number")
|
|
799
799
|
return !1;
|
|
800
|
-
const e =
|
|
800
|
+
const e = z(t);
|
|
801
801
|
return !isNaN(Number(e));
|
|
802
802
|
}
|
|
803
803
|
function un(t) {
|
|
804
|
-
const e =
|
|
804
|
+
const e = z(t), n = ee(t, 0);
|
|
805
805
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
806
806
|
}
|
|
807
807
|
const cn = {
|
|
@@ -1131,11 +1131,11 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1131
1131
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1132
1132
|
}, Hn = {
|
|
1133
1133
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1134
|
-
},
|
|
1134
|
+
}, Bn = {
|
|
1135
1135
|
narrow: /^[jfmasond]/i,
|
|
1136
1136
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1137
1137
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1138
|
-
},
|
|
1138
|
+
}, _n = {
|
|
1139
1139
|
narrow: [
|
|
1140
1140
|
/^j/i,
|
|
1141
1141
|
/^f/i,
|
|
@@ -1186,7 +1186,7 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1186
1186
|
evening: /evening/i,
|
|
1187
1187
|
night: /night/i
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1189
|
+
}, qn = {
|
|
1190
1190
|
ordinalNumber: Pn({
|
|
1191
1191
|
matchPattern: En,
|
|
1192
1192
|
parsePattern: Fn,
|
|
@@ -1206,9 +1206,9 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1206
1206
|
valueCallback: (t) => t + 1
|
|
1207
1207
|
}),
|
|
1208
1208
|
month: de({
|
|
1209
|
-
matchPatterns:
|
|
1209
|
+
matchPatterns: Bn,
|
|
1210
1210
|
defaultMatchWidth: "wide",
|
|
1211
|
-
parsePatterns:
|
|
1211
|
+
parsePatterns: _n,
|
|
1212
1212
|
defaultParseWidth: "any"
|
|
1213
1213
|
}),
|
|
1214
1214
|
day: de({
|
|
@@ -1223,49 +1223,49 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1223
1223
|
parsePatterns: jn,
|
|
1224
1224
|
defaultParseWidth: "any"
|
|
1225
1225
|
})
|
|
1226
|
-
},
|
|
1226
|
+
}, $n = {
|
|
1227
1227
|
code: "en-US",
|
|
1228
1228
|
formatDistance: dn,
|
|
1229
1229
|
formatLong: hn,
|
|
1230
1230
|
formatRelative: vn,
|
|
1231
1231
|
localize: Sn,
|
|
1232
|
-
match:
|
|
1232
|
+
match: qn,
|
|
1233
1233
|
options: {
|
|
1234
1234
|
weekStartsOn: 0,
|
|
1235
1235
|
firstWeekContainsDate: 1
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
1238
|
function Un(t) {
|
|
1239
|
-
const e =
|
|
1239
|
+
const e = z(t);
|
|
1240
1240
|
return sn(e, un(e)) + 1;
|
|
1241
1241
|
}
|
|
1242
1242
|
function Ln(t) {
|
|
1243
|
-
const e =
|
|
1243
|
+
const e = z(t), n = +xe(e) - +on(e);
|
|
1244
1244
|
return Math.round(n / nt) + 1;
|
|
1245
1245
|
}
|
|
1246
1246
|
function ot(t, e) {
|
|
1247
1247
|
var d, h, m, x;
|
|
1248
|
-
const n =
|
|
1248
|
+
const n = z(t), a = n.getFullYear(), r = Te(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((x = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, l = ee(t, 0);
|
|
1249
1249
|
l.setFullYear(a + 1, 0, i), l.setHours(0, 0, 0, 0);
|
|
1250
|
-
const o = pe(l, e), f =
|
|
1250
|
+
const o = pe(l, e), f = ee(t, 0);
|
|
1251
1251
|
f.setFullYear(a, 0, i), f.setHours(0, 0, 0, 0);
|
|
1252
1252
|
const u = pe(f, e);
|
|
1253
1253
|
return n.getTime() >= o.getTime() ? a + 1 : n.getTime() >= u.getTime() ? a : a - 1;
|
|
1254
1254
|
}
|
|
1255
1255
|
function zn(t, e) {
|
|
1256
1256
|
var o, f, u, d;
|
|
1257
|
-
const n = Te(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, r = ot(t, e), i =
|
|
1257
|
+
const n = Te(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, r = ot(t, e), i = ee(t, 0);
|
|
1258
1258
|
return i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0), pe(i, e);
|
|
1259
1259
|
}
|
|
1260
1260
|
function Qn(t, e) {
|
|
1261
|
-
const n =
|
|
1261
|
+
const n = z(t), a = +pe(n, e) - +zn(n, e);
|
|
1262
1262
|
return Math.round(a / nt) + 1;
|
|
1263
1263
|
}
|
|
1264
1264
|
function P(t, e) {
|
|
1265
1265
|
const n = t < 0 ? "-" : "", a = Math.abs(t).toString().padStart(e, "0");
|
|
1266
1266
|
return n + a;
|
|
1267
1267
|
}
|
|
1268
|
-
const
|
|
1268
|
+
const X = {
|
|
1269
1269
|
// Year
|
|
1270
1270
|
y(t, e) {
|
|
1271
1271
|
const n = t.getFullYear(), a = n > 0 ? n : 1 - n;
|
|
@@ -1319,7 +1319,7 @@ const Z = {
|
|
|
1319
1319
|
);
|
|
1320
1320
|
return P(r, e.length);
|
|
1321
1321
|
}
|
|
1322
|
-
},
|
|
1322
|
+
}, ie = {
|
|
1323
1323
|
am: "am",
|
|
1324
1324
|
pm: "pm",
|
|
1325
1325
|
midnight: "midnight",
|
|
@@ -1328,7 +1328,7 @@ const Z = {
|
|
|
1328
1328
|
afternoon: "afternoon",
|
|
1329
1329
|
evening: "evening",
|
|
1330
1330
|
night: "night"
|
|
1331
|
-
},
|
|
1331
|
+
}, je = {
|
|
1332
1332
|
// Era
|
|
1333
1333
|
G: function(t, e, n) {
|
|
1334
1334
|
const a = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1350,7 +1350,7 @@ const Z = {
|
|
|
1350
1350
|
const a = t.getFullYear(), r = a > 0 ? a : 1 - a;
|
|
1351
1351
|
return n.ordinalNumber(r, { unit: "year" });
|
|
1352
1352
|
}
|
|
1353
|
-
return
|
|
1353
|
+
return X.y(t, e);
|
|
1354
1354
|
},
|
|
1355
1355
|
// Local week-numbering year
|
|
1356
1356
|
Y: function(t, e, n, a) {
|
|
@@ -1441,7 +1441,7 @@ const Z = {
|
|
|
1441
1441
|
switch (e) {
|
|
1442
1442
|
case "M":
|
|
1443
1443
|
case "MM":
|
|
1444
|
-
return
|
|
1444
|
+
return X.M(t, e);
|
|
1445
1445
|
case "Mo":
|
|
1446
1446
|
return n.ordinalNumber(a + 1, { unit: "month" });
|
|
1447
1447
|
case "MMM":
|
|
@@ -1496,7 +1496,7 @@ const Z = {
|
|
|
1496
1496
|
},
|
|
1497
1497
|
// Day of the month
|
|
1498
1498
|
d: function(t, e, n) {
|
|
1499
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1499
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : X.d(t, e);
|
|
1500
1500
|
},
|
|
1501
1501
|
// Day of year
|
|
1502
1502
|
D: function(t, e, n) {
|
|
@@ -1663,7 +1663,7 @@ const Z = {
|
|
|
1663
1663
|
b: function(t, e, n) {
|
|
1664
1664
|
const a = t.getHours();
|
|
1665
1665
|
let r;
|
|
1666
|
-
switch (a === 12 ? r =
|
|
1666
|
+
switch (a === 12 ? r = ie.noon : a === 0 ? r = ie.midnight : r = a / 12 >= 1 ? "pm" : "am", e) {
|
|
1667
1667
|
case "b":
|
|
1668
1668
|
case "bb":
|
|
1669
1669
|
return n.dayPeriod(r, {
|
|
@@ -1692,7 +1692,7 @@ const Z = {
|
|
|
1692
1692
|
B: function(t, e, n) {
|
|
1693
1693
|
const a = t.getHours();
|
|
1694
1694
|
let r;
|
|
1695
|
-
switch (a >= 17 ? r =
|
|
1695
|
+
switch (a >= 17 ? r = ie.evening : a >= 12 ? r = ie.afternoon : a >= 4 ? r = ie.morning : r = ie.night, e) {
|
|
1696
1696
|
case "B":
|
|
1697
1697
|
case "BB":
|
|
1698
1698
|
case "BBB":
|
|
@@ -1719,11 +1719,11 @@ const Z = {
|
|
|
1719
1719
|
let a = t.getHours() % 12;
|
|
1720
1720
|
return a === 0 && (a = 12), n.ordinalNumber(a, { unit: "hour" });
|
|
1721
1721
|
}
|
|
1722
|
-
return
|
|
1722
|
+
return X.h(t, e);
|
|
1723
1723
|
},
|
|
1724
1724
|
// Hour [0-23]
|
|
1725
1725
|
H: function(t, e, n) {
|
|
1726
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1726
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : X.H(t, e);
|
|
1727
1727
|
},
|
|
1728
1728
|
// Hour [0-11]
|
|
1729
1729
|
K: function(t, e, n) {
|
|
@@ -1737,15 +1737,15 @@ const Z = {
|
|
|
1737
1737
|
},
|
|
1738
1738
|
// Minute
|
|
1739
1739
|
m: function(t, e, n) {
|
|
1740
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1740
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : X.m(t, e);
|
|
1741
1741
|
},
|
|
1742
1742
|
// Second
|
|
1743
1743
|
s: function(t, e, n) {
|
|
1744
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1744
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : X.s(t, e);
|
|
1745
1745
|
},
|
|
1746
1746
|
// Fraction of second
|
|
1747
1747
|
S: function(t, e) {
|
|
1748
|
-
return
|
|
1748
|
+
return X.S(t, e);
|
|
1749
1749
|
},
|
|
1750
1750
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1751
1751
|
X: function(t, e, n) {
|
|
@@ -1754,14 +1754,14 @@ const Z = {
|
|
|
1754
1754
|
return "Z";
|
|
1755
1755
|
switch (e) {
|
|
1756
1756
|
case "X":
|
|
1757
|
-
return
|
|
1757
|
+
return $e(a);
|
|
1758
1758
|
case "XXXX":
|
|
1759
1759
|
case "XX":
|
|
1760
|
-
return
|
|
1760
|
+
return J(a);
|
|
1761
1761
|
case "XXXXX":
|
|
1762
1762
|
case "XXX":
|
|
1763
1763
|
default:
|
|
1764
|
-
return
|
|
1764
|
+
return J(a, ":");
|
|
1765
1765
|
}
|
|
1766
1766
|
},
|
|
1767
1767
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1769,14 +1769,14 @@ const Z = {
|
|
|
1769
1769
|
const a = t.getTimezoneOffset();
|
|
1770
1770
|
switch (e) {
|
|
1771
1771
|
case "x":
|
|
1772
|
-
return
|
|
1772
|
+
return $e(a);
|
|
1773
1773
|
case "xxxx":
|
|
1774
1774
|
case "xx":
|
|
1775
|
-
return
|
|
1775
|
+
return J(a);
|
|
1776
1776
|
case "xxxxx":
|
|
1777
1777
|
case "xxx":
|
|
1778
1778
|
default:
|
|
1779
|
-
return
|
|
1779
|
+
return J(a, ":");
|
|
1780
1780
|
}
|
|
1781
1781
|
},
|
|
1782
1782
|
// Timezone (GMT)
|
|
@@ -1789,7 +1789,7 @@ const Z = {
|
|
|
1789
1789
|
return "GMT" + qe(a, ":");
|
|
1790
1790
|
case "OOOO":
|
|
1791
1791
|
default:
|
|
1792
|
-
return "GMT" +
|
|
1792
|
+
return "GMT" + J(a, ":");
|
|
1793
1793
|
}
|
|
1794
1794
|
},
|
|
1795
1795
|
// Timezone (specific non-location)
|
|
@@ -1802,7 +1802,7 @@ const Z = {
|
|
|
1802
1802
|
return "GMT" + qe(a, ":");
|
|
1803
1803
|
case "zzzz":
|
|
1804
1804
|
default:
|
|
1805
|
-
return "GMT" +
|
|
1805
|
+
return "GMT" + J(a, ":");
|
|
1806
1806
|
}
|
|
1807
1807
|
},
|
|
1808
1808
|
// Seconds timestamp
|
|
@@ -1820,14 +1820,14 @@ function qe(t, e = "") {
|
|
|
1820
1820
|
const n = t > 0 ? "-" : "+", a = Math.abs(t), r = Math.trunc(a / 60), i = a % 60;
|
|
1821
1821
|
return i === 0 ? n + String(r) : n + String(r) + e + P(i, 2);
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + P(Math.abs(t) / 60, 2) :
|
|
1823
|
+
function $e(t, e) {
|
|
1824
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + P(Math.abs(t) / 60, 2) : J(t, e);
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function J(t, e = "") {
|
|
1827
1827
|
const n = t > 0 ? "-" : "+", a = Math.abs(t), r = P(Math.trunc(a / 60), 2), i = P(a % 60, 2);
|
|
1828
1828
|
return n + r + e + i;
|
|
1829
1829
|
}
|
|
1830
|
-
const
|
|
1830
|
+
const Ue = (t, e) => {
|
|
1831
1831
|
switch (t) {
|
|
1832
1832
|
case "P":
|
|
1833
1833
|
return e.date({ width: "short" });
|
|
@@ -1854,7 +1854,7 @@ const Le = (t, e) => {
|
|
|
1854
1854
|
}, Vn = (t, e) => {
|
|
1855
1855
|
const n = t.match(/(P+)(p+)?/) || [], a = n[1], r = n[2];
|
|
1856
1856
|
if (!r)
|
|
1857
|
-
return
|
|
1857
|
+
return Ue(t, e);
|
|
1858
1858
|
let i;
|
|
1859
1859
|
switch (a) {
|
|
1860
1860
|
case "P":
|
|
@@ -1871,12 +1871,12 @@ const Le = (t, e) => {
|
|
|
1871
1871
|
i = e.dateTime({ width: "full" });
|
|
1872
1872
|
break;
|
|
1873
1873
|
}
|
|
1874
|
-
return i.replace("{{date}}",
|
|
1874
|
+
return i.replace("{{date}}", Ue(a, e)).replace("{{time}}", lt(r, e));
|
|
1875
1875
|
}, In = {
|
|
1876
1876
|
p: lt,
|
|
1877
1877
|
P: Vn
|
|
1878
|
-
}, Xn = /^D+$/, Gn = /^Y+$/,
|
|
1879
|
-
function
|
|
1878
|
+
}, Xn = /^D+$/, Gn = /^Y+$/, Zn = ["D", "DD", "YY", "YYYY"];
|
|
1879
|
+
function Jn(t) {
|
|
1880
1880
|
return Xn.test(t);
|
|
1881
1881
|
}
|
|
1882
1882
|
function Kn(t) {
|
|
@@ -1884,7 +1884,7 @@ function Kn(t) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
function ea(t, e, n) {
|
|
1886
1886
|
const a = ta(t, e, n);
|
|
1887
|
-
if (console.warn(a),
|
|
1887
|
+
if (console.warn(a), Zn.includes(t)) throw new RangeError(a);
|
|
1888
1888
|
}
|
|
1889
1889
|
function ta(t, e, n) {
|
|
1890
1890
|
const a = t[0] === "Y" ? "years" : "days of the month";
|
|
@@ -1893,7 +1893,7 @@ function ta(t, e, n) {
|
|
|
1893
1893
|
const na = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, aa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ra = /^'([^]*?)'?$/, ia = /''/g, sa = /[a-zA-Z]/;
|
|
1894
1894
|
function we(t, e, n) {
|
|
1895
1895
|
var d, h, m, x;
|
|
1896
|
-
const a = Te(), r = a.locale ??
|
|
1896
|
+
const a = Te(), r = a.locale ?? $n, i = a.firstWeekContainsDate ?? ((h = (d = a.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, l = a.weekStartsOn ?? ((x = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : x.weekStartsOn) ?? 0, o = z(t);
|
|
1897
1897
|
if (!st(o))
|
|
1898
1898
|
throw new RangeError("Invalid time value");
|
|
1899
1899
|
let f = e.match(aa).map((g) => {
|
|
@@ -1909,7 +1909,7 @@ function we(t, e, n) {
|
|
|
1909
1909
|
const b = g[0];
|
|
1910
1910
|
if (b === "'")
|
|
1911
1911
|
return { isToken: !1, value: oa(g) };
|
|
1912
|
-
if (
|
|
1912
|
+
if (je[b])
|
|
1913
1913
|
return { isToken: !0, value: g };
|
|
1914
1914
|
if (b.match(sa))
|
|
1915
1915
|
throw new RangeError(
|
|
@@ -1926,8 +1926,8 @@ function we(t, e, n) {
|
|
|
1926
1926
|
return f.map((g) => {
|
|
1927
1927
|
if (!g.isToken) return g.value;
|
|
1928
1928
|
const b = g.value;
|
|
1929
|
-
(Kn(b) ||
|
|
1930
|
-
const y =
|
|
1929
|
+
(Kn(b) || Jn(b)) && ea(b, e, String(t));
|
|
1930
|
+
const y = je[b[0]];
|
|
1931
1931
|
return y(o, b, r.localize, u);
|
|
1932
1932
|
}).join("");
|
|
1933
1933
|
}
|
|
@@ -2100,26 +2100,26 @@ const Ca = (t) => {
|
|
|
2100
2100
|
n.component(e.name, t);
|
|
2101
2101
|
}, t;
|
|
2102
2102
|
};
|
|
2103
|
-
var
|
|
2103
|
+
var Q = /* @__PURE__ */ ((t) => (t[t.Queue = 0] = "Queue", t[t.Uploading = 1] = "Uploading", t[t.Done = 2] = "Done", t[t.Cancelled = 3] = "Cancelled", t[t.Remove = 4] = "Remove", t[t.Error = 5] = "Error", t))(Q || {});
|
|
2104
2104
|
class Pa {
|
|
2105
2105
|
constructor(e = {}, n = {}) {
|
|
2106
2106
|
/**
|
|
2107
2107
|
* 上传配置
|
|
2108
2108
|
*/
|
|
2109
|
-
|
|
2109
|
+
U(this, "uploadConfig");
|
|
2110
2110
|
/**
|
|
2111
2111
|
* 删除配置
|
|
2112
2112
|
*/
|
|
2113
|
-
|
|
2113
|
+
U(this, "removeConfig");
|
|
2114
2114
|
const a = { type: "config", url: "", timeout: 0, headers: null, data: {} };
|
|
2115
2115
|
this.uploadConfig = Object.assign({}, a, e), this.removeConfig = Object.assign({}, a, n);
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function He(t, e) {
|
|
2119
2119
|
const { formatTo: n } = Ta();
|
|
2120
2120
|
return n(t, e);
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function Le(t, e) {
|
|
2123
2123
|
if (!e)
|
|
2124
2124
|
return "";
|
|
2125
2125
|
let n = "";
|
|
@@ -2133,7 +2133,7 @@ function Ea(t) {
|
|
|
2133
2133
|
return -1;
|
|
2134
2134
|
if (t !== "createTime") {
|
|
2135
2135
|
let i = "", l = "";
|
|
2136
|
-
return t.indexOf(".") > -1 ? (i =
|
|
2136
|
+
return t.indexOf(".") > -1 ? (i = Le(t, e), l = Le(t, n)) : (i = e[t], l = n[t]), i > l ? 1 : -1;
|
|
2137
2137
|
}
|
|
2138
2138
|
const a = new Date(e[t]), r = new Date(n[t]);
|
|
2139
2139
|
return a.getTime() > r.getTime() ? -1 : 1;
|
|
@@ -2154,7 +2154,7 @@ function me(t) {
|
|
|
2154
2154
|
function ft(t, e) {
|
|
2155
2155
|
return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize = me(1024 * 1024 * (parseInt(String(t.maxFileSize), 10) || 1)))), e;
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function ze(t) {
|
|
2158
2158
|
let e = "ffilepreview--filetype";
|
|
2159
2159
|
if (!t)
|
|
2160
2160
|
return e + "-any";
|
|
@@ -2201,12 +2201,12 @@ function Qe(t) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
return e;
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function Qe(t) {
|
|
2205
2205
|
var e;
|
|
2206
2206
|
if (t.type === "done")
|
|
2207
2207
|
return 100;
|
|
2208
2208
|
if (t.file && t.file.progress) {
|
|
2209
|
-
if (t.file.progress.status ===
|
|
2209
|
+
if (t.file.progress.status === Q.Uploading) {
|
|
2210
2210
|
const n = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
|
|
2211
2211
|
return n > 5 ? n : 5;
|
|
2212
2212
|
}
|
|
@@ -2219,7 +2219,7 @@ function Fa(t) {
|
|
|
2219
2219
|
return t ? (typeof t == "string" && (e = parseInt(t, 10)), me(e)) : "0 Byte";
|
|
2220
2220
|
}
|
|
2221
2221
|
const Oa = () => Math.random().toString(36).substring(7);
|
|
2222
|
-
function
|
|
2222
|
+
function Ve(t, e) {
|
|
2223
2223
|
return {
|
|
2224
2224
|
fileIndex: e,
|
|
2225
2225
|
id: Oa(),
|
|
@@ -2228,7 +2228,7 @@ function Ie(t, e) {
|
|
|
2228
2228
|
type: t.type,
|
|
2229
2229
|
form: new FormData(),
|
|
2230
2230
|
progress: {
|
|
2231
|
-
status:
|
|
2231
|
+
status: Q.Queue,
|
|
2232
2232
|
data: {
|
|
2233
2233
|
percentage: 0,
|
|
2234
2234
|
speed: 0,
|
|
@@ -2239,17 +2239,17 @@ function Ie(t, e) {
|
|
|
2239
2239
|
etaHuman: null
|
|
2240
2240
|
}
|
|
2241
2241
|
},
|
|
2242
|
-
lastModifiedDate:
|
|
2242
|
+
lastModifiedDate: He(new Date(t.lastModified), "yyyy-MM-dd HH:mm:ss"),
|
|
2243
2243
|
nativeFile: t
|
|
2244
2244
|
};
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function Ie(t) {
|
|
2247
2247
|
const e = [];
|
|
2248
2248
|
return t.forEach((n) => {
|
|
2249
2249
|
const a = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
|
|
2250
2250
|
for (const r in a) {
|
|
2251
2251
|
const i = r.replace("extend", "response").replace("createTime", "lastModifiedDate");
|
|
2252
|
-
n.hasOwnProperty(i) && (i === "lastModifiedDate" ? a[r] =
|
|
2252
|
+
n.hasOwnProperty(i) && (i === "lastModifiedDate" ? a[r] = He(n[i], "yyyy-MM-dd HH:mm:ss") : a[r] = n[i]);
|
|
2253
2253
|
}
|
|
2254
2254
|
e.push(a);
|
|
2255
2255
|
}), e;
|
|
@@ -2270,53 +2270,53 @@ function Ha(t, e) {
|
|
|
2270
2270
|
(a) => a.toLowerCase() === n.toLowerCase()
|
|
2271
2271
|
) > -1;
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2273
|
+
function Ba(t) {
|
|
2274
2274
|
if (t)
|
|
2275
2275
|
return t.split(`
|
|
2276
2276
|
`).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, n) => (e[n[0]] = n[1], e), {});
|
|
2277
2277
|
}
|
|
2278
|
-
function
|
|
2278
|
+
function Xe(t) {
|
|
2279
2279
|
return new Date(t * 1e3).toISOString().substr(11, 8);
|
|
2280
2280
|
}
|
|
2281
|
-
class
|
|
2281
|
+
class _a extends Pa {
|
|
2282
2282
|
upload(e, n, a, r) {
|
|
2283
2283
|
const i = e[0];
|
|
2284
2284
|
return new Promise((l, o) => {
|
|
2285
2285
|
var k, A;
|
|
2286
2286
|
const f = n.url || a.url || "", u = n.method || "POST", d = n.data || {}, h = n.headers || {}, m = new XMLHttpRequest(), x = (/* @__PURE__ */ new Date()).getTime();
|
|
2287
2287
|
let g = ((k = i.progress) == null ? void 0 : k.data) && i.progress.data.startTime || x, b = 0, y = null;
|
|
2288
|
-
m.upload.addEventListener("progress", (
|
|
2288
|
+
m.upload.addEventListener("progress", (M) => {
|
|
2289
2289
|
var O;
|
|
2290
|
-
if (
|
|
2291
|
-
const
|
|
2292
|
-
b = Math.round(
|
|
2293
|
-
status:
|
|
2290
|
+
if (M.lengthComputable) {
|
|
2291
|
+
const D = Math.round(M.loaded * 100 / M.total), H = (/* @__PURE__ */ new Date()).getTime() - x;
|
|
2292
|
+
b = Math.round(M.loaded / H * 1e3), g = ((O = i.progress) == null ? void 0 : O.data) && i.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), y = Math.ceil((M.total - M.loaded) / b), i.progress = {
|
|
2293
|
+
status: Q.Uploading,
|
|
2294
2294
|
data: {
|
|
2295
|
-
percentage:
|
|
2295
|
+
percentage: D,
|
|
2296
2296
|
speed: b,
|
|
2297
2297
|
speedHuman: `${me(b)}/s`,
|
|
2298
2298
|
startTime: g,
|
|
2299
2299
|
endTime: null,
|
|
2300
2300
|
eta: y,
|
|
2301
|
-
etaHuman:
|
|
2301
|
+
etaHuman: Xe(y)
|
|
2302
2302
|
}
|
|
2303
2303
|
}, r({ type: "uploading", files: [i] });
|
|
2304
2304
|
}
|
|
2305
|
-
}, !1), m.upload.addEventListener("error", (
|
|
2306
|
-
o(
|
|
2305
|
+
}, !1), m.upload.addEventListener("error", (M) => {
|
|
2306
|
+
o(M);
|
|
2307
2307
|
}), m.onreadystatechange = () => {
|
|
2308
2308
|
if (m.readyState === XMLHttpRequest.DONE) {
|
|
2309
|
-
const
|
|
2309
|
+
const M = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() - g) * 1e3);
|
|
2310
2310
|
i.progress = {
|
|
2311
|
-
status:
|
|
2311
|
+
status: Q.Done,
|
|
2312
2312
|
data: {
|
|
2313
2313
|
percentage: 100,
|
|
2314
|
-
speed:
|
|
2315
|
-
speedHuman: `${me(
|
|
2314
|
+
speed: M,
|
|
2315
|
+
speedHuman: `${me(M)}/s`,
|
|
2316
2316
|
startTime: g,
|
|
2317
2317
|
endTime: (/* @__PURE__ */ new Date()).getTime(),
|
|
2318
2318
|
eta: y,
|
|
2319
|
-
etaHuman:
|
|
2319
|
+
etaHuman: Xe(y || 0)
|
|
2320
2320
|
}
|
|
2321
2321
|
}, i.responseStatus = m.status;
|
|
2322
2322
|
try {
|
|
@@ -2324,19 +2324,19 @@ class Ba extends Pa {
|
|
|
2324
2324
|
} catch {
|
|
2325
2325
|
i.response = m.response;
|
|
2326
2326
|
}
|
|
2327
|
-
i.responseHeaders =
|
|
2327
|
+
i.responseHeaders = Ba(m.getAllResponseHeaders()), l({ type: "done", files: [i] });
|
|
2328
2328
|
}
|
|
2329
2329
|
}, m.open(u, f, !0), m.withCredentials = !!n.withCredentials;
|
|
2330
2330
|
try {
|
|
2331
|
-
const
|
|
2332
|
-
Object.keys(h).forEach((
|
|
2331
|
+
const M = i.nativeFile;
|
|
2332
|
+
Object.keys(h).forEach((D) => m.setRequestHeader(D, h[D]));
|
|
2333
2333
|
let O;
|
|
2334
|
-
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((
|
|
2335
|
-
var
|
|
2336
|
-
return (
|
|
2337
|
-
}), (A = i.form) == null || A.append(n.fieldName || "file",
|
|
2338
|
-
} catch (
|
|
2339
|
-
o(
|
|
2334
|
+
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((D) => {
|
|
2335
|
+
var H;
|
|
2336
|
+
return (H = i.form) == null ? void 0 : H.append(D, d[D]);
|
|
2337
|
+
}), (A = i.form) == null || A.append(n.fieldName || "file", M, M.name), O = i.form) : O = M, m.send(O);
|
|
2338
|
+
} catch (M) {
|
|
2339
|
+
o(M);
|
|
2340
2340
|
}
|
|
2341
2341
|
return () => {
|
|
2342
2342
|
m.abort();
|
|
@@ -2366,23 +2366,23 @@ const Ra = {
|
|
|
2366
2366
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2367
2367
|
animate: { type: String, default: "fadeIn" },
|
|
2368
2368
|
options: { type: Object }
|
|
2369
|
-
},
|
|
2369
|
+
}, Pe = /* @__PURE__ */ te({
|
|
2370
2370
|
name: "Toast",
|
|
2371
2371
|
props: Ya,
|
|
2372
2372
|
emits: ["close", "click"],
|
|
2373
2373
|
setup: (t, e) => {
|
|
2374
|
-
const n = N(t.animate), a = "fadeOut", r =
|
|
2374
|
+
const n = N(t.animate), a = "fadeOut", r = W(() => t.options), i = N(!1), l = W(() => {
|
|
2375
2375
|
const k = {
|
|
2376
2376
|
animated: i.value,
|
|
2377
2377
|
toast: !0
|
|
2378
2378
|
};
|
|
2379
2379
|
return k[t.animate] = !1, k[a] = i.value, k[r.value.type] = !0, r.value.theme && (k[r.value.theme] = !0), k;
|
|
2380
|
-
}), o =
|
|
2381
|
-
const
|
|
2380
|
+
}), o = W(() => {
|
|
2381
|
+
const M = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, O = {
|
|
2382
2382
|
"f-icon": !0
|
|
2383
2383
|
};
|
|
2384
|
-
return O[
|
|
2385
|
-
}), f =
|
|
2384
|
+
return O[M] = !0, O;
|
|
2385
|
+
}), f = W(() => r.value.title || r.value.message), u = W(() => r.value.title && r.value.message), d = W(() => !r.value.title && r.value.message), h = W(() => t.showCloseButton), m = W(() => !!r.value.buttons || !!e.slots.default);
|
|
2386
2386
|
function x(k) {
|
|
2387
2387
|
k.stopPropagation(), k.preventDefault(), i.value = !1, setTimeout(() => {
|
|
2388
2388
|
e.emit("close", r.value);
|
|
@@ -2393,16 +2393,16 @@ const Ra = {
|
|
|
2393
2393
|
function b(k) {
|
|
2394
2394
|
return `f-preten-link ${k.customClass ? k.customClass : ""}`;
|
|
2395
2395
|
}
|
|
2396
|
-
|
|
2396
|
+
K(n, () => {
|
|
2397
2397
|
n.value;
|
|
2398
2398
|
});
|
|
2399
2399
|
const y = () => {
|
|
2400
2400
|
var k;
|
|
2401
|
-
return s(
|
|
2401
|
+
return s(se, null, [s("div", {
|
|
2402
2402
|
class: "after-toast-msg text-right"
|
|
2403
2403
|
}, [!e.slots.default && ((k = r.value.buttons) == null ? void 0 : k.map((A) => s("span", {
|
|
2404
2404
|
class: b(A),
|
|
2405
|
-
onClick: (
|
|
2405
|
+
onClick: (M) => void 0
|
|
2406
2406
|
}, [A.text]))), e.slots.default && e.slots.default()])]);
|
|
2407
2407
|
};
|
|
2408
2408
|
return () => s("div", {
|
|
@@ -2421,7 +2421,7 @@ const Ra = {
|
|
|
2421
2421
|
class: o.value
|
|
2422
2422
|
}, null)]), s("div", {
|
|
2423
2423
|
class: "modal-tips-content"
|
|
2424
|
-
}, [u.value && s(
|
|
2424
|
+
}, [u.value && s(se, null, [s("h5", {
|
|
2425
2425
|
class: "toast-title modal-tips-title",
|
|
2426
2426
|
innerHTML: r.value.title
|
|
2427
2427
|
}, null), s("p", {
|
|
@@ -2439,19 +2439,19 @@ const Ra = {
|
|
|
2439
2439
|
innerHTML: r.value.message
|
|
2440
2440
|
}, null))])])]);
|
|
2441
2441
|
}
|
|
2442
|
-
}), be = /* @__PURE__ */
|
|
2442
|
+
}), be = /* @__PURE__ */ te({
|
|
2443
2443
|
name: "Notify",
|
|
2444
2444
|
props: Ra,
|
|
2445
2445
|
emits: ["close", "empty"],
|
|
2446
2446
|
setup(t, e) {
|
|
2447
|
-
const n =
|
|
2447
|
+
const n = W(() => ({
|
|
2448
2448
|
"farris-notify": !0
|
|
2449
2449
|
})), a = {
|
|
2450
2450
|
left: 12,
|
|
2451
2451
|
right: 12,
|
|
2452
2452
|
top: 20,
|
|
2453
2453
|
bottom: 12
|
|
2454
|
-
}, r = N(), i = N(t.options), l = N(t.showCloseButton), o =
|
|
2454
|
+
}, r = N(), i = N(t.options), l = N(t.showCloseButton), o = W(() => t.position || "bottom-right"), f = W(() => t.timeout != null ? t.timeout : 3e3), u = W(() => {
|
|
2455
2455
|
const m = t.bottom ? t.bottom : a.bottom, x = t.top ? t.top : a.top, g = {
|
|
2456
2456
|
transition: "all 0.2s ease",
|
|
2457
2457
|
left: o.value.indexOf("left") > -1 ? `${t.left ? t.left : a.left}px` : "",
|
|
@@ -2478,7 +2478,7 @@ const Ra = {
|
|
|
2478
2478
|
class: n.value,
|
|
2479
2479
|
style: u.value,
|
|
2480
2480
|
ref: r
|
|
2481
|
-
}, [s(
|
|
2481
|
+
}, [s(Pe, {
|
|
2482
2482
|
options: i.value,
|
|
2483
2483
|
showCloseButton: l.value,
|
|
2484
2484
|
animate: t.animate,
|
|
@@ -2488,8 +2488,8 @@ const Ra = {
|
|
|
2488
2488
|
});
|
|
2489
2489
|
class pt {
|
|
2490
2490
|
constructor() {
|
|
2491
|
-
|
|
2492
|
-
|
|
2491
|
+
U(this, "notifyRefs", []);
|
|
2492
|
+
U(this, "globalConfig", bt({}));
|
|
2493
2493
|
}
|
|
2494
2494
|
createNotifyInstance(e) {
|
|
2495
2495
|
const n = this, r = Object.assign({
|
|
@@ -2515,9 +2515,9 @@ class pt {
|
|
|
2515
2515
|
r.top = h.bottom;
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
|
-
return
|
|
2518
|
+
return Oe(() => {
|
|
2519
2519
|
document.body.removeChild(i);
|
|
2520
|
-
}),
|
|
2520
|
+
}), Fe(() => {
|
|
2521
2521
|
n.updateNotifyPositionForCreate(r, o);
|
|
2522
2522
|
}), () => s(Dt, {
|
|
2523
2523
|
mode: "out-in",
|
|
@@ -2599,23 +2599,23 @@ class pt {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
const Wa = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
2601
2601
|
be.install = (t) => {
|
|
2602
|
-
t.component(be.name, be), t.component(
|
|
2602
|
+
t.component(be.name, be), t.component(Pe.name, Pe);
|
|
2603
2603
|
const e = new pt();
|
|
2604
2604
|
t.provide(Wa, e), t.provide("FNotifyService", e);
|
|
2605
2605
|
};
|
|
2606
2606
|
const ja = (t = "") => {
|
|
2607
2607
|
let e;
|
|
2608
|
-
return t &&
|
|
2609
|
-
},
|
|
2608
|
+
return t && oe(t, null) && (e = oe(t)), e || (e = new pt()), e;
|
|
2609
|
+
}, qa = (t = "") => {
|
|
2610
2610
|
let e;
|
|
2611
|
-
if (t &&
|
|
2612
|
-
const n =
|
|
2611
|
+
if (t && oe(t, null)) {
|
|
2612
|
+
const n = oe(t);
|
|
2613
2613
|
n && n() && (e = n());
|
|
2614
2614
|
}
|
|
2615
|
-
return e || (e = new
|
|
2615
|
+
return e || (e = new _a()), e;
|
|
2616
2616
|
}, mt = {
|
|
2617
2617
|
getNotify: ja,
|
|
2618
|
-
getServerAPI:
|
|
2618
|
+
getServerAPI: qa
|
|
2619
2619
|
};
|
|
2620
2620
|
function ht(t, e, n) {
|
|
2621
2621
|
const a = mt.getNotify(t.notifyServiceToken), r = N(t.fileInfos), {
|
|
@@ -2629,64 +2629,64 @@ function ht(t, e, n) {
|
|
|
2629
2629
|
previewColumns: m,
|
|
2630
2630
|
uploadEnableMulti: x,
|
|
2631
2631
|
previewButtonDisable: g
|
|
2632
|
-
} =
|
|
2633
|
-
function
|
|
2632
|
+
} = Ee(t), b = N(!1), y = N([]), k = W(() => y.value.length), A = N([]), M = N(""), O = N(D(r.value));
|
|
2633
|
+
function D(c) {
|
|
2634
2634
|
(!c.length || y.value.length !== c.length) && (b.value = !1);
|
|
2635
|
-
const
|
|
2636
|
-
return
|
|
2635
|
+
const T = [...c.map((S) => (S.hasOwnProperty("size") || (S.size = void 0), S.hasOwnProperty("createTime") || (S.createTime = void 0), d.value && (S.checked = !!y.value.find(($) => $.id === S.id) || b.value), S))];
|
|
2636
|
+
return T.sort(Ea(u.value)), d.value && (y.value = [...T].filter((S) => S.checked)), T;
|
|
2637
2637
|
}
|
|
2638
|
-
|
|
2639
|
-
O.value =
|
|
2638
|
+
K(() => t.fileInfos, (c) => {
|
|
2639
|
+
O.value = D(c);
|
|
2640
2640
|
});
|
|
2641
|
-
const
|
|
2641
|
+
const H = (c, v) => {
|
|
2642
2642
|
c.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [v], name: "" });
|
|
2643
|
-
},
|
|
2643
|
+
}, Y = (c, v) => {
|
|
2644
2644
|
c.stopImmediatePropagation(), !g.value && e.emit("filePreviewEvent", v);
|
|
2645
|
-
},
|
|
2646
|
-
v.checked && (y.value = y.value.filter((S) => S.id !== v.id)), e.emit("fileRemoveEvent", v),
|
|
2647
|
-
},
|
|
2645
|
+
}, L = (c, v, T) => {
|
|
2646
|
+
v.checked && (y.value = y.value.filter((S) => S.id !== v.id)), e.emit("fileRemoveEvent", v), T.handleUploadEvent({ type: "remove", file: v });
|
|
2647
|
+
}, V = (c, v = "preview") => c.formatter ? !0 : v === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((S) => S === c.field) > -1 : v === "upload" ? ["state", "name", "size"].findIndex((S) => S === c.field) > -1 : !1, ne = (c) => !(c.field === "state" && (o.value || !l.value)), le = (c) => c.lastIndexOf(".") > 0 ? c.substring(0, c.lastIndexOf(".")) : "", ae = (c) => {
|
|
2648
2648
|
if (c.stopImmediatePropagation(), k.value > 1) {
|
|
2649
2649
|
let v = "";
|
|
2650
|
-
v =
|
|
2650
|
+
v = le(y.value[0].name), e.emit("fileDownloadEvent", {
|
|
2651
2651
|
fileInfos: y.value,
|
|
2652
2652
|
name: v
|
|
2653
2653
|
});
|
|
2654
2654
|
}
|
|
2655
|
-
},
|
|
2655
|
+
}, Z = (c) => {
|
|
2656
2656
|
c.stopImmediatePropagation(), e.emit("fileRemoveEvent", y.value);
|
|
2657
|
-
},
|
|
2657
|
+
}, re = (c) => {
|
|
2658
2658
|
const v = O.value;
|
|
2659
|
-
c.checked ? (v.forEach((
|
|
2660
|
-
|
|
2661
|
-
}), y.value = [...O.value], b.value = !0) : (y.value = [], v.forEach((
|
|
2662
|
-
|
|
2659
|
+
c.checked ? (v.forEach((T) => {
|
|
2660
|
+
T.checked = !0;
|
|
2661
|
+
}), y.value = [...O.value], b.value = !0) : (y.value = [], v.forEach((T) => {
|
|
2662
|
+
T.checked = !1;
|
|
2663
2663
|
}), b.value = !1), e.emit("previewMultiSelectedEvent", y.value);
|
|
2664
|
-
},
|
|
2665
|
-
c && (c.stopImmediatePropagation(), c.stopPropagation()), (!
|
|
2664
|
+
}, B = (c, v) => {
|
|
2665
|
+
c && (c.stopImmediatePropagation(), c.stopPropagation()), (!M.value || v.id !== M.value) && (M.value = v.id, e.emit("selectedEvent", v));
|
|
2666
2666
|
}, E = (c) => {
|
|
2667
|
-
const v = y.value.findIndex((
|
|
2668
|
-
S && (S.checked = c.checked), c.checked && !
|
|
2669
|
-
},
|
|
2667
|
+
const v = y.value.findIndex(($) => $.id === c.id), T = v > -1, S = O.value.find(($) => $.id === c.id);
|
|
2668
|
+
S && (S.checked = c.checked), c.checked && !T && S && y.value.push(S), !c.checked && T && y.value.splice(v, 1), O.value.length > 0 && (y.value.length === O.value.length ? b.value = !0 : b.value = !1), B(null, S), e.emit("previewMultiSelectedEvent", y.value);
|
|
2669
|
+
}, j = (c) => {
|
|
2670
2670
|
var v;
|
|
2671
2671
|
(v = n == null ? void 0 : n.value) == null || v.handleUploadEvent(c);
|
|
2672
2672
|
}, ue = (c) => {
|
|
2673
|
-
|
|
2674
|
-
},
|
|
2675
|
-
let
|
|
2676
|
-
c.files && c.files.length > 0 ?
|
|
2677
|
-
const
|
|
2673
|
+
j({ type: "upload", file: c });
|
|
2674
|
+
}, _ = (c, v) => {
|
|
2675
|
+
let T = [];
|
|
2676
|
+
c.files && c.files.length > 0 ? T = c.files : typeof c.file < "u" && (T = [c.file]), v = v || c.type, T.map((S) => {
|
|
2677
|
+
const $ = A.value.findIndex((I) => {
|
|
2678
2678
|
var ve;
|
|
2679
|
-
return typeof S < "u" && ((ve =
|
|
2679
|
+
return typeof S < "u" && ((ve = I == null ? void 0 : I.file) == null ? void 0 : ve.id) === S.id;
|
|
2680
2680
|
});
|
|
2681
|
-
|
|
2681
|
+
$ > -1 && (A.value[$] = { type: v, file: S });
|
|
2682
2682
|
});
|
|
2683
2683
|
}, Me = (c) => {
|
|
2684
2684
|
if (c.files) {
|
|
2685
|
-
const v = c.files.map((
|
|
2686
|
-
A.value = A.value.filter((
|
|
2687
|
-
var
|
|
2688
|
-
return
|
|
2689
|
-
}) > -1)),
|
|
2685
|
+
const v = c.files.map((T) => T.id);
|
|
2686
|
+
A.value = A.value.filter((T) => !(v.findIndex(($) => {
|
|
2687
|
+
var I;
|
|
2688
|
+
return $ === ((I = T == null ? void 0 : T.file) == null ? void 0 : I.id);
|
|
2689
|
+
}) > -1)), j({
|
|
2690
2690
|
type: "hide",
|
|
2691
2691
|
id: v.join(",")
|
|
2692
2692
|
});
|
|
@@ -2694,32 +2694,32 @@ function ht(t, e, n) {
|
|
|
2694
2694
|
}, he = (c) => {
|
|
2695
2695
|
let v = "warning";
|
|
2696
2696
|
(c.type === "cancelled" || c.type === "removed") && (v = "success");
|
|
2697
|
-
const
|
|
2697
|
+
const T = c.hasOwnProperty("message") ? c.message : "";
|
|
2698
2698
|
a.show({
|
|
2699
|
-
options: { type: v, message:
|
|
2699
|
+
options: { type: v, message: T },
|
|
2700
2700
|
position: "top-center"
|
|
2701
2701
|
});
|
|
2702
2702
|
}, ge = (c) => {
|
|
2703
2703
|
if (c.type === "addedToQueue" && typeof c.file < "u")
|
|
2704
2704
|
A.value.push({ type: c.type, file: c.file }), ue(c.file);
|
|
2705
2705
|
else if (c.type === "start")
|
|
2706
|
-
|
|
2706
|
+
_(c, "start");
|
|
2707
2707
|
else if (c.type === "done") {
|
|
2708
|
-
|
|
2709
|
-
const v = (c.files || []).map((
|
|
2708
|
+
_(c, "done");
|
|
2709
|
+
const v = (c.files || []).map((T) => ({
|
|
2710
2710
|
checked: !1,
|
|
2711
|
-
id:
|
|
2712
|
-
name:
|
|
2713
|
-
size:
|
|
2714
|
-
createTime:
|
|
2711
|
+
id: T.id,
|
|
2712
|
+
name: T.name,
|
|
2713
|
+
size: T.size,
|
|
2714
|
+
createTime: He(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
|
|
2715
2715
|
}));
|
|
2716
|
-
r.value = [...v, ...O.value], Me(c), e.emit("fUploadDoneEvent",
|
|
2716
|
+
r.value = [...v, ...O.value], Me(c), e.emit("fUploadDoneEvent", Ie(c.files || [])), e.emit("uploadDoneEvent", Ie(c.files || []));
|
|
2717
2717
|
} else if (c.type === "cancelled" || c.type === "removed" || c.type === "error") {
|
|
2718
|
-
const v = r.value.filter((
|
|
2718
|
+
const v = r.value.filter((T) => c.files && c.files.findIndex((S) => T.id === S.id) < 0);
|
|
2719
2719
|
r.value = [...v], he(c);
|
|
2720
2720
|
} else c.type === "rejected" && typeof c.file < "u" && he(c);
|
|
2721
2721
|
};
|
|
2722
|
-
return
|
|
2722
|
+
return Oe(() => {
|
|
2723
2723
|
}), {
|
|
2724
2724
|
disabled: i,
|
|
2725
2725
|
uploadVisible: l,
|
|
@@ -2733,25 +2733,25 @@ function ht(t, e, n) {
|
|
|
2733
2733
|
previewMultiSelectedLength: k,
|
|
2734
2734
|
previewSelectAllBtnChecked: b,
|
|
2735
2735
|
uploadEnableMulti: x,
|
|
2736
|
-
previewCurrentId:
|
|
2737
|
-
multiFileRemoveHandler:
|
|
2736
|
+
previewCurrentId: M,
|
|
2737
|
+
multiFileRemoveHandler: Z,
|
|
2738
2738
|
previewMultiSelectChangeHandler: E,
|
|
2739
|
-
fileMultiDownloadHandler:
|
|
2740
|
-
selectOrCancelAllHandler:
|
|
2741
|
-
hasColumnHtmlFunc:
|
|
2742
|
-
showPreviewStateColumn:
|
|
2743
|
-
rowSelectedHandler:
|
|
2744
|
-
fileDownloadHandler:
|
|
2745
|
-
filePreviewHandler:
|
|
2746
|
-
fileRemoveHandler:
|
|
2739
|
+
fileMultiDownloadHandler: ae,
|
|
2740
|
+
selectOrCancelAllHandler: re,
|
|
2741
|
+
hasColumnHtmlFunc: V,
|
|
2742
|
+
showPreviewStateColumn: ne,
|
|
2743
|
+
rowSelectedHandler: B,
|
|
2744
|
+
fileDownloadHandler: H,
|
|
2745
|
+
filePreviewHandler: Y,
|
|
2746
|
+
fileRemoveHandler: L,
|
|
2747
2747
|
handleStateChange: ge
|
|
2748
2748
|
};
|
|
2749
2749
|
}
|
|
2750
|
-
class
|
|
2750
|
+
class $a {
|
|
2751
2751
|
constructor(e, n) {
|
|
2752
2752
|
// 记录在上传的附件数组
|
|
2753
|
-
|
|
2754
|
-
|
|
2753
|
+
U(this, "queue");
|
|
2754
|
+
U(this, "uploadOpts", {
|
|
2755
2755
|
// 默认不限制,0代表不限制 Number.POSITIVE_INFINITY
|
|
2756
2756
|
allowedContentTypes: ["*"],
|
|
2757
2757
|
maxUploads: 0,
|
|
@@ -2763,9 +2763,9 @@ class qa {
|
|
|
2763
2763
|
/**
|
|
2764
2764
|
* 服务器端扩展
|
|
2765
2765
|
*/
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2766
|
+
U(this, "extendServerConfig", null);
|
|
2767
|
+
U(this, "uploadServerSer");
|
|
2768
|
+
U(this, "uploadContext", null);
|
|
2769
2769
|
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = mt.getServerAPI(this.serverToken);
|
|
2770
2770
|
}
|
|
2771
2771
|
setUploadContext(e) {
|
|
@@ -2781,7 +2781,7 @@ class qa {
|
|
|
2781
2781
|
this.queue = this.queue.filter(
|
|
2782
2782
|
(r) => {
|
|
2783
2783
|
var i;
|
|
2784
|
-
return ((i = r.progress) == null ? void 0 : i.status) !==
|
|
2784
|
+
return ((i = r.progress) == null ? void 0 : i.status) !== Q.Remove;
|
|
2785
2785
|
}
|
|
2786
2786
|
), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
|
|
2787
2787
|
break;
|
|
@@ -2812,7 +2812,7 @@ class qa {
|
|
|
2812
2812
|
if (f.allowed)
|
|
2813
2813
|
r = r.concat(i);
|
|
2814
2814
|
else {
|
|
2815
|
-
const d =
|
|
2815
|
+
const d = Ve(
|
|
2816
2816
|
i,
|
|
2817
2817
|
l
|
|
2818
2818
|
);
|
|
@@ -2828,7 +2828,7 @@ class qa {
|
|
|
2828
2828
|
);
|
|
2829
2829
|
[].map.call(n, (r, i) => {
|
|
2830
2830
|
var o;
|
|
2831
|
-
const l =
|
|
2831
|
+
const l = Ve(r, i);
|
|
2832
2832
|
this.queue.push(l), (o = this.uploadContext) == null || o.emit("stateChange", { type: "addedToQueue", file: l });
|
|
2833
2833
|
}), (a = this.uploadContext) == null || a.emit("stateChange", { type: "allAddedToQueue" });
|
|
2834
2834
|
}
|
|
@@ -2884,7 +2884,7 @@ class qa {
|
|
|
2884
2884
|
);
|
|
2885
2885
|
if (i !== -1 && this.queue[i] && this.queue[i].progress) {
|
|
2886
2886
|
const { progress: o } = this.queue[i];
|
|
2887
|
-
o && (o.status =
|
|
2887
|
+
o && (o.status = Q.Remove);
|
|
2888
2888
|
}
|
|
2889
2889
|
this.serverMethod({ files: [e.file], event: e });
|
|
2890
2890
|
break;
|
|
@@ -2892,7 +2892,7 @@ class qa {
|
|
|
2892
2892
|
const l = this.queue.filter(
|
|
2893
2893
|
(o) => {
|
|
2894
2894
|
var f;
|
|
2895
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) ===
|
|
2895
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) === Q.Queue;
|
|
2896
2896
|
}
|
|
2897
2897
|
);
|
|
2898
2898
|
l.length && ((a = this.uploadContext) == null || a.emit("stateChange", {
|
|
@@ -2902,10 +2902,10 @@ class qa {
|
|
|
2902
2902
|
}), this.queue = this.queue.filter(
|
|
2903
2903
|
(o) => {
|
|
2904
2904
|
var f;
|
|
2905
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !==
|
|
2905
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !== Q.Queue;
|
|
2906
2906
|
}
|
|
2907
2907
|
)), this.queue.length && (e.type = "remove", this.queue.forEach((o) => {
|
|
2908
|
-
o.progress && (o.progress.status =
|
|
2908
|
+
o.progress && (o.progress.status = Q.Remove);
|
|
2909
2909
|
}), this.serverMethod({ files: this.queue, event: e }));
|
|
2910
2910
|
break;
|
|
2911
2911
|
}
|
|
@@ -2973,19 +2973,19 @@ class qa {
|
|
|
2973
2973
|
this.reset();
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
const De = /* @__PURE__ */
|
|
2976
|
+
const De = /* @__PURE__ */ te({
|
|
2977
2977
|
name: "FUploader",
|
|
2978
2978
|
components: {
|
|
2979
2979
|
"f-upload-progress": Ft,
|
|
2980
|
-
"f-preview-checkbox":
|
|
2980
|
+
"f-preview-checkbox": Ge,
|
|
2981
2981
|
"f-file-select": Ze
|
|
2982
2982
|
},
|
|
2983
|
-
props:
|
|
2983
|
+
props: Ae,
|
|
2984
2984
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fileRemovedEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
2985
2985
|
setup(t, e) {
|
|
2986
|
-
const n = N(), a = new
|
|
2987
|
-
|
|
2988
|
-
switch (
|
|
2986
|
+
const n = N(), a = new $a(n, t.uploadServerToken);
|
|
2987
|
+
K(n, (p) => {
|
|
2988
|
+
switch (re(p), p.type) {
|
|
2989
2989
|
case "removed":
|
|
2990
2990
|
e.emit("fileRemovedEvent", p.files[0]);
|
|
2991
2991
|
break;
|
|
@@ -3011,19 +3011,19 @@ const De = /* @__PURE__ */ re({
|
|
|
3011
3011
|
previewMultiSelectedLength: y,
|
|
3012
3012
|
previewSelectAllBtnChecked: k,
|
|
3013
3013
|
uploadEnableMulti: A,
|
|
3014
|
-
previewCurrentId:
|
|
3014
|
+
previewCurrentId: M,
|
|
3015
3015
|
multiFileRemoveHandler: O,
|
|
3016
|
-
previewMultiSelectChangeHandler:
|
|
3017
|
-
fileMultiDownloadHandler:
|
|
3018
|
-
selectOrCancelAllHandler:
|
|
3019
|
-
rowSelectedHandler:
|
|
3020
|
-
hasColumnHtmlFunc:
|
|
3021
|
-
showPreviewStateColumn:
|
|
3022
|
-
fileDownloadHandler:
|
|
3023
|
-
filePreviewHandler:
|
|
3024
|
-
fileRemoveHandler:
|
|
3025
|
-
handleStateChange:
|
|
3026
|
-
} = ht(t, e, l),
|
|
3016
|
+
previewMultiSelectChangeHandler: D,
|
|
3017
|
+
fileMultiDownloadHandler: H,
|
|
3018
|
+
selectOrCancelAllHandler: Y,
|
|
3019
|
+
rowSelectedHandler: L,
|
|
3020
|
+
hasColumnHtmlFunc: V,
|
|
3021
|
+
showPreviewStateColumn: ne,
|
|
3022
|
+
fileDownloadHandler: le,
|
|
3023
|
+
filePreviewHandler: ae,
|
|
3024
|
+
fileRemoveHandler: Z,
|
|
3025
|
+
handleStateChange: re
|
|
3026
|
+
} = ht(t, e, l), B = W(() => g.value.length > 0);
|
|
3027
3027
|
function E() {
|
|
3028
3028
|
var p;
|
|
3029
3029
|
return ct((i == null ? void 0 : i.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
@@ -3031,7 +3031,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3031
3031
|
style: "margin-right:4px;"
|
|
3032
3032
|
}, [(p = i.allowedContentTypes) == null ? void 0 : p.join(""), C(",")])]) : "";
|
|
3033
3033
|
}
|
|
3034
|
-
function
|
|
3034
|
+
function j() {
|
|
3035
3035
|
return dt((i == null ? void 0 : i.maxFileSize) || "") ? s("li", null, [s("span", null, [C("单个文件限制:")]), s("span", {
|
|
3036
3036
|
class: "support-info--item-detail"
|
|
3037
3037
|
}, [i.maxFileSize, C(", ")])]) : "";
|
|
@@ -3041,7 +3041,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3041
3041
|
class: "support-info--item-detail"
|
|
3042
3042
|
}, [i.maxUploads, C("个")])]);
|
|
3043
3043
|
}
|
|
3044
|
-
function
|
|
3044
|
+
function _() {
|
|
3045
3045
|
return f.value && !u.value && !o.value ? s("div", {
|
|
3046
3046
|
class: "ffileupload--support-info"
|
|
3047
3047
|
}, [r.value ? s("ul", {
|
|
@@ -3051,24 +3051,24 @@ const De = /* @__PURE__ */ re({
|
|
|
3051
3051
|
innerHTML: r.value
|
|
3052
3052
|
}, null)])]) : s("ul", {
|
|
3053
3053
|
class: "support-info--wrapper"
|
|
3054
|
-
}, [E(),
|
|
3054
|
+
}, [E(), j(), ue()])]) : null;
|
|
3055
3055
|
}
|
|
3056
3056
|
function Me(p) {
|
|
3057
|
-
var w, F,
|
|
3057
|
+
var w, F, q;
|
|
3058
3058
|
return s("div", {
|
|
3059
3059
|
class: "uploadAndpreview--title-container"
|
|
3060
3060
|
}, [s("div", {
|
|
3061
3061
|
class: "ffilepreview--item-icon"
|
|
3062
3062
|
}, [s("span", {
|
|
3063
|
-
class: ["ffilepreview--filetype-icon",
|
|
3063
|
+
class: ["ffilepreview--filetype-icon", ze(((w = p.file) == null ? void 0 : w.name) || "")]
|
|
3064
3064
|
}, null)]), s("div", {
|
|
3065
3065
|
class: "uploadAndpreview--right"
|
|
3066
3066
|
}, [s("a", {
|
|
3067
3067
|
class: "item-content--title",
|
|
3068
3068
|
title: (F = p.file) == null ? void 0 : F.name
|
|
3069
|
-
}, [((
|
|
3069
|
+
}, [((q = p.file) == null ? void 0 : q.name) || "无名称"]), s(G("f-upload-progress"), {
|
|
3070
3070
|
status: p.type === "done" ? "success" : "active",
|
|
3071
|
-
percent:
|
|
3071
|
+
percent: Qe(p),
|
|
3072
3072
|
maxWidth: 300
|
|
3073
3073
|
}, null)])]);
|
|
3074
3074
|
}
|
|
@@ -3078,19 +3078,19 @@ const De = /* @__PURE__ */ re({
|
|
|
3078
3078
|
}, [s("div", {
|
|
3079
3079
|
class: "ffilepreview--item-icon"
|
|
3080
3080
|
}, [s("span", {
|
|
3081
|
-
class: ["ffilepreview--filetype-icon",
|
|
3081
|
+
class: ["ffilepreview--filetype-icon", ze(p.name)]
|
|
3082
3082
|
}, null)]), s("div", {
|
|
3083
3083
|
class: "uploadAndpreview--right"
|
|
3084
3084
|
}, [s("a", {
|
|
3085
3085
|
class: ["item-content--title", "previewButtonDisable.value?'no-preview':''"],
|
|
3086
3086
|
title: p.name,
|
|
3087
|
-
onClick: (w) =>
|
|
3087
|
+
onClick: (w) => ae(w, p)
|
|
3088
3088
|
}, [p.name])])]);
|
|
3089
3089
|
}
|
|
3090
3090
|
function ge(p, w, F) {
|
|
3091
3091
|
return s("div", {
|
|
3092
3092
|
class: "uploadAndpreview--filesize-container"
|
|
3093
|
-
}, [p === "preview" && F ? s("span", null, [Fa(F.size)]) : null, p === "upload" && w ? s("span", null, [
|
|
3093
|
+
}, [p === "preview" && F ? s("span", null, [Fa(F.size)]) : null, p === "upload" && w ? s("span", null, [Qe(w)]) : null]);
|
|
3094
3094
|
}
|
|
3095
3095
|
function c(p, w) {
|
|
3096
3096
|
return w && w.type == "error" ? s("div", {
|
|
@@ -3121,73 +3121,73 @@ const De = /* @__PURE__ */ re({
|
|
|
3121
3121
|
}, [d.value ? "" : s("button", {
|
|
3122
3122
|
class: "btn preview-btn",
|
|
3123
3123
|
title: "下载",
|
|
3124
|
-
onClick: (w) =>
|
|
3124
|
+
onClick: (w) => le(w, p)
|
|
3125
3125
|
}, [s("span", {
|
|
3126
3126
|
class: "f-icon f-icon-enclosure_download"
|
|
3127
3127
|
}, null)]), t.previewButtonDisable ? "" : s("button", {
|
|
3128
3128
|
class: "btn preview-btn",
|
|
3129
3129
|
title: "预览",
|
|
3130
|
-
onClick: (w) =>
|
|
3130
|
+
onClick: (w) => ae(w, p)
|
|
3131
3131
|
}, [s("span", {
|
|
3132
3132
|
class: "f-icon f-icon-enclosure_browse"
|
|
3133
3133
|
}, null)]), t.deleteButtonDisable ? "" : s("button", {
|
|
3134
3134
|
class: "btn preview-btn",
|
|
3135
3135
|
title: "删除",
|
|
3136
|
-
onClick: (w) =>
|
|
3136
|
+
onClick: (w) => Z(w, p, a)
|
|
3137
3137
|
}, [s("span", {
|
|
3138
3138
|
class: "f-icon f-icon-enclosure_delete",
|
|
3139
3139
|
style: "top: -1px"
|
|
3140
3140
|
}, null)])]);
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3142
|
+
function T(p) {
|
|
3143
3143
|
return s("div", {
|
|
3144
3144
|
class: "uploadAndpreview--date-container"
|
|
3145
3145
|
}, [p.createTime || ""]);
|
|
3146
3146
|
}
|
|
3147
|
-
function S(p, w, F,
|
|
3148
|
-
let
|
|
3149
|
-
if (p = p || "preview",
|
|
3150
|
-
return
|
|
3147
|
+
function S(p, w, F, q) {
|
|
3148
|
+
let R;
|
|
3149
|
+
if (p = p || "preview", q.formatter)
|
|
3150
|
+
return R = q.formatter(F[q.field] || "", p, p == "preview" ? F : w, q), R;
|
|
3151
3151
|
if (p === "preview" && F)
|
|
3152
|
-
switch (
|
|
3152
|
+
switch (q.field) {
|
|
3153
3153
|
case "state":
|
|
3154
|
-
|
|
3154
|
+
R = c("preview", null);
|
|
3155
3155
|
break;
|
|
3156
3156
|
case "name":
|
|
3157
|
-
|
|
3157
|
+
R = he(F);
|
|
3158
3158
|
break;
|
|
3159
3159
|
case "action":
|
|
3160
|
-
|
|
3160
|
+
R = v(F);
|
|
3161
3161
|
break;
|
|
3162
3162
|
case "size":
|
|
3163
|
-
|
|
3163
|
+
R = ge(p, w, F);
|
|
3164
3164
|
break;
|
|
3165
3165
|
case "createTime":
|
|
3166
|
-
|
|
3166
|
+
R = T(F);
|
|
3167
3167
|
break;
|
|
3168
3168
|
default:
|
|
3169
|
-
|
|
3169
|
+
R = `<div>${F[q.field] || ""} </div>`;
|
|
3170
3170
|
}
|
|
3171
3171
|
if (p === "upload" && w)
|
|
3172
|
-
switch (
|
|
3172
|
+
switch (q.field) {
|
|
3173
3173
|
case "state":
|
|
3174
|
-
|
|
3174
|
+
R = c("upload", w);
|
|
3175
3175
|
break;
|
|
3176
3176
|
case "name":
|
|
3177
|
-
|
|
3177
|
+
R = Me(w);
|
|
3178
3178
|
break;
|
|
3179
3179
|
case "size":
|
|
3180
|
-
|
|
3180
|
+
R = ge(p, w, F);
|
|
3181
3181
|
break;
|
|
3182
3182
|
default:
|
|
3183
|
-
|
|
3183
|
+
R = "";
|
|
3184
3184
|
}
|
|
3185
|
-
return
|
|
3185
|
+
return R;
|
|
3186
3186
|
}
|
|
3187
|
-
function
|
|
3187
|
+
function $() {
|
|
3188
3188
|
return f.value ? s("div", {
|
|
3189
3189
|
class: "header--left-container"
|
|
3190
|
-
}, [s(
|
|
3190
|
+
}, [s(G("f-file-select"), {
|
|
3191
3191
|
ref: l,
|
|
3192
3192
|
disabled: u.value,
|
|
3193
3193
|
selectText: t.selectText,
|
|
@@ -3196,27 +3196,27 @@ const De = /* @__PURE__ */ re({
|
|
|
3196
3196
|
enableMulti: A.value,
|
|
3197
3197
|
options: t.uploadOptions,
|
|
3198
3198
|
extendConfig: t.extendConfig,
|
|
3199
|
-
onStateChange: (p) =>
|
|
3199
|
+
onStateChange: (p) => re(p)
|
|
3200
3200
|
}, null)]) : null;
|
|
3201
3201
|
}
|
|
3202
|
-
function
|
|
3203
|
-
return !f.value && h.value &&
|
|
3202
|
+
function I() {
|
|
3203
|
+
return !f.value && h.value && B.value ? s("div", {
|
|
3204
3204
|
class: "header--left-container header--countInfo"
|
|
3205
3205
|
}, [s("p", {
|
|
3206
3206
|
class: "m-0"
|
|
3207
3207
|
}, [C("共"), s("span", {
|
|
3208
3208
|
class: "count"
|
|
3209
|
-
}, [x.value.length + g.value.length]), C("个附件"), y.value > 0 ? s(
|
|
3209
|
+
}, [x.value.length + g.value.length]), C("个附件"), y.value > 0 ? s(se, null, [C("(已选"), s("span", {
|
|
3210
3210
|
class: "count-selected"
|
|
3211
3211
|
}, [y.value]), C("个)")]) : ""])]) : null;
|
|
3212
3212
|
}
|
|
3213
3213
|
function ve() {
|
|
3214
|
-
return (!d.value || !t.deleteButtonDisable) && h.value &&
|
|
3214
|
+
return (!d.value || !t.deleteButtonDisable) && h.value && B.value ? s("div", {
|
|
3215
3215
|
class: "header--right-container"
|
|
3216
3216
|
}, [d.value ? null : s("button", {
|
|
3217
3217
|
class: "btn btn-primary f-btn-ml",
|
|
3218
3218
|
disabled: y.value === 0,
|
|
3219
|
-
onClick: (F) =>
|
|
3219
|
+
onClick: (F) => H(F)
|
|
3220
3220
|
}, [C("下载")]), t.deleteButtonDisable.value ? null : s("button", {
|
|
3221
3221
|
class: "btn btn-secondary f-btn-ml",
|
|
3222
3222
|
disabled: y.value === 0,
|
|
@@ -3224,16 +3224,16 @@ const De = /* @__PURE__ */ re({
|
|
|
3224
3224
|
}, [C("删除")])]) : null;
|
|
3225
3225
|
}
|
|
3226
3226
|
function Be() {
|
|
3227
|
-
return m.value.map((p) =>
|
|
3227
|
+
return m.value.map((p) => ne(p) ? s("th", {
|
|
3228
3228
|
style: {
|
|
3229
3229
|
width: p.width ? p.width + "px" : "auto"
|
|
3230
3230
|
},
|
|
3231
3231
|
class: [!o.value && p.checkbox && p.checkbox ? "td--hascheckbox" : ""]
|
|
3232
|
-
}, [!o.value && b.value && p.checkbox ? s(
|
|
3232
|
+
}, [!o.value && b.value && p.checkbox ? s(G("f-preview-checkbox"), {
|
|
3233
3233
|
class: "preview-checkbox",
|
|
3234
3234
|
id: "previewMultiBtn",
|
|
3235
3235
|
checked: k.value,
|
|
3236
|
-
onCheckedChange: (w) =>
|
|
3236
|
+
onCheckedChange: (w) => Y(w)
|
|
3237
3237
|
}, null) : null, p.title]) : null);
|
|
3238
3238
|
}
|
|
3239
3239
|
function gt() {
|
|
@@ -3243,59 +3243,59 @@ const De = /* @__PURE__ */ re({
|
|
|
3243
3243
|
class: "uploadAndpreview--upload-item",
|
|
3244
3244
|
id: "uploadAndpreview--upload-item" + (((w = p == null ? void 0 : p.file) == null ? void 0 : w.id) || "")
|
|
3245
3245
|
}, [m.value.map((F) => {
|
|
3246
|
-
var
|
|
3246
|
+
var q;
|
|
3247
3247
|
return s("td", {
|
|
3248
3248
|
class: [!o.value && F.checkbox && F.checkbox ? "td--hascheckbox" : ""]
|
|
3249
|
-
}, [b.value && F.checkbox ? s(
|
|
3250
|
-
id: (
|
|
3249
|
+
}, [b.value && F.checkbox ? s(G("f-preview-checkbox"), {
|
|
3250
|
+
id: (q = p == null ? void 0 : p.file) == null ? void 0 : q.id,
|
|
3251
3251
|
checked: p.checked,
|
|
3252
3252
|
disabled: p.type !== "done",
|
|
3253
3253
|
class: "preview-checkbox",
|
|
3254
|
-
onCheckedChange: (
|
|
3255
|
-
}, null) : null,
|
|
3254
|
+
onCheckedChange: (R) => D(R)
|
|
3255
|
+
}, null) : null, V(F, "upload") ? S("upload", p, null, F) : null]);
|
|
3256
3256
|
})]);
|
|
3257
3257
|
});
|
|
3258
3258
|
}
|
|
3259
|
-
function
|
|
3259
|
+
function _e() {
|
|
3260
3260
|
return g.value.map((p) => s("tr", {
|
|
3261
|
-
class: ["uploadAndpreview--preview-item",
|
|
3261
|
+
class: ["uploadAndpreview--preview-item", M.value === p.id ? "uploadAndpreview--currentfile" : ""],
|
|
3262
3262
|
id: "uploadAndpreview--preview-item" + p.id,
|
|
3263
|
-
onClick: (w) =>
|
|
3264
|
-
}, [m.value.map((w) =>
|
|
3263
|
+
onClick: (w) => L(w, p)
|
|
3264
|
+
}, [m.value.map((w) => ne(w) ? s("td", {
|
|
3265
3265
|
class: [!o.value && w.checkbox && w.checkbox ? "td--hascheckbox" : ""]
|
|
3266
|
-
}, [!o.value && b.value && w.checkbox ? s(
|
|
3266
|
+
}, [!o.value && b.value && w.checkbox ? s(G("f-preview-checkbox"), {
|
|
3267
3267
|
id: p.id,
|
|
3268
3268
|
checked: p.checked,
|
|
3269
3269
|
class: "preview-checkbox",
|
|
3270
|
-
onCheckedChange: (F) =>
|
|
3271
|
-
}, null) : null,
|
|
3270
|
+
onCheckedChange: (F) => D(F)
|
|
3271
|
+
}, null) : null, V(w, "preview") ? S("preview", null, p, w) : s("div", {
|
|
3272
3272
|
class: "text-truncate",
|
|
3273
3273
|
innerHTML: S("preview", null, p, w)
|
|
3274
3274
|
}, null)]) : null)]));
|
|
3275
3275
|
}
|
|
3276
3276
|
return () => o.value ? s("div", {
|
|
3277
3277
|
class: "fv-upload-and-preview"
|
|
3278
|
-
}, [
|
|
3278
|
+
}, [B.value ? null : _(), h.value ? s("div", {
|
|
3279
3279
|
class: "uploadAndpreview--content"
|
|
3280
|
-
}, [
|
|
3280
|
+
}, [B.value ? s("table", {
|
|
3281
3281
|
class: "table table-bordered uploadAndpreview--table"
|
|
3282
|
-
}, [s("thead", null, [Be()]), s("tbody", null, [
|
|
3282
|
+
}, [s("thead", null, [Be()]), s("tbody", null, [_e()])]) : s("p", {
|
|
3283
3283
|
class: "uploadAndpreview--nodata"
|
|
3284
|
-
}, [C("无附件信息")])]) : null,
|
|
3284
|
+
}, [C("无附件信息")])]) : null, B.value ? _() : null]) : s("div", {
|
|
3285
3285
|
class: "fv-upload-and-preview"
|
|
3286
3286
|
}, [s("div", {
|
|
3287
3287
|
class: "uploadAndpreview--header"
|
|
3288
|
-
}, [
|
|
3288
|
+
}, [$(), I(), ve()]), B.value ? null : _(), h.value || f.value ? s("div", {
|
|
3289
3289
|
class: "uploadAndpreview--content"
|
|
3290
|
-
}, [(d.value || !f.value) && x.value.length === 0 && !
|
|
3290
|
+
}, [(d.value || !f.value) && x.value.length === 0 && !B.value ? s("p", {
|
|
3291
3291
|
class: "uploadAndpreview--nodata"
|
|
3292
|
-
}, [C("无附件信息")]) : "", x.value.length > 0 ||
|
|
3292
|
+
}, [C("无附件信息")]) : "", x.value.length > 0 || B ? s("table", {
|
|
3293
3293
|
class: "table table-bordered uploadAndpreview--table"
|
|
3294
|
-
}, [s("thead", null, [Be()]), s("tbody", null, [gt(),
|
|
3294
|
+
}, [s("thead", null, [Be()]), s("tbody", null, [gt(), _e()])]) : null]) : null, B.value ? _() : null]);
|
|
3295
3295
|
}
|
|
3296
3296
|
});
|
|
3297
3297
|
function Ua(t, e, n) {
|
|
3298
|
-
var
|
|
3298
|
+
var O;
|
|
3299
3299
|
function a() {
|
|
3300
3300
|
}
|
|
3301
3301
|
const r = "", i = "", l = N();
|
|
@@ -3311,19 +3311,19 @@ function Ua(t, e, n) {
|
|
|
3311
3311
|
function d() {
|
|
3312
3312
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
3313
3313
|
}
|
|
3314
|
-
function h(
|
|
3315
|
-
if (!
|
|
3314
|
+
function h(D) {
|
|
3315
|
+
if (!D || !D.value)
|
|
3316
3316
|
return null;
|
|
3317
|
-
if (
|
|
3318
|
-
return
|
|
3319
|
-
const
|
|
3320
|
-
return
|
|
3317
|
+
if (D.value.schema && D.value.schema.type === "component")
|
|
3318
|
+
return D.value;
|
|
3319
|
+
const H = N(D == null ? void 0 : D.value.parent), Y = h(H);
|
|
3320
|
+
return Y || null;
|
|
3321
3321
|
}
|
|
3322
|
-
function m(
|
|
3323
|
-
const { componentInstance:
|
|
3324
|
-
return !
|
|
3322
|
+
function m(D = e) {
|
|
3323
|
+
const { componentInstance: H, designerItemElementRef: Y } = D;
|
|
3324
|
+
return !H || !H.value ? null : H.value.canMove ? Y : m(D.parent);
|
|
3325
3325
|
}
|
|
3326
|
-
function x(
|
|
3326
|
+
function x(D) {
|
|
3327
3327
|
return !!n;
|
|
3328
3328
|
}
|
|
3329
3329
|
function g() {
|
|
@@ -3331,24 +3331,17 @@ function Ua(t, e, n) {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
function b() {
|
|
3333
3333
|
}
|
|
3334
|
-
function y(
|
|
3334
|
+
function y(D, H) {
|
|
3335
3335
|
}
|
|
3336
|
-
function k(
|
|
3337
|
-
const { componentType:
|
|
3338
|
-
let
|
|
3339
|
-
const
|
|
3340
|
-
return
|
|
3336
|
+
function k(D, H) {
|
|
3337
|
+
const { componentType: Y } = D;
|
|
3338
|
+
let L = et(Y, D, H);
|
|
3339
|
+
const V = Y.toLowerCase().replace("-", "_");
|
|
3340
|
+
return L && !L.id && L.type === Y && (L.id = `${V}_${Math.random().toString().slice(2, 6)}`), L;
|
|
3341
3341
|
}
|
|
3342
|
-
function A(
|
|
3343
|
-
const _ = String(M.getAttribute("data-controltype")), R = M.getAttribute("data-feature"), Q = R ? JSON.parse(R) : {};
|
|
3344
|
-
Q.parentComponentInstance = l.value;
|
|
3345
|
-
let V = Pe(_, Q);
|
|
3346
|
-
const G = _.toLowerCase().replace("-", "_");
|
|
3347
|
-
return V && !V.id && V.type === _ && (V.id = `${G}_${Math.random().toString().slice(2, 6)}`), V;
|
|
3342
|
+
function A(D) {
|
|
3348
3343
|
}
|
|
3349
|
-
function
|
|
3350
|
-
}
|
|
3351
|
-
function O(...M) {
|
|
3344
|
+
function M(...D) {
|
|
3352
3345
|
}
|
|
3353
3346
|
return l.value = {
|
|
3354
3347
|
canMove: o(),
|
|
@@ -3357,7 +3350,7 @@ function Ua(t, e, n) {
|
|
|
3357
3350
|
canNested: !d(),
|
|
3358
3351
|
contents: e == null ? void 0 : e.schema.contents,
|
|
3359
3352
|
elementRef: t,
|
|
3360
|
-
parent: (
|
|
3353
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
3361
3354
|
schema: e == null ? void 0 : e.schema,
|
|
3362
3355
|
styles: r,
|
|
3363
3356
|
designerClass: i,
|
|
@@ -3365,24 +3358,23 @@ function Ua(t, e, n) {
|
|
|
3365
3358
|
getBelongedComponentInstance: h,
|
|
3366
3359
|
getDraggableDesignItemElement: m,
|
|
3367
3360
|
getDraggingDisplayText: g,
|
|
3368
|
-
getPropConfig:
|
|
3361
|
+
getPropConfig: M,
|
|
3369
3362
|
getDragScopeElement: b,
|
|
3370
3363
|
onAcceptMovedChildElement: y,
|
|
3371
|
-
|
|
3372
|
-
onChildElementMovedOut: T,
|
|
3364
|
+
onChildElementMovedOut: A,
|
|
3373
3365
|
addNewChildComponentSchema: k,
|
|
3374
3366
|
updateDragAndDropRules: a,
|
|
3375
3367
|
triggerBelongedComponentToMoveWhenMoved: N(!1),
|
|
3376
3368
|
triggerBelongedComponentToDeleteWhenDeleted: N(!1)
|
|
3377
3369
|
}, l;
|
|
3378
3370
|
}
|
|
3379
|
-
const La = /* @__PURE__ */
|
|
3371
|
+
const La = /* @__PURE__ */ te({
|
|
3380
3372
|
name: "FUploaderDesign",
|
|
3381
3373
|
components: {
|
|
3382
|
-
"f-preview-checkbox":
|
|
3374
|
+
"f-preview-checkbox": Ge,
|
|
3383
3375
|
"f-file-select": Ze
|
|
3384
3376
|
},
|
|
3385
|
-
props:
|
|
3377
|
+
props: Ae,
|
|
3386
3378
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
3387
3379
|
setup(t, e) {
|
|
3388
3380
|
const n = N(t.customInfo), a = ft(t.uploadOptions, {
|
|
@@ -3438,7 +3430,7 @@ const La = /* @__PURE__ */ re({
|
|
|
3438
3430
|
class: "support-info--wrapper"
|
|
3439
3431
|
}, [b(), y(), k()])]) : null;
|
|
3440
3432
|
}
|
|
3441
|
-
function
|
|
3433
|
+
function M(E) {
|
|
3442
3434
|
return s("div", {
|
|
3443
3435
|
class: "uploadAndpreview--title-container"
|
|
3444
3436
|
}, [s("div", {
|
|
@@ -3458,7 +3450,7 @@ const La = /* @__PURE__ */ re({
|
|
|
3458
3450
|
class: "ffilepreview--preview-block"
|
|
3459
3451
|
}, null)]);
|
|
3460
3452
|
}
|
|
3461
|
-
function
|
|
3453
|
+
function D() {
|
|
3462
3454
|
return s("div", {
|
|
3463
3455
|
class: "uploadAndpreview--state-container"
|
|
3464
3456
|
}, [s("p", {
|
|
@@ -3467,7 +3459,7 @@ const La = /* @__PURE__ */ re({
|
|
|
3467
3459
|
class: "f-icon f-icon-success text-success"
|
|
3468
3460
|
}, null), s("span", null, [C("已上传")])])]);
|
|
3469
3461
|
}
|
|
3470
|
-
function
|
|
3462
|
+
function H(E) {
|
|
3471
3463
|
return s("div", {
|
|
3472
3464
|
class: "uploadAndpreview--action-container"
|
|
3473
3465
|
}, [u.value ? "" : s("button", {
|
|
@@ -3488,49 +3480,49 @@ const La = /* @__PURE__ */ re({
|
|
|
3488
3480
|
style: "top: -1px"
|
|
3489
3481
|
}, null)])]);
|
|
3490
3482
|
}
|
|
3491
|
-
function
|
|
3483
|
+
function Y(E) {
|
|
3492
3484
|
return s("div", {
|
|
3493
3485
|
class: "uploadAndpreview--date-container"
|
|
3494
3486
|
}, [C(" "), s("span", {
|
|
3495
3487
|
class: "ffilepreview--preview-block"
|
|
3496
3488
|
}, null)]);
|
|
3497
3489
|
}
|
|
3498
|
-
function
|
|
3499
|
-
let
|
|
3500
|
-
if (E = E || "preview", E === "preview" &&
|
|
3490
|
+
function L(E, j, ue) {
|
|
3491
|
+
let _ = null;
|
|
3492
|
+
if (E = E || "preview", E === "preview" && j)
|
|
3501
3493
|
switch (ue.field) {
|
|
3502
3494
|
case "state":
|
|
3503
|
-
|
|
3495
|
+
_ = D();
|
|
3504
3496
|
break;
|
|
3505
3497
|
case "name":
|
|
3506
|
-
|
|
3498
|
+
_ = M();
|
|
3507
3499
|
break;
|
|
3508
3500
|
case "action":
|
|
3509
|
-
|
|
3501
|
+
_ = H();
|
|
3510
3502
|
break;
|
|
3511
3503
|
case "size":
|
|
3512
|
-
|
|
3504
|
+
_ = O();
|
|
3513
3505
|
break;
|
|
3514
3506
|
case "createTime":
|
|
3515
|
-
|
|
3507
|
+
_ = Y();
|
|
3516
3508
|
break;
|
|
3517
3509
|
default:
|
|
3518
|
-
|
|
3510
|
+
_ = s("span", {
|
|
3519
3511
|
class: "ffilepreview--preview-block"
|
|
3520
3512
|
}, null);
|
|
3521
3513
|
}
|
|
3522
|
-
return
|
|
3514
|
+
return _;
|
|
3523
3515
|
}
|
|
3524
|
-
function
|
|
3516
|
+
function V() {
|
|
3525
3517
|
return o.value ? s("div", {
|
|
3526
3518
|
class: "header--left-container"
|
|
3527
|
-
}, [s(
|
|
3519
|
+
}, [s(G("f-file-select"), {
|
|
3528
3520
|
ref: r,
|
|
3529
3521
|
disabled: f.value,
|
|
3530
3522
|
selectText: t.selectText
|
|
3531
3523
|
}, null)]) : null;
|
|
3532
3524
|
}
|
|
3533
|
-
function
|
|
3525
|
+
function ne() {
|
|
3534
3526
|
return (!u.value || !t.deleteButtonDisable) && d.value ? s("div", {
|
|
3535
3527
|
class: "header--right-container"
|
|
3536
3528
|
}, [u.value ? null : s("button", {
|
|
@@ -3541,42 +3533,42 @@ const La = /* @__PURE__ */ re({
|
|
|
3541
3533
|
disabled: !0
|
|
3542
3534
|
}, [C("删除")])]) : null;
|
|
3543
3535
|
}
|
|
3544
|
-
function
|
|
3536
|
+
function le() {
|
|
3545
3537
|
return h.value.map((E) => g(E) ? s("th", {
|
|
3546
3538
|
style: {
|
|
3547
3539
|
width: E.width ? E.width + "px" : "auto"
|
|
3548
3540
|
},
|
|
3549
3541
|
class: [!l.value && E.checkbox && E.checkbox ? "td--hascheckbox" : ""]
|
|
3550
|
-
}, [!l.value && m.value && E.checkbox ? s(
|
|
3542
|
+
}, [!l.value && m.value && E.checkbox ? s(G("f-preview-checkbox"), {
|
|
3551
3543
|
class: "preview-checkbox",
|
|
3552
3544
|
id: "previewMultiBtn"
|
|
3553
3545
|
}, null) : null, E.title]) : null);
|
|
3554
3546
|
}
|
|
3555
|
-
function
|
|
3547
|
+
function ae() {
|
|
3556
3548
|
return i.map((E) => s("tr", {
|
|
3557
3549
|
class: ["uploadAndpreview--preview-item", x.value === E.id ? "uploadAndpreview--currentfile" : ""],
|
|
3558
3550
|
id: "uploadAndpreview--preview-item" + E.id
|
|
3559
|
-
}, [h.value.map((
|
|
3560
|
-
class: [!l.value &&
|
|
3561
|
-
}, [!l.value && m.value &&
|
|
3551
|
+
}, [h.value.map((j) => g(j) ? s("td", {
|
|
3552
|
+
class: [!l.value && j.checkbox && j.checkbox ? "td--hascheckbox" : ""]
|
|
3553
|
+
}, [!l.value && m.value && j.checkbox ? s(G("f-preview-checkbox"), {
|
|
3562
3554
|
class: "preview-checkbox"
|
|
3563
|
-
}, null) : null,
|
|
3555
|
+
}, null) : null, L("preview", E, j)]) : null)]));
|
|
3564
3556
|
}
|
|
3565
3557
|
St(() => {
|
|
3566
3558
|
});
|
|
3567
|
-
const
|
|
3568
|
-
return
|
|
3569
|
-
|
|
3570
|
-
}), e.expose(
|
|
3559
|
+
const Z = N(), re = oe("design-item-context"), B = Ua(Z, re);
|
|
3560
|
+
return Fe(() => {
|
|
3561
|
+
Z.value.componentInstance = B;
|
|
3562
|
+
}), e.expose(B.value), () => s("div", {
|
|
3571
3563
|
class: "fv-upload-and-preview",
|
|
3572
|
-
ref:
|
|
3573
|
-
}, [d.value || o.value ? s(
|
|
3564
|
+
ref: Z
|
|
3565
|
+
}, [d.value || o.value ? s(se, null, [l.value ? null : s("div", {
|
|
3574
3566
|
class: "uploadAndpreview--header"
|
|
3575
|
-
}, [
|
|
3567
|
+
}, [V(), ne()]), s("div", {
|
|
3576
3568
|
class: "uploadAndpreview--content"
|
|
3577
3569
|
}, [s("table", {
|
|
3578
3570
|
class: "table table-bordered uploadAndpreview--table"
|
|
3579
|
-
}, [s("thead", null, [
|
|
3571
|
+
}, [s("thead", null, [le()]), s("tbody", null, [ae()])])]), A()]) : null]);
|
|
3580
3572
|
}
|
|
3581
3573
|
});
|
|
3582
3574
|
De.register = (t, e, n, a) => {
|
|
@@ -3591,5 +3583,5 @@ export {
|
|
|
3591
3583
|
Pa as UploadServerAPI,
|
|
3592
3584
|
Xa as default,
|
|
3593
3585
|
tt as propsResolver,
|
|
3594
|
-
|
|
3586
|
+
Ae as uploaderProps
|
|
3595
3587
|
};
|