@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta50
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/api/index.d.ts +60 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/base.css +1 -1
- package/chunks/6yfBZFOB.mjs +56 -0
- package/chunks/B-zqRAXo.mjs +69 -0
- package/chunks/B1IPSTA6.mjs +198 -0
- package/chunks/B9gA65rt2.mjs +38 -0
- package/chunks/BA2KEptL.mjs +172 -0
- package/chunks/BBERmTup.mjs +83 -0
- package/chunks/BUGCiCnl.mjs +83 -0
- package/chunks/BbSPWDDZ.mjs +100 -0
- package/chunks/BfxDxIg0.mjs +106 -0
- package/chunks/BqWvBF14.mjs +35 -0
- package/chunks/BsZgAJX_2.mjs +81 -0
- package/chunks/BtcjAHE6.mjs +317 -0
- package/chunks/ByHz4mmh.mjs +87 -0
- package/chunks/C2zgFLYO.mjs +185 -0
- package/chunks/CAd1zK9Q.mjs +25 -0
- package/chunks/CJdkjadi.mjs +17 -0
- package/chunks/CabldOLo.mjs +157 -0
- package/chunks/CkOD-_VV.mjs +8 -0
- package/chunks/Cln3RBAD.mjs +660 -0
- package/chunks/CqoVAnxC2.mjs +93 -0
- package/chunks/CuAoMR3n.mjs +105 -0
- package/chunks/CxTg0r4n.mjs +166 -0
- package/chunks/D0Zg2CV0.mjs +57 -0
- package/chunks/DA7oGHSX.mjs +141 -0
- package/chunks/DOP3aBxf.mjs +93 -0
- package/chunks/DOZRzqlo.mjs +37 -0
- package/chunks/D_qiRmiE.mjs +230 -0
- package/chunks/DcTVYqeJ.mjs +113 -0
- package/chunks/Dkd5BC98.mjs +198 -0
- package/chunks/GI8krYU82.mjs +478 -0
- package/chunks/V2p-PCpL.mjs +176 -0
- package/chunks/bFbPPcdq.mjs +25 -0
- package/chunks/cqIZWDHo.mjs +614 -0
- package/chunks/eae6huQB.mjs +25 -0
- package/chunks/gCeDFHo1.mjs +32 -0
- package/chunks/gLPy4Sus.mjs +164 -0
- package/chunks/hlha6Bhc.mjs +107 -0
- package/chunks/hzaYr6Ud2.mjs +207 -0
- package/chunks/kflKDW4T2.mjs +146 -0
- package/chunks/pIzhYsBe.mjs +93 -0
- package/chunks/vXQf89tS.mjs +1361 -0
- package/chunks/wXeqV-_7.mjs +89 -0
- package/chunks/zwXzk9ff2.mjs +568 -0
- package/confirm-button/index.d.ts +115 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +86 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +53 -0
- package/constants/index.mjs +4 -0
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- package/editable-tree/index.d.ts +254 -0
- package/editable-tree/index.mjs +2 -0
- package/editable-tree/style.css +1 -0
- package/element-dialog/index.d.ts +337 -16
- package/element-dialog/index.mjs +2 -91
- package/element-resize-observer/index.d.ts +8 -0
- package/element-resize-observer/index.mjs +40 -0
- package/element-resize-observer/style.css +1 -0
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.mjs +13 -12
- package/form-button/index.d.ts +116 -0
- package/form-button/index.mjs +36 -0
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +472 -0
- package/form-cascader/index.mjs +2 -0
- package/form-checkbox/index.d.ts +236 -16
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +364 -0
- package/form-checkbox-group/index.mjs +2 -0
- package/form-checkbox-group/style.css +1 -0
- package/form-date-picker/index.d.ts +390 -19
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +87 -20
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +145 -13
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +301 -20
- package/form-input/index.mjs +1 -1
- package/form-input/style.css +1 -0
- package/form-input-cron-expression/index.d.ts +217 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +307 -16
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +307 -16
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +246 -18
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +307 -16
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-config-provider/index.d.ts +22 -0
- package/form-item-config-provider/index.mjs +24 -0
- package/form-item-group/index.d.ts +91 -17
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.d.ts +141 -11
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -0
- package/form-radio-group/index.d.ts +303 -16
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +254 -14
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +537 -18
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +283 -16
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +272 -14
- package/form-switch/index.mjs +1 -1
- package/form-table/index.d.ts +269 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.d.ts +165 -13
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +351 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/form-view/index.mjs +1 -1
- package/helper/dictionary.d.ts +15 -0
- package/helper/dictionary.mjs +97 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/index.css +2 -0
- package/index.d.ts +57 -36
- package/index.mjs +59 -61
- package/package.json +10 -5
- package/pageable-table/index.d.ts +398 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/resolver/index.mjs +29 -0
- package/sub-table/index.d.ts +100 -0
- package/sub-table/index.mjs +472 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +97 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/table-column/index.d.ts +160 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +95 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +340 -1
- package/table-view/index.mjs +454 -6
- package/table-view/style.css +1 -0
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +188 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +228 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/B4M_TFeR.mjs +0 -152
- package/chunks/B5BIQCcK.mjs +0 -149
- package/chunks/BHNKrW1j.mjs +0 -61
- package/chunks/BO9jWhBl.mjs +0 -46
- package/chunks/BZ8aOa78.mjs +0 -35
- package/chunks/Bsz7y4Xp.mjs +0 -73
- package/chunks/Bxj372sF.mjs +0 -53
- package/chunks/C33EmJN8.mjs +0 -32
- package/chunks/C6Li3-l7.mjs +0 -28
- package/chunks/CBcdalMX.mjs +0 -35
- package/chunks/CdRsyF0n.mjs +0 -43
- package/chunks/ClNahmiU.mjs +0 -23
- package/chunks/CstztYMu.mjs +0 -28
- package/chunks/DC9b53M6.mjs +0 -32
- package/chunks/DDVAgRED.mjs +0 -36
- package/chunks/DpJQABVD.mjs +0 -91
- package/chunks/ZsLNWI9x.mjs +0 -46
- package/chunks/jn_iQrVZ.mjs +0 -28
- package/constants.d.ts +0 -1
- package/constants.mjs +0 -4
- package/form-check-box-group/index.d.ts +0 -93
- package/form-check-box-group/index.mjs +0 -2
- package/input/style.css +0 -1
- package/resolver.mjs +0 -79
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n, t as r } from "./CJdkjadi.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElTimeSelect as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/time-select.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: String,
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
editable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
clearable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
includeEndTime: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "default"
|
|
29
|
+
},
|
|
30
|
+
placeholder: String,
|
|
31
|
+
name: String,
|
|
32
|
+
effect: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "light"
|
|
35
|
+
},
|
|
36
|
+
prefixIcon: [String, Object],
|
|
37
|
+
clearIcon: [String, Object],
|
|
38
|
+
start: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "09:00"
|
|
41
|
+
},
|
|
42
|
+
end: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "18:00"
|
|
45
|
+
},
|
|
46
|
+
step: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "00:30"
|
|
49
|
+
},
|
|
50
|
+
minTime: String,
|
|
51
|
+
maxTime: String,
|
|
52
|
+
format: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "HH:mm"
|
|
55
|
+
},
|
|
56
|
+
emptyValues: Array,
|
|
57
|
+
valueOnClear: [
|
|
58
|
+
String,
|
|
59
|
+
Number,
|
|
60
|
+
Boolean,
|
|
61
|
+
Function
|
|
62
|
+
],
|
|
63
|
+
popperClass: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
popperStyle: [String, Object]
|
|
68
|
+
}, c = {
|
|
69
|
+
disabled: !0,
|
|
70
|
+
modelValue: !0
|
|
71
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
72
|
+
name: "FormTimeSelect",
|
|
73
|
+
inheritAttrs: !1,
|
|
74
|
+
props: { ...s },
|
|
75
|
+
emits: { ...t },
|
|
76
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
77
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
78
|
+
emit: n,
|
|
79
|
+
slots: r,
|
|
80
|
+
attrs: s,
|
|
81
|
+
predicate: l
|
|
82
|
+
});
|
|
83
|
+
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
84
|
+
style: "width: 100%",
|
|
85
|
+
modelValue: t.modelValue,
|
|
86
|
+
disabled: f.value,
|
|
87
|
+
"onUpdate:modelValue": c,
|
|
88
|
+
placeholder: d.value
|
|
89
|
+
}), null) });
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { u as t };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { n as e } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n as t, t as n } from "./CJdkjadi.mjs";
|
|
3
|
+
import { t as r } from "./CabldOLo.mjs";
|
|
4
|
+
import { createVNode as i, isVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
5
|
+
//#region src/components/form/props/textarea.ts
|
|
6
|
+
var c = {
|
|
7
|
+
...t,
|
|
8
|
+
...n,
|
|
9
|
+
modelValue: [String, Number],
|
|
10
|
+
modelModifiers: Object,
|
|
11
|
+
maxlength: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
default: 800
|
|
14
|
+
},
|
|
15
|
+
minlength: [String, Number],
|
|
16
|
+
showWordLimit: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !0
|
|
19
|
+
},
|
|
20
|
+
wordLimitPosition: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "inside"
|
|
23
|
+
},
|
|
24
|
+
placeholder: String,
|
|
25
|
+
clearIcon: [String, Object],
|
|
26
|
+
formatter: Function,
|
|
27
|
+
parser: Function,
|
|
28
|
+
showPassword: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
prefixIcon: [String, Object],
|
|
33
|
+
suffixIcon: [String, Object],
|
|
34
|
+
rows: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 4
|
|
37
|
+
},
|
|
38
|
+
autosize: [Boolean, Object],
|
|
39
|
+
autocomplete: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "off"
|
|
42
|
+
},
|
|
43
|
+
name: String,
|
|
44
|
+
readonly: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
max: [String, Number],
|
|
49
|
+
min: [String, Number],
|
|
50
|
+
step: [String, Number],
|
|
51
|
+
resize: String,
|
|
52
|
+
autofocus: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
form: String,
|
|
57
|
+
ariaLabel: String,
|
|
58
|
+
tabindex: [String, Number],
|
|
59
|
+
validateEvent: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !0
|
|
62
|
+
},
|
|
63
|
+
inputStyle: [String, Object],
|
|
64
|
+
inputmode: String,
|
|
65
|
+
countGraphemes: Function,
|
|
66
|
+
readonlyGrey: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/components/form/FormTextarea.vue?vue&type=script&lang.jsx
|
|
73
|
+
function l(e) {
|
|
74
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/form/FormTextarea.vue
|
|
78
|
+
var u = {
|
|
79
|
+
name: "FormTextarea",
|
|
80
|
+
inheritAttrs: !1,
|
|
81
|
+
props: {
|
|
82
|
+
...c,
|
|
83
|
+
maxlength: {
|
|
84
|
+
type: [String, Number],
|
|
85
|
+
default: 800
|
|
86
|
+
},
|
|
87
|
+
block: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
emits: { ...e },
|
|
93
|
+
setup(e, { slots: t, attrs: n }) {
|
|
94
|
+
let a = s(e, "modelValue");
|
|
95
|
+
return () => i(r, o(e, n, {
|
|
96
|
+
maxlength: e.maxlength,
|
|
97
|
+
block: e.block,
|
|
98
|
+
modelValue: a.value,
|
|
99
|
+
"onUpdate:modelValue": (e) => a.value = e,
|
|
100
|
+
type: "textarea"
|
|
101
|
+
}), l(t) ? t : { default: () => [t] });
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
105
|
+
export { u as t };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { f as e } from "./DcTVYqeJ.mjs";
|
|
2
|
+
import { hasAuthority as t } from "../api/index.mjs";
|
|
3
|
+
import { toolbarContextKey as n } from "../constants/index.mjs";
|
|
4
|
+
import { isArray as r, isFunction as i } from "@web-utils/core";
|
|
5
|
+
import { computed as a, createVNode as o, defineComponent as s, getCurrentInstance as c, inject as l, mergeProps as u, ref as d } from "vue";
|
|
6
|
+
import { ElMessage as f, ElMessageBox as p } from "element-plus";
|
|
7
|
+
import { ElButton as m } from "element-plus/es";
|
|
8
|
+
//#region src/components/toolbar/button.ts
|
|
9
|
+
var h = {
|
|
10
|
+
size: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "default"
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "default"
|
|
17
|
+
},
|
|
18
|
+
plain: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
text: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
bg: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
link: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
round: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
circle: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
dashed: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
loading: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
loadingIcon: [String, Object],
|
|
51
|
+
disabled: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
},
|
|
55
|
+
icon: [String, Object],
|
|
56
|
+
autofocus: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
nativeType: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "button"
|
|
63
|
+
},
|
|
64
|
+
autoInsertSpace: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
color: String,
|
|
69
|
+
dark: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !1
|
|
72
|
+
},
|
|
73
|
+
tag: [String, Object],
|
|
74
|
+
label: String,
|
|
75
|
+
loadable: Boolean,
|
|
76
|
+
footer: Boolean,
|
|
77
|
+
primary: Boolean,
|
|
78
|
+
warning: Boolean,
|
|
79
|
+
privilege: String,
|
|
80
|
+
condition: { type: [
|
|
81
|
+
Array,
|
|
82
|
+
Function,
|
|
83
|
+
Boolean
|
|
84
|
+
] },
|
|
85
|
+
conditionTips: String,
|
|
86
|
+
confirm: Boolean,
|
|
87
|
+
confirmTips: String,
|
|
88
|
+
beforeExecute: Function,
|
|
89
|
+
afterExecute: Function,
|
|
90
|
+
route: [String, Object],
|
|
91
|
+
title: String,
|
|
92
|
+
cancelButtonText: String,
|
|
93
|
+
confirmButtonText: String
|
|
94
|
+
}, g = {
|
|
95
|
+
icon: !0,
|
|
96
|
+
type: !0,
|
|
97
|
+
text: !0,
|
|
98
|
+
title: !0,
|
|
99
|
+
disabled: !0,
|
|
100
|
+
loading: !0
|
|
101
|
+
}, _ = (e) => g[e] !== !0, v = /* @__PURE__ */ s({
|
|
102
|
+
name: "ToolbarButton",
|
|
103
|
+
inheritAttrs: !1,
|
|
104
|
+
props: { ...h },
|
|
105
|
+
setup(s, { attrs: h, slots: g }) {
|
|
106
|
+
let v = c(), y = l(n, null), b = d(!1), x = a(() => s.privilege ? t(s.privilege) : !0), S = async (e) => {
|
|
107
|
+
try {
|
|
108
|
+
if (i(s.beforeExecute) && await s.beforeExecute() === !1) return;
|
|
109
|
+
if (s.conditionTips) {
|
|
110
|
+
let e;
|
|
111
|
+
if (e = r(s.condition) ? s.condition.length <= 0 : i(s.condition) ? !s.condition() : !s.condition, e) {
|
|
112
|
+
f.warning(s.conditionTips);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (s.confirm || s.confirmTips) try {
|
|
117
|
+
await p.confirm(s.confirmTips || "你确定要删除该记录吗?", "系统提示", {
|
|
118
|
+
type: "warning",
|
|
119
|
+
distinguishCancelAndClose: !0,
|
|
120
|
+
cancelButtonText: s.cancelButtonText,
|
|
121
|
+
confirmButtonText: s.confirmButtonText
|
|
122
|
+
});
|
|
123
|
+
} catch (e) {
|
|
124
|
+
if (e === "cancel") {
|
|
125
|
+
let { onCancel: t } = h;
|
|
126
|
+
i(t) && await t(e);
|
|
127
|
+
} else if (e === "close") {
|
|
128
|
+
let { onClose: t } = h;
|
|
129
|
+
i(t) && await t(e);
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
b.value = !0;
|
|
134
|
+
let n;
|
|
135
|
+
if (s.route) {
|
|
136
|
+
var t;
|
|
137
|
+
await ((t = v.proxy.$router) == null ? void 0 : t.push(s.route));
|
|
138
|
+
} else {
|
|
139
|
+
let { onClick: t } = h;
|
|
140
|
+
if (i(t)) try {
|
|
141
|
+
n = await t(e);
|
|
142
|
+
} catch {}
|
|
143
|
+
}
|
|
144
|
+
b.value = !1, i(s.afterExecute) && await s.afterExecute(n);
|
|
145
|
+
} catch {}
|
|
146
|
+
}, C = a(() => s.text ? !0 : s.type === "text"), w = a(() => {
|
|
147
|
+
if (!C.value) return s.primary ? "primary" : s.warning ? "warning" : s.type;
|
|
148
|
+
}), T = e(s, _);
|
|
149
|
+
return () => x.value ? o(m, u(T.value, {
|
|
150
|
+
title: s.footer || y != null && y.footer ? null : s.title,
|
|
151
|
+
disabled: s.disabled || b.value,
|
|
152
|
+
loading: s.loadable ? b.value : !1,
|
|
153
|
+
type: w.value,
|
|
154
|
+
text: C.value,
|
|
155
|
+
class: h.class,
|
|
156
|
+
style: h.style,
|
|
157
|
+
onClick: S
|
|
158
|
+
}), {
|
|
159
|
+
default: !s.circle && (s.label || g.default) ? () => g.default ? g.default() : s.label : null,
|
|
160
|
+
loading: g.loading,
|
|
161
|
+
icon: g.icon ? g.icon : s.icon ? () => o("i", { class: s.icon }, null) : null
|
|
162
|
+
}) : null;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { v as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n, t as r } from "./CJdkjadi.mjs";
|
|
3
|
+
import { t as i } from "./vXQf89tS.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o, ref as s } from "vue";
|
|
5
|
+
import { ElInput as c, ElPopover as l } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/input-cron.ts
|
|
7
|
+
var u = {
|
|
8
|
+
...n,
|
|
9
|
+
...r,
|
|
10
|
+
modelValue: [String, Number]
|
|
11
|
+
}, d = {
|
|
12
|
+
readonly: !0,
|
|
13
|
+
placeholder: !0,
|
|
14
|
+
disabled: !0,
|
|
15
|
+
modelValue: !0,
|
|
16
|
+
prefix: !0,
|
|
17
|
+
suffix: !0
|
|
18
|
+
}, f = (e) => n[e] === void 0 && d[e] !== !0, p = {
|
|
19
|
+
name: "FormInputCronExpression",
|
|
20
|
+
props: { ...u },
|
|
21
|
+
emits: { ...t },
|
|
22
|
+
setup(t, { emit: n, slots: r, attrs: u }) {
|
|
23
|
+
let d = s(!1), { emitInput: p, render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = e(t, {
|
|
24
|
+
emit: n,
|
|
25
|
+
slots: r,
|
|
26
|
+
attrs: u,
|
|
27
|
+
predicate: f
|
|
28
|
+
}), y = () => {
|
|
29
|
+
d.value = !0;
|
|
30
|
+
}, b = () => {
|
|
31
|
+
d.value = !1;
|
|
32
|
+
};
|
|
33
|
+
return () => m({ vNodes: a("div", { class: "cron" }, [a(l, {
|
|
34
|
+
placement: "bottom-start",
|
|
35
|
+
disabled: g.value,
|
|
36
|
+
visible: d.value,
|
|
37
|
+
"onUpdate:visible": (e) => d.value = e,
|
|
38
|
+
"popper-class": "cron-popover"
|
|
39
|
+
}, {
|
|
40
|
+
default: () => a(i, o(_.value, v.value, {
|
|
41
|
+
i18n: "cn",
|
|
42
|
+
expression: t.modelValue,
|
|
43
|
+
onChange: p,
|
|
44
|
+
onClose: b
|
|
45
|
+
}), null),
|
|
46
|
+
reference: () => a(c, {
|
|
47
|
+
modelValue: t.modelValue,
|
|
48
|
+
readonly: !0,
|
|
49
|
+
disabled: g.value,
|
|
50
|
+
placeholder: h.value,
|
|
51
|
+
onClick: y
|
|
52
|
+
}, null)
|
|
53
|
+
})]) });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { p as t };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n } from "./CJdkjadi.mjs";
|
|
3
|
+
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { computed as i, createVNode as a, isVNode as o, mergeProps as s, useModel as c } from "vue";
|
|
5
|
+
import { ElRadio as l, ElRadioButton as u, ElRadioGroup as d } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/radio-group.ts
|
|
7
|
+
var f = {
|
|
8
|
+
...n,
|
|
9
|
+
modelValue: [
|
|
10
|
+
String,
|
|
11
|
+
Number,
|
|
12
|
+
Boolean
|
|
13
|
+
],
|
|
14
|
+
size: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "default"
|
|
17
|
+
},
|
|
18
|
+
validateEvent: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
textColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "#ffffff"
|
|
25
|
+
},
|
|
26
|
+
fill: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "#409eff"
|
|
29
|
+
},
|
|
30
|
+
ariaLabel: String,
|
|
31
|
+
name: String,
|
|
32
|
+
id: String,
|
|
33
|
+
options: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({
|
|
40
|
+
value: "value",
|
|
41
|
+
label: "label",
|
|
42
|
+
disabled: "disabled"
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
type: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "radio"
|
|
48
|
+
},
|
|
49
|
+
border: Boolean,
|
|
50
|
+
gender: Boolean,
|
|
51
|
+
overFlow: Boolean,
|
|
52
|
+
confirm: Boolean,
|
|
53
|
+
trigger: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "change"
|
|
56
|
+
},
|
|
57
|
+
labelProp: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "name"
|
|
60
|
+
},
|
|
61
|
+
valueProp: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "code"
|
|
64
|
+
},
|
|
65
|
+
english: Boolean,
|
|
66
|
+
chinese: Boolean,
|
|
67
|
+
typing: Boolean,
|
|
68
|
+
classic: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !0
|
|
71
|
+
},
|
|
72
|
+
fillRow: Boolean,
|
|
73
|
+
ellipsis: Boolean,
|
|
74
|
+
inline: Boolean,
|
|
75
|
+
allowCancel: Boolean,
|
|
76
|
+
radioType: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "radio"
|
|
79
|
+
},
|
|
80
|
+
dictType: String
|
|
81
|
+
}, p = {
|
|
82
|
+
modelValue: !0,
|
|
83
|
+
disabled: !0,
|
|
84
|
+
type: !0,
|
|
85
|
+
options: !0
|
|
86
|
+
}, m = (e) => n[e] === void 0 && p[e] !== !0;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
|
|
89
|
+
function h(e) {
|
|
90
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/components/form/FormRadioGroup.vue
|
|
94
|
+
var g = {
|
|
95
|
+
name: "FormRadioGroup",
|
|
96
|
+
inheritAttrs: !1,
|
|
97
|
+
props: { ...f },
|
|
98
|
+
emits: { ...t },
|
|
99
|
+
setup(t, { slots: n, attrs: o, emit: f }) {
|
|
100
|
+
let p = c(t, "modelValue"), { render: g, disabled: _, listeners: v, inputProps: y } = e(t, {
|
|
101
|
+
emit: f,
|
|
102
|
+
slots: n,
|
|
103
|
+
attrs: o,
|
|
104
|
+
predicate: m,
|
|
105
|
+
messagePrefix: "请选择"
|
|
106
|
+
}), b = i(() => t.classic ? "label" : t.labelProp), x = i(() => t.classic ? "value" : t.valueProp), { dictItems: S } = r(t), C = i(() => t.dictType ? S.value : t.gender ? [{
|
|
107
|
+
[b.value]: "男",
|
|
108
|
+
[x.value]: t.chinese ? "男" : t.typing ? 1 : "1"
|
|
109
|
+
}, {
|
|
110
|
+
[b.value]: "女",
|
|
111
|
+
[x.value]: t.chinese ? "女" : t.typing ? 2 : "2"
|
|
112
|
+
}] : t.confirm ? [{
|
|
113
|
+
[b.value]: "是",
|
|
114
|
+
[x.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
|
|
115
|
+
}, {
|
|
116
|
+
[b.value]: "否",
|
|
117
|
+
[x.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
|
|
118
|
+
}] : t.options);
|
|
119
|
+
return () => g({ vNodes: a(d, s(v.value, y.value, {
|
|
120
|
+
modelValue: p.value,
|
|
121
|
+
"onUpdate:modelValue": (e) => p.value = e,
|
|
122
|
+
disabled: _.value
|
|
123
|
+
}), {
|
|
124
|
+
...n,
|
|
125
|
+
default: n.default || (() => {
|
|
126
|
+
var e;
|
|
127
|
+
return (e = C.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" || t.radioType === "button" ? a(u, {
|
|
128
|
+
key: e,
|
|
129
|
+
value: e,
|
|
130
|
+
disabled: r
|
|
131
|
+
}, h(n) ? n : { default: () => [n] }) : a(l, {
|
|
132
|
+
key: e,
|
|
133
|
+
value: e,
|
|
134
|
+
disabled: r
|
|
135
|
+
}, h(n) ? n : { default: () => [n] }));
|
|
136
|
+
})
|
|
137
|
+
}) });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
export { g as t };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { columnSizeContextKey as e, setColumnSizeContextKey as t } from "../constants/index.mjs";
|
|
2
|
+
import n from "../form-cell/index.mjs";
|
|
3
|
+
import { camelize as r, isDef as i, isString as a } from "@web-utils/core";
|
|
4
|
+
import { Comment as o, Fragment as s, Text as c, createVNode as l, inject as u, isVNode as d } from "vue";
|
|
5
|
+
import { ElTooltip as f } from "element-plus/es";
|
|
6
|
+
//#region src/components/red-form/FormRow.vue?vue&type=script&lang.jsx
|
|
7
|
+
function p(e) {
|
|
8
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
|
|
9
|
+
}
|
|
10
|
+
var m = (e) => {
|
|
11
|
+
let t = Object.keys({});
|
|
12
|
+
for (let n in e) t[r(n)] = e[n];
|
|
13
|
+
return t;
|
|
14
|
+
}, h = (e, { columnSize: t }) => {
|
|
15
|
+
if (!e || !e.length) return null;
|
|
16
|
+
e = e.filter((e) => e.type !== o);
|
|
17
|
+
let n = [], r = e.length === 1;
|
|
18
|
+
for (let o = 0; o < e.length; o++) {
|
|
19
|
+
let v = e[o], { name: y } = v.type;
|
|
20
|
+
if (v.type === c) n.push({
|
|
21
|
+
tag: y,
|
|
22
|
+
type: "text",
|
|
23
|
+
content: v,
|
|
24
|
+
colspan: r ? t : 0
|
|
25
|
+
});
|
|
26
|
+
else if (v.type === s) n.push(...h(v.children, { columnSize: t }));
|
|
27
|
+
else if (a(v.type) && v.type === "td") n.push({
|
|
28
|
+
tag: v.type,
|
|
29
|
+
type: "td",
|
|
30
|
+
content: v
|
|
31
|
+
});
|
|
32
|
+
else if (y === "FormCell") n.push({
|
|
33
|
+
tag: y,
|
|
34
|
+
type: "FormCell",
|
|
35
|
+
content: v
|
|
36
|
+
});
|
|
37
|
+
else if (typeof v.type == "object") {
|
|
38
|
+
var u, d;
|
|
39
|
+
let { label: e, hideLabel: a, labelColspan: o, inputColspan: s, labelRowspan: c, inputRowspan: h, tipsAfterLabel: b, tips: x } = m(v.props);
|
|
40
|
+
if (!i(a)) {
|
|
41
|
+
var p, g, _;
|
|
42
|
+
let t = (p = v.children) == null ? void 0 : p.tips, r = t || x ? l(f, {
|
|
43
|
+
effect: "light",
|
|
44
|
+
content: x,
|
|
45
|
+
offset: 4
|
|
46
|
+
}, {
|
|
47
|
+
default: () => l("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
48
|
+
content: t || null
|
|
49
|
+
}) : null;
|
|
50
|
+
n.push({
|
|
51
|
+
tag: y,
|
|
52
|
+
type: "label",
|
|
53
|
+
colspan: o,
|
|
54
|
+
rowspan: c,
|
|
55
|
+
content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? r : null]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
let S;
|
|
59
|
+
S = r && i(a) ? t : i(s) ? s : r ? t - 1 : 0, n.push({
|
|
60
|
+
tag: y,
|
|
61
|
+
type: "input",
|
|
62
|
+
colspan: S,
|
|
63
|
+
rowspan: h,
|
|
64
|
+
content: [v, (u = v.children) == null || (d = u.below) == null ? void 0 : d.call(u)]
|
|
65
|
+
});
|
|
66
|
+
} else console.error("未知节点");
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}, g = {
|
|
70
|
+
name: "FormRow",
|
|
71
|
+
props: {
|
|
72
|
+
isLabel: Boolean,
|
|
73
|
+
alignCenter: Boolean
|
|
74
|
+
},
|
|
75
|
+
setup(r, { slots: i }) {
|
|
76
|
+
let a = u(t, null), o = u(e, null);
|
|
77
|
+
return () => {
|
|
78
|
+
var e;
|
|
79
|
+
let t = (e = i.default) == null ? void 0 : e.call(i), s = [];
|
|
80
|
+
return s.push(...h(t, { columnSize: (o == null ? void 0 : o.value) ?? 0 })), ((o == null ? void 0 : o.value) ?? 0) < s.length && (a == null || a(s.length)), l("tr", null, [s.map(({ tag: e, type: t, colspan: i, rowspan: a, content: o }) => e === "td" || t === "FormCell" ? o : t === "text" ? l(n, {
|
|
81
|
+
isLabel: r.isLabel,
|
|
82
|
+
alignCenter: r.alignCenter,
|
|
83
|
+
colspan: i
|
|
84
|
+
}, p(o) ? o : { default: () => [o] }) : l("td", {
|
|
85
|
+
class: t,
|
|
86
|
+
colspan: i,
|
|
87
|
+
rowspan: a
|
|
88
|
+
}, [o]))]);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { g as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getDictLabel as e } from "../helper/dictionary.mjs";
|
|
2
|
+
import { computed as t, createVNode as n, ref as r, watchEffect as i } from "vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/components/table/DictRender.vue
|
|
5
|
+
var a = {
|
|
6
|
+
name: "DictRender",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
props: {
|
|
9
|
+
row: Object,
|
|
10
|
+
column: Object,
|
|
11
|
+
dictType: String,
|
|
12
|
+
options: Array,
|
|
13
|
+
treeDict: Boolean,
|
|
14
|
+
idAsValue: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
labelAsValue: Boolean
|
|
19
|
+
},
|
|
20
|
+
setup(a, { attrs: o }) {
|
|
21
|
+
let s = r(null), c = t(() => a.row[a.column.property]);
|
|
22
|
+
return i(async () => {
|
|
23
|
+
if (a.dictType) s.value = await e(a.dictType, c.value, !0, {
|
|
24
|
+
options: !0,
|
|
25
|
+
treeDict: a.treeDict,
|
|
26
|
+
idAsValue: a.idAsValue,
|
|
27
|
+
labelAsValue: a.labelAsValue
|
|
28
|
+
});
|
|
29
|
+
else {
|
|
30
|
+
var t;
|
|
31
|
+
s.value = ((t = a.options) == null || (t = t.find((e) => `${e.modelValue}` == `${e.value}`)) == null ? void 0 : t.label) ?? `${c.value}`;
|
|
32
|
+
}
|
|
33
|
+
}), () => n("span", o, [s.value]);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { a as t };
|