@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
|
@@ -1,36 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var t in e || (e = {}))
|
|
7
|
-
y.call(e, t) && u(r, t, e[t]);
|
|
8
|
-
if (c)
|
|
9
|
-
for (var t of c(e))
|
|
10
|
-
E.call(e, t) && u(r, t, e[t]);
|
|
11
|
-
return r;
|
|
12
|
-
}, F = (r, e) => h(r, v(e));
|
|
13
|
-
var n = (r, e, t) => new Promise((i, s) => {
|
|
14
|
-
var l = (o) => {
|
|
15
|
-
try {
|
|
16
|
-
m(t.next(o));
|
|
17
|
-
} catch (p) {
|
|
18
|
-
s(p);
|
|
19
|
-
}
|
|
20
|
-
}, a = (o) => {
|
|
21
|
-
try {
|
|
22
|
-
m(t.throw(o));
|
|
23
|
-
} catch (p) {
|
|
24
|
-
s(p);
|
|
25
|
-
}
|
|
26
|
-
}, m = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(l, a);
|
|
27
|
-
m((t = t.apply(r, e)).next());
|
|
28
|
-
});
|
|
29
|
-
import { c as x, u as f } from "./utils.DRcxC1Fb.mjs";
|
|
30
|
-
import { i as g, a as L, f as T, l as k, e as _ } from "./utilSelf.CRqpl0Cz.mjs";
|
|
31
|
-
import { fastClone as I } from "@web-utils/core";
|
|
32
|
-
import { n as w } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
33
|
-
const O = {
|
|
1
|
+
import { c as o, u as n } from "./utils.DRcxC1Fb.mjs";
|
|
2
|
+
import { i as a, a as m, f as p, l as c, e as u } from "./utilSelf.Csq1766E.mjs";
|
|
3
|
+
import { fastClone as d } from "@web-utils/core";
|
|
4
|
+
import { n as F } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const f = {
|
|
34
6
|
name: "UserTaskListeners",
|
|
35
7
|
inject: {
|
|
36
8
|
prefix: "prefix",
|
|
@@ -44,11 +16,11 @@ const O = {
|
|
|
44
16
|
data() {
|
|
45
17
|
return {
|
|
46
18
|
elementListenersList: [],
|
|
47
|
-
listenerEventTypeObject:
|
|
48
|
-
listenerTypeObject:
|
|
19
|
+
listenerEventTypeObject: u,
|
|
20
|
+
listenerTypeObject: c,
|
|
49
21
|
listenerFormModelVisible: !1,
|
|
50
22
|
listenerForm: {},
|
|
51
|
-
fieldTypeObject:
|
|
23
|
+
fieldTypeObject: p,
|
|
52
24
|
fieldsListOfListener: [],
|
|
53
25
|
listenerFieldFormModelVisible: !1,
|
|
54
26
|
// 监听器 注入字段表单弹窗 显示状态
|
|
@@ -63,69 +35,56 @@ const O = {
|
|
|
63
35
|
watch: {
|
|
64
36
|
id: {
|
|
65
37
|
immediate: !0,
|
|
66
|
-
handler(r) {
|
|
67
|
-
|
|
68
|
-
r && (yield this.$nextTick(), this.resetListenersList());
|
|
69
|
-
});
|
|
38
|
+
async handler(r) {
|
|
39
|
+
r && (await this.$nextTick(), this.resetListenersList());
|
|
70
40
|
}
|
|
71
41
|
}
|
|
72
42
|
},
|
|
73
43
|
methods: {
|
|
74
44
|
resetListenersList() {
|
|
75
|
-
var r, e, t
|
|
76
|
-
this.otherExtensionList = [], this.bpmnElementListeners = (
|
|
45
|
+
var r, e, t;
|
|
46
|
+
this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (r = this.element.businessObject) == null ? void 0 : r.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((i) => i.$type === `${this.prefix}:TaskListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((i) => m(i));
|
|
77
47
|
},
|
|
78
|
-
openListenerForm(r, e) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
48
|
+
async openListenerForm(r, e) {
|
|
49
|
+
var t;
|
|
50
|
+
r ? (this.listenerForm = a(r), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), r && r.fields ? this.fieldsListOfListener = r.fields.map((i) => ({
|
|
51
|
+
...i,
|
|
52
|
+
fieldType: i.string ? "string" : "expression"
|
|
53
|
+
})) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
|
|
85
54
|
},
|
|
86
55
|
// 移除监听器
|
|
87
|
-
removeListener(r, e) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
});
|
|
56
|
+
async removeListener(r, e) {
|
|
57
|
+
try {
|
|
58
|
+
await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), n(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
94
61
|
},
|
|
95
62
|
// 保存监听器
|
|
96
|
-
saveListenerConfig() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (l = (s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:TaskListener`)) != null ? l : [], f(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
102
|
-
});
|
|
63
|
+
async saveListenerConfig() {
|
|
64
|
+
var t, i, s;
|
|
65
|
+
if (!await this.$refs.listenerFormRef.validate()) return;
|
|
66
|
+
const e = o(this.bpmnInstances, this.listenerForm, !0, this.prefix);
|
|
67
|
+
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = ((s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter((l) => l.$type !== `${this.prefix}:TaskListener`)) ?? [], n(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
103
68
|
},
|
|
104
69
|
// 打开监听器字段编辑弹窗
|
|
105
|
-
openListenerFieldForm(r, e) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.listenerFieldForm = r ? I(r) : {}, this.editingListenerFieldIndex = r ? e : -1, this.listenerFieldFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
|
|
109
|
-
});
|
|
70
|
+
async openListenerFieldForm(r, e) {
|
|
71
|
+
var t;
|
|
72
|
+
this.listenerFieldForm = r ? d(r) : {}, this.editingListenerFieldIndex = r ? e : -1, this.listenerFieldFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
|
|
110
73
|
},
|
|
111
74
|
// 保存监听器注入字段
|
|
112
|
-
saveListenerFiled() {
|
|
113
|
-
|
|
114
|
-
(yield this.$refs.listenerFieldFormRef.validate()) && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, yield this.$nextTick(), this.listenerFieldForm = {});
|
|
115
|
-
});
|
|
75
|
+
async saveListenerFiled() {
|
|
76
|
+
await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
|
|
116
77
|
},
|
|
117
78
|
// 移除监听器字段
|
|
118
|
-
removeListenerField(r, e) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
});
|
|
79
|
+
async removeListenerField(r, e) {
|
|
80
|
+
try {
|
|
81
|
+
await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
125
84
|
}
|
|
126
85
|
}
|
|
127
86
|
};
|
|
128
|
-
var
|
|
87
|
+
var b = function() {
|
|
129
88
|
var e = this, t = e._self._c;
|
|
130
89
|
return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerEventTypeObject[i.event] } }), t("ElTableColumn", { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerTypeObject[i.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
|
|
131
90
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(l) {
|
|
@@ -196,15 +155,15 @@ var $ = function() {
|
|
|
196
155
|
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(i) {
|
|
197
156
|
e.$set(e.listenerFieldForm, "expression", i);
|
|
198
157
|
}, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
158
|
+
}, h = [], v = /* @__PURE__ */ F(
|
|
159
|
+
f,
|
|
160
|
+
b,
|
|
161
|
+
h,
|
|
203
162
|
!1,
|
|
204
163
|
null,
|
|
205
164
|
null
|
|
206
165
|
);
|
|
207
|
-
const
|
|
166
|
+
const L = v.exports;
|
|
208
167
|
export {
|
|
209
|
-
|
|
168
|
+
L as default
|
|
210
169
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isObject as u, isString as c } from "@web-utils/core";
|
|
2
|
+
const g = {
|
|
3
|
+
privilege: {
|
|
4
|
+
processButtons(e) {
|
|
5
|
+
return e.map((t) => {
|
|
6
|
+
var r, n;
|
|
7
|
+
if (u(t)) {
|
|
8
|
+
const o = t, s = {};
|
|
9
|
+
for (const i in o)
|
|
10
|
+
c(o[i]) && (s[i] = (n = (r = g.privilege) == null ? void 0 : r.hasAuthority) == null ? void 0 : n.call(r, o[i]));
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
hasAuthority(e) {
|
|
17
|
+
return !0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
g
|
|
23
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import d from "element-ui/lib/loading";
|
|
2
|
+
import y from "element-ui/lib/message-box";
|
|
3
|
+
import { isFunction as a } from "@web-utils/core";
|
|
4
|
+
async function v(t, e, n) {
|
|
5
|
+
const { stop: r, prevent: o, message: f, loadable: l, loadingText: x, confirmable: b, confirmType: T, confirmText: S, confirmTitle: w } = e;
|
|
6
|
+
r && t.stopPropagation(), o && t.preventDefault();
|
|
7
|
+
const { before: c, click: u, cancel: s, after: g } = n;
|
|
8
|
+
if (a(u))
|
|
9
|
+
try {
|
|
10
|
+
let i = !0;
|
|
11
|
+
if (a(c) && (i = await c(t)), i === !1)
|
|
12
|
+
return;
|
|
13
|
+
b && await (y.confirm || y.default.confirm)(f || S, {
|
|
14
|
+
type: T,
|
|
15
|
+
title: w
|
|
16
|
+
});
|
|
17
|
+
let m;
|
|
18
|
+
l && (m = (d.service || d.default.service)({
|
|
19
|
+
background: "rgba(0,0,0,0.3)",
|
|
20
|
+
text: x
|
|
21
|
+
}));
|
|
22
|
+
let p;
|
|
23
|
+
try {
|
|
24
|
+
p = await u(t);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
l && m.close(), a(g) && await g(t, p);
|
|
28
|
+
} catch (i) {
|
|
29
|
+
a(s) && await s(i);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const C = {
|
|
33
|
+
functional: !0,
|
|
34
|
+
props: {
|
|
35
|
+
stop: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
prevent: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
text: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
message: String,
|
|
48
|
+
confirmable: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
confirmText: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "你确定要删除该记录吗?"
|
|
55
|
+
},
|
|
56
|
+
confirmType: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "warning"
|
|
59
|
+
},
|
|
60
|
+
confirmTitle: String,
|
|
61
|
+
loadable: Boolean,
|
|
62
|
+
loadingText: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: "正在处理中请稍候..."
|
|
65
|
+
},
|
|
66
|
+
tag: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "i"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
render(t, { props: e, data: n, children: r, listeners: o }) {
|
|
72
|
+
return t(
|
|
73
|
+
e.tag,
|
|
74
|
+
{
|
|
75
|
+
...n,
|
|
76
|
+
on: { click: (f) => v(f, e, o) },
|
|
77
|
+
props: e
|
|
78
|
+
},
|
|
79
|
+
r || e.text
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
C as c
|
|
85
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { hyphenate as f } from "@web-utils/core";
|
|
2
|
+
const a = (n) => {
|
|
3
|
+
const t = {};
|
|
4
|
+
for (const o in n)
|
|
5
|
+
t[f(o)] = n[o];
|
|
6
|
+
return t;
|
|
7
|
+
}, h = (n, t = "id", o = "label") => {
|
|
8
|
+
const i = [];
|
|
9
|
+
function e(s, c) {
|
|
10
|
+
if (!s) return;
|
|
11
|
+
const r = [...c, { [t]: s[t], [o]: s[o] }];
|
|
12
|
+
if (!s.children || s.children.length === 0) {
|
|
13
|
+
i.push(r);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
s.children.forEach((l) => {
|
|
17
|
+
e(l, r);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return n.forEach((s) => e(s, [])), i;
|
|
21
|
+
}, u = (n) => {
|
|
22
|
+
const t = [];
|
|
23
|
+
return n && (isArray(n) ? n.forEach((o) => {
|
|
24
|
+
isArray(o) ? t.push(...u(o)) : o && t.push(o);
|
|
25
|
+
}) : n && t.push(n)), t;
|
|
26
|
+
}, b = (n, t = "id", o = "label") => {
|
|
27
|
+
const i = [];
|
|
28
|
+
return h(n).forEach((e) => {
|
|
29
|
+
const s = [], c = [];
|
|
30
|
+
for (let r = 0; r < e.length; r++)
|
|
31
|
+
s.push(e[r][t]), c.push(e[r][o]);
|
|
32
|
+
i.push({
|
|
33
|
+
value: s.join("/"),
|
|
34
|
+
label: c.join("/")
|
|
35
|
+
});
|
|
36
|
+
}), i;
|
|
37
|
+
}, j = (n, t = "id", o = "label") => {
|
|
38
|
+
const i = {};
|
|
39
|
+
return h(n).forEach((e) => {
|
|
40
|
+
const s = [], c = [];
|
|
41
|
+
for (let r = 0; r < e.length; r++)
|
|
42
|
+
s.push(e[r][t]), c.push(e[r][o]);
|
|
43
|
+
i[s.join("/")] = {
|
|
44
|
+
value: s.join("/"),
|
|
45
|
+
label: c.join("/")
|
|
46
|
+
};
|
|
47
|
+
}), i;
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
j as a,
|
|
51
|
+
a as b,
|
|
52
|
+
u as f,
|
|
53
|
+
b as t
|
|
54
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = () => [], i = {
|
|
2
|
+
props: {
|
|
3
|
+
dictType: String
|
|
4
|
+
},
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
dictItems: []
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
watch: {
|
|
11
|
+
dictType: {
|
|
12
|
+
immediate: !0,
|
|
13
|
+
async handler(t) {
|
|
14
|
+
t ? this.dictItems = await e(t, !0, {
|
|
15
|
+
treeDict: this.treeDict,
|
|
16
|
+
idAsValue: this.idAsValue,
|
|
17
|
+
labelAsValue: this.labelAsValue
|
|
18
|
+
}) : this.dictItems = [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
i as d
|
|
25
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { t as u, a as l } from "./core.DJEgjQW6.mjs";
|
|
2
|
+
import { g as h } from "./configComponents.BDhlZU8F.mjs";
|
|
3
|
+
const d = {}, D = {}, $ = {}, T = (t, c = !0, { options: o, treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
|
|
4
|
+
let e = t;
|
|
5
|
+
n && (e = `${t}-${i}-${r}${o ? "-options" : ""}`);
|
|
6
|
+
const a = d[e];
|
|
7
|
+
return c && a ? a : n ? C(t, c, { idAsValue: i, labelAsValue: r }) : w(t, c);
|
|
8
|
+
}, w = (t, c = !0) => {
|
|
9
|
+
if ($[t])
|
|
10
|
+
return $[t];
|
|
11
|
+
const o = new Promise((n, i) => {
|
|
12
|
+
var r, e;
|
|
13
|
+
c && d[t] ? n(d[t]) : ((e = (r = h) == null ? void 0 : r.dict) != null && e.remote && n([]), h.dict.remote(t).then((a) => {
|
|
14
|
+
let s = a.data.data;
|
|
15
|
+
if (c) {
|
|
16
|
+
const f = {};
|
|
17
|
+
s.forEach(({ label: g, value: m }) => {
|
|
18
|
+
f[m] = Object.freeze({ label: g, value: m });
|
|
19
|
+
}), D[t] = f, s = Object.freeze(s), d[t] = s;
|
|
20
|
+
}
|
|
21
|
+
$[t] = null, n(s);
|
|
22
|
+
}).catch((a) => {
|
|
23
|
+
$[t] = null, i(a);
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
return $[t] = o, o;
|
|
27
|
+
}, C = (t, c = !0, { idAsValue: o, labelAsValue: n } = {}) => {
|
|
28
|
+
const i = `${t}-${o}-${n}`;
|
|
29
|
+
if ($[i])
|
|
30
|
+
return $[i];
|
|
31
|
+
const r = new Promise((e, a) => {
|
|
32
|
+
var s, f;
|
|
33
|
+
c && d[i] ? e(d[i]) : ((f = (s = h) == null ? void 0 : s.dict) != null && f.getDictTreeByType && e([]), h.dict.getDictTreeByType(t, { idAsValue: o, labelAsValue: n }).then((g) => {
|
|
34
|
+
const m = g.data.data;
|
|
35
|
+
c && (d[i] = m, d[`${i}-options`] = u(m), D[i] = l(m)), $[i] = null, e(m);
|
|
36
|
+
}).catch((g) => {
|
|
37
|
+
$[i] = null, a(g);
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
return $[i] = r, r;
|
|
41
|
+
}, b = async (t, c, o = !0, { treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
|
|
42
|
+
let e = t;
|
|
43
|
+
n && (e = `${t}-${i}-${r}`);
|
|
44
|
+
const a = D[e];
|
|
45
|
+
let s;
|
|
46
|
+
if (o && a)
|
|
47
|
+
s = a[c];
|
|
48
|
+
else {
|
|
49
|
+
let f = await T(t, o, { treeDict: n, idAsValue: i, labelAsValue: r });
|
|
50
|
+
if (o)
|
|
51
|
+
s = D[e][c];
|
|
52
|
+
else {
|
|
53
|
+
n && (f = u(f));
|
|
54
|
+
for (let g = 0; g < f.length; g++) {
|
|
55
|
+
const m = f[g];
|
|
56
|
+
if (m.value === c) {
|
|
57
|
+
s = m;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return s;
|
|
64
|
+
}, j = async (t, c, o = !0, { treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
|
|
65
|
+
var e;
|
|
66
|
+
return ((e = await b(t, c, o, { treeDict: n, idAsValue: i, labelAsValue: r })) == null ? void 0 : e.label) || c || "";
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
j as g
|
|
70
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { f as r } from "./form-item.D-H-wCPE.mjs";
|
|
2
|
+
import { c as t } from "./index.d3MV3Wq2.mjs";
|
|
3
|
+
const o = {
|
|
4
|
+
name: "FormInput",
|
|
5
|
+
mixins: [r],
|
|
6
|
+
props: {
|
|
7
|
+
value: [Boolean, String, Array, Number, Object, Date],
|
|
8
|
+
readonly: Boolean,
|
|
9
|
+
disabled: Boolean
|
|
10
|
+
},
|
|
11
|
+
inject: {
|
|
12
|
+
formView: {
|
|
13
|
+
default: {}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
computed: {
|
|
17
|
+
computePlaceholder() {
|
|
18
|
+
return this.formView.printing ? null : this.placeholder === !0 ? this.message : this.placeholder;
|
|
19
|
+
},
|
|
20
|
+
listeners() {
|
|
21
|
+
return t(this.$listeners, "input", !1);
|
|
22
|
+
},
|
|
23
|
+
inputDisabled() {
|
|
24
|
+
var e;
|
|
25
|
+
return (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : this.disabled || (this.elForm || {}).disabled;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
o as f
|
|
31
|
+
};
|