@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40
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 -0
- package/chunks/B1MSrc6f.mjs +8 -0
- package/chunks/B3ajWLh3.mjs +198 -0
- package/chunks/BH_JJ8Xh.mjs +106 -0
- package/chunks/BWBHzD5N.mjs +89 -0
- package/chunks/Bd1UFJic.mjs +660 -0
- package/chunks/Bm5eiSmT.mjs +79 -0
- package/chunks/BsCS7SB5.mjs +141 -0
- package/chunks/BufIRDd0.mjs +185 -0
- package/chunks/C1AgOUe_.mjs +172 -0
- package/chunks/C3Uo82-I.mjs +35 -0
- package/chunks/C9dGL28n.mjs +56 -0
- package/chunks/CFOGMFgo.mjs +150 -0
- package/chunks/CLPSCSsy.mjs +603 -0
- package/chunks/CSyJ-vEx.mjs +17 -0
- package/chunks/CTKmEf2M.mjs +93 -0
- package/chunks/CWfUPCtS.mjs +1360 -0
- package/chunks/CXvGoZKJ.mjs +198 -0
- package/chunks/Cab-ZjRx.mjs +164 -0
- package/chunks/ChmDDqoZ2.mjs +478 -0
- package/chunks/Cj59E77g.mjs +230 -0
- package/chunks/CqTcEefA.mjs +93 -0
- package/chunks/Ct5bDJ50.mjs +38 -0
- package/chunks/CuG2Q-PM.mjs +100 -0
- package/chunks/D8UVq1t1.mjs +176 -0
- package/chunks/DDmQcNm6.mjs +93 -0
- package/chunks/DF9fJMQS.mjs +105 -0
- package/chunks/DJe97Fgi.mjs +107 -0
- package/chunks/DXYgAmil.mjs +317 -0
- package/chunks/DhtHh0jk.mjs +87 -0
- package/chunks/DiJyms_r.mjs +100 -0
- package/chunks/Ds_Tpa_M.mjs +83 -0
- package/chunks/TvNHGVAP.mjs +25 -0
- package/chunks/XCGWTz41.mjs +25 -0
- package/chunks/XqRTtFfp.mjs +166 -0
- package/chunks/cmuHpsX6.mjs +109 -0
- package/chunks/o6VhYAN52.mjs +207 -0
- package/chunks/pdwFQpA8.mjs +57 -0
- package/chunks/taicx2sd.mjs +25 -0
- package/confirm-button/index.d.ts +113 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +84 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +53 -0
- package/constants/index.mjs +4 -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/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 +114 -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-check-box-group/index.d.ts +289 -18
- package/form-check-box-group/index.mjs +1 -1
- package/form-check-box-group/style.css +1 -0
- package/form-checkbox/index.d.ts +236 -16
- package/form-checkbox/index.mjs +1 -1
- 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-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.d.ts +52 -36
- package/index.mjs +54 -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/resize-observer/index.d.ts +8 -0
- package/resize-observer/index.mjs +40 -0
- package/resize-observer/style.css +1 -0
- package/resolver/index.mjs +29 -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 +85 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +340 -1
- package/table-view/index.mjs +453 -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 +227 -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/input/style.css +0 -1
- package/resolver.mjs +0 -79
- package/utils/style.css +0 -1
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
package/api/index.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface DictItem {
|
|
2
|
+
id: string;
|
|
3
|
+
dictId: string;
|
|
4
|
+
label: string;
|
|
5
|
+
dictType: string;
|
|
6
|
+
description: string;
|
|
7
|
+
sortOrder: number;
|
|
8
|
+
createBy: string;
|
|
9
|
+
updateBy: string;
|
|
10
|
+
createTime: string;
|
|
11
|
+
updateTime: string;
|
|
12
|
+
remarks: null;
|
|
13
|
+
delFlag: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ConfigOptions {
|
|
17
|
+
privilege?: {
|
|
18
|
+
processButtons?: (buttons: Array<string | Record<string, string>>) => Array<string | Record<string, boolean>>;
|
|
19
|
+
hasAuthority?: (privilege: string) => boolean;
|
|
20
|
+
};
|
|
21
|
+
dict?: {
|
|
22
|
+
getDictTreeByType?: (type: string, options: {
|
|
23
|
+
idAsValue?: boolean;
|
|
24
|
+
labelAsValue?: boolean;
|
|
25
|
+
}) => Promise<{
|
|
26
|
+
data: {
|
|
27
|
+
data: DictItem[];
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
remote?: (type: string) => Promise<{
|
|
31
|
+
data: {
|
|
32
|
+
data: DictItem[];
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
tableView?: {
|
|
37
|
+
reload?: () => void;
|
|
38
|
+
};
|
|
39
|
+
toolbar?: {
|
|
40
|
+
goBack?: (path: string) => void;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
|
|
44
|
+
export declare const hasAuthority: (str: string) => boolean | undefined;
|
|
45
|
+
export declare const goBack: (path: string) => void | undefined;
|
|
46
|
+
export declare const reloadTable: () => void | undefined;
|
|
47
|
+
export declare const getDictTreeByType: (type: string, options: {
|
|
48
|
+
idAsValue?: boolean;
|
|
49
|
+
labelAsValue?: boolean;
|
|
50
|
+
}) => Promise<{
|
|
51
|
+
data: {
|
|
52
|
+
data: DictItem[];
|
|
53
|
+
};
|
|
54
|
+
}> | undefined;
|
|
55
|
+
export declare const remote: (type: string) => Promise<{
|
|
56
|
+
data: {
|
|
57
|
+
data: DictItem[];
|
|
58
|
+
};
|
|
59
|
+
}> | undefined;
|
|
60
|
+
export declare const config: (options: ConfigOptions) => void;
|
package/api/index.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { isObject as e, isString as t } from "@web-utils/core";
|
|
2
|
+
import { mergeWith as n } from "@web-utils/integrations/lodash";
|
|
3
|
+
//#region src/api/index.ts
|
|
4
|
+
var r = { privilege: {
|
|
5
|
+
processButtons(n) {
|
|
6
|
+
return n.map((n) => {
|
|
7
|
+
if (e(n)) {
|
|
8
|
+
let e = n, r = {};
|
|
9
|
+
for (let n in e) t(e[n]) && (r[n] = a(e[n]) ?? !0);
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
return n;
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
hasAuthority(e) {
|
|
16
|
+
return !0;
|
|
17
|
+
}
|
|
18
|
+
} }, i = (e) => {
|
|
19
|
+
var t, n;
|
|
20
|
+
return (t = r.privilege) == null || (n = t.processButtons) == null ? void 0 : n.call(t, e);
|
|
21
|
+
}, a = (e) => {
|
|
22
|
+
var t, n;
|
|
23
|
+
return (t = r.privilege) == null || (n = t.hasAuthority) == null ? void 0 : n.call(t, e);
|
|
24
|
+
}, o = (e) => {
|
|
25
|
+
var t, n;
|
|
26
|
+
return (t = r.toolbar) == null || (n = t.goBack) == null ? void 0 : n.call(t, e);
|
|
27
|
+
}, s = () => {
|
|
28
|
+
var e, t;
|
|
29
|
+
return (e = r.tableView) == null || (t = e.reload) == null ? void 0 : t.call(e);
|
|
30
|
+
}, c = (e, t) => {
|
|
31
|
+
var n, i;
|
|
32
|
+
return (n = r.dict) == null || (i = n.getDictTreeByType) == null ? void 0 : i.call(n, e, t);
|
|
33
|
+
}, l = (e) => {
|
|
34
|
+
var t, n;
|
|
35
|
+
return (t = r.dict) == null || (n = t.remote) == null ? void 0 : n.call(t, e);
|
|
36
|
+
}, u = (e) => {
|
|
37
|
+
n(r, e, (e, t) => {
|
|
38
|
+
if (typeof t == "function") return t;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { u as config, c as getDictTreeByType, o as goBack, a as hasAuthority, i as processButtons, s as reloadTable, l as remote };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
type: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
size: StringConstructor;
|
|
7
|
+
icon: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
nativeType: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
loading: BooleanConstructor;
|
|
16
|
+
disabled: BooleanConstructor;
|
|
17
|
+
plain: BooleanConstructor;
|
|
18
|
+
autofocus: BooleanConstructor;
|
|
19
|
+
round: BooleanConstructor;
|
|
20
|
+
text: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
27
|
+
type: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
size: StringConstructor;
|
|
32
|
+
icon: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
nativeType: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
loading: BooleanConstructor;
|
|
41
|
+
disabled: BooleanConstructor;
|
|
42
|
+
plain: BooleanConstructor;
|
|
43
|
+
autofocus: BooleanConstructor;
|
|
44
|
+
round: BooleanConstructor;
|
|
45
|
+
text: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
}>> & Readonly<{}>, {
|
|
50
|
+
loading: boolean;
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
plain: boolean;
|
|
53
|
+
autofocus: boolean;
|
|
54
|
+
round: boolean;
|
|
55
|
+
type: string;
|
|
56
|
+
icon: string;
|
|
57
|
+
nativeType: string;
|
|
58
|
+
text: string;
|
|
59
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isFunction as e } from "@web-utils/core";
|
|
2
|
+
import { h as t, ref as n, resolveComponent as r } from "vue";
|
|
3
|
+
//#region src/components/button/AwesomeButton.vue
|
|
4
|
+
var i = {
|
|
5
|
+
name: "AwesomeButton",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
props: {
|
|
8
|
+
type: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "primary"
|
|
11
|
+
},
|
|
12
|
+
size: String,
|
|
13
|
+
icon: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
nativeType: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "button"
|
|
20
|
+
},
|
|
21
|
+
loading: Boolean,
|
|
22
|
+
disabled: Boolean,
|
|
23
|
+
plain: Boolean,
|
|
24
|
+
autofocus: Boolean,
|
|
25
|
+
round: Boolean,
|
|
26
|
+
text: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(i, { attrs: a, slots: o }) {
|
|
32
|
+
let s = r("ElButton"), { text: c, ...l } = i, { onClick: u, ...d } = a, f = n(!1), p = async (t) => {
|
|
33
|
+
if (f.value = !0, e(u)) try {
|
|
34
|
+
await u(t);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error(e);
|
|
37
|
+
}
|
|
38
|
+
f.value = !1;
|
|
39
|
+
};
|
|
40
|
+
return () => t(s, {
|
|
41
|
+
...d,
|
|
42
|
+
...l,
|
|
43
|
+
disabled: f.value,
|
|
44
|
+
onClick: p
|
|
45
|
+
}, { default: o.default || (() => c) });
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { i as default };
|
package/base.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--el-disabled-text-color:#606266;--border-color:#d7dae0}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { useDictionary as i } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
|
|
5
|
+
import { computed as l, createVNode as u, mergeProps as d } from "vue";
|
|
6
|
+
import { cloneDeep as f } from "@web-utils/integrations/lodash";
|
|
7
|
+
import { ElCascader as p } from "element-plus/es";
|
|
8
|
+
//#region src/components/form/props/cascader.ts
|
|
9
|
+
var m = {
|
|
10
|
+
...n,
|
|
11
|
+
...r,
|
|
12
|
+
modelValue: [
|
|
13
|
+
String,
|
|
14
|
+
Number,
|
|
15
|
+
Array
|
|
16
|
+
],
|
|
17
|
+
options: Array,
|
|
18
|
+
props: Object,
|
|
19
|
+
size: String,
|
|
20
|
+
placeholder: String,
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
clearable: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
clearIcon: [String, Object],
|
|
30
|
+
showAllLevels: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
collapseTags: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
collapseTagsTooltip: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
maxCollapseTagsTooltipHeight: [String, Number],
|
|
43
|
+
separator: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "/"
|
|
46
|
+
},
|
|
47
|
+
filterable: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
filterMethod: Function,
|
|
52
|
+
debounce: {
|
|
53
|
+
type: Number,
|
|
54
|
+
default: 300
|
|
55
|
+
},
|
|
56
|
+
beforeFilter: Function,
|
|
57
|
+
popperClass: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: ""
|
|
60
|
+
},
|
|
61
|
+
popperStyle: [String, Object],
|
|
62
|
+
teleported: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
effect: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "light"
|
|
69
|
+
},
|
|
70
|
+
tagType: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "info"
|
|
73
|
+
},
|
|
74
|
+
tagEffect: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "light"
|
|
77
|
+
},
|
|
78
|
+
validateEvent: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: !0
|
|
81
|
+
},
|
|
82
|
+
maxCollapseTags: {
|
|
83
|
+
type: Number,
|
|
84
|
+
default: 1
|
|
85
|
+
},
|
|
86
|
+
emptyValues: Array,
|
|
87
|
+
valueOnClear: [
|
|
88
|
+
String,
|
|
89
|
+
Number,
|
|
90
|
+
Boolean,
|
|
91
|
+
Function
|
|
92
|
+
],
|
|
93
|
+
persistent: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !0
|
|
96
|
+
},
|
|
97
|
+
fallbackPlacements: {
|
|
98
|
+
type: Array,
|
|
99
|
+
default: () => [
|
|
100
|
+
"bottom-start",
|
|
101
|
+
"top-start",
|
|
102
|
+
"right",
|
|
103
|
+
"left"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
placement: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "bottom-start"
|
|
109
|
+
},
|
|
110
|
+
popperAppendToBody: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !0
|
|
113
|
+
},
|
|
114
|
+
showCheckedStrategy: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: "child"
|
|
117
|
+
},
|
|
118
|
+
readonly: Boolean,
|
|
119
|
+
last: Boolean,
|
|
120
|
+
checkStrictly: Boolean,
|
|
121
|
+
labelKey: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: "label"
|
|
124
|
+
},
|
|
125
|
+
valueKey: {
|
|
126
|
+
type: String,
|
|
127
|
+
default: "value"
|
|
128
|
+
},
|
|
129
|
+
emitPath: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: !0
|
|
132
|
+
},
|
|
133
|
+
join: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: !0
|
|
136
|
+
},
|
|
137
|
+
idAsValue: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !0
|
|
140
|
+
},
|
|
141
|
+
labelAsValue: Boolean,
|
|
142
|
+
treeDict: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: !0
|
|
145
|
+
},
|
|
146
|
+
dictType: String
|
|
147
|
+
}, h = {
|
|
148
|
+
modelValue: !0,
|
|
149
|
+
readonly: !0,
|
|
150
|
+
disabled: !0,
|
|
151
|
+
props: !0
|
|
152
|
+
}, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
|
|
153
|
+
name: "FormCascader",
|
|
154
|
+
props: { ...m },
|
|
155
|
+
emits: { ...t },
|
|
156
|
+
setup(t, { emit: n, slots: r, attrs: m }) {
|
|
157
|
+
let { emitInput: h, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = e(t, {
|
|
158
|
+
emit: n,
|
|
159
|
+
slots: r,
|
|
160
|
+
attrs: m,
|
|
161
|
+
predicate: g
|
|
162
|
+
}), { dictItems: S } = i(t), C = l(() => {
|
|
163
|
+
if (t.dictType) return S.value;
|
|
164
|
+
if (t.options) {
|
|
165
|
+
let e = f(t.options);
|
|
166
|
+
return t.last && c(e), e;
|
|
167
|
+
} else return [];
|
|
168
|
+
}), w = l(() => {
|
|
169
|
+
if (t.join) return o(t.modelValue) ? t.modelValue : s(t.modelValue) ? t.modelValue.split(t.separator) : [];
|
|
170
|
+
if (t.last) {
|
|
171
|
+
let [e] = a(C.value, (e) => e[t.valueKey] === t.modelValue), n = [];
|
|
172
|
+
for (; e;) n.push(e[t.valueKey]), e = e.parent;
|
|
173
|
+
return n.reverse();
|
|
174
|
+
}
|
|
175
|
+
return t.modelValue;
|
|
176
|
+
}), T = (e) => {
|
|
177
|
+
t.join && o(e) ? h(e.join(t.separator)) : h(t.last ? e[e.length - 1] : e);
|
|
178
|
+
};
|
|
179
|
+
return () => _({ vNodes: u(p, d(b.value, x.value, {
|
|
180
|
+
style: "width: 100%",
|
|
181
|
+
class: { "is-readonly": t.readonly },
|
|
182
|
+
"model-value": w.value,
|
|
183
|
+
options: C.value,
|
|
184
|
+
props: {
|
|
185
|
+
checkStrictly: t.checkStrictly,
|
|
186
|
+
label: t.labelKey,
|
|
187
|
+
value: t.valueKey,
|
|
188
|
+
emitPath: t.emitPath,
|
|
189
|
+
expandTrigger: "hover"
|
|
190
|
+
},
|
|
191
|
+
disabled: y.value,
|
|
192
|
+
placeholder: v.value,
|
|
193
|
+
"onUpdate:modelValue": T
|
|
194
|
+
}), null) });
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
198
|
+
export { _ as t };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
|
+
import { ElSwitch as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/switch.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
modelValue: [
|
|
9
|
+
Boolean,
|
|
10
|
+
String,
|
|
11
|
+
Number
|
|
12
|
+
],
|
|
13
|
+
loading: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
width: [Number, String],
|
|
22
|
+
inlinePrompt: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
activeIcon: [String, Object],
|
|
27
|
+
inactiveIcon: [String, Object],
|
|
28
|
+
activeActionIcon: [String, Object],
|
|
29
|
+
inactiveActionIcon: [String, Object],
|
|
30
|
+
activeText: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
inactiveText: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
activeValue: {
|
|
39
|
+
type: [
|
|
40
|
+
Boolean,
|
|
41
|
+
String,
|
|
42
|
+
Number
|
|
43
|
+
],
|
|
44
|
+
default: "Y"
|
|
45
|
+
},
|
|
46
|
+
inactiveValue: {
|
|
47
|
+
type: [
|
|
48
|
+
Boolean,
|
|
49
|
+
String,
|
|
50
|
+
Number
|
|
51
|
+
],
|
|
52
|
+
default: "N"
|
|
53
|
+
},
|
|
54
|
+
name: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
validateEvent: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !0
|
|
61
|
+
},
|
|
62
|
+
beforeChange: Function,
|
|
63
|
+
id: String,
|
|
64
|
+
tabindex: [String, Number],
|
|
65
|
+
ariaLabel: String,
|
|
66
|
+
activeColor: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
inactiveColor: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ""
|
|
73
|
+
},
|
|
74
|
+
borderColor: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ""
|
|
77
|
+
}
|
|
78
|
+
}, c = {
|
|
79
|
+
disabled: !0,
|
|
80
|
+
modelValue: !0
|
|
81
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
82
|
+
name: "FormSwitch",
|
|
83
|
+
inheritAttrs: !1,
|
|
84
|
+
props: { ...s },
|
|
85
|
+
emits: { ...t },
|
|
86
|
+
setup(t, { emit: n, slots: s, attrs: c }) {
|
|
87
|
+
let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
88
|
+
emit: n,
|
|
89
|
+
attrs: c,
|
|
90
|
+
slots: s,
|
|
91
|
+
predicate: l
|
|
92
|
+
});
|
|
93
|
+
return () => d({ vNodes: r(o, i(p.value, m.value, {
|
|
94
|
+
modelValue: u.value,
|
|
95
|
+
"onUpdate:modelValue": (e) => u.value = e,
|
|
96
|
+
disabled: f.value
|
|
97
|
+
}), {
|
|
98
|
+
"active-action": s["active-action"],
|
|
99
|
+
"inactive-action": s["inactive-action"],
|
|
100
|
+
active: s.active,
|
|
101
|
+
inactive: s.inactive
|
|
102
|
+
}) });
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
//#endregion
|
|
106
|
+
export { u as t };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
|
+
import { ElCheckbox as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/checkbox.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
modelValue: [
|
|
9
|
+
String,
|
|
10
|
+
Number,
|
|
11
|
+
Boolean
|
|
12
|
+
],
|
|
13
|
+
value: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Boolean,
|
|
17
|
+
Object
|
|
18
|
+
],
|
|
19
|
+
labelValue: [
|
|
20
|
+
String,
|
|
21
|
+
Number,
|
|
22
|
+
Boolean,
|
|
23
|
+
Object
|
|
24
|
+
],
|
|
25
|
+
trueValue: {
|
|
26
|
+
type: [String, Number],
|
|
27
|
+
default: "1"
|
|
28
|
+
},
|
|
29
|
+
falseValue: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: "0"
|
|
32
|
+
},
|
|
33
|
+
border: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
size: String,
|
|
38
|
+
name: String,
|
|
39
|
+
checked: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
indeterminate: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
validateEvent: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !0
|
|
50
|
+
},
|
|
51
|
+
tabindex: [String, Number],
|
|
52
|
+
id: String,
|
|
53
|
+
ariaControls: String,
|
|
54
|
+
ariaLabel: String,
|
|
55
|
+
trueLabel: {
|
|
56
|
+
type: [String, Number],
|
|
57
|
+
default: "1"
|
|
58
|
+
},
|
|
59
|
+
falseLabel: {
|
|
60
|
+
type: [String, Number],
|
|
61
|
+
default: "0"
|
|
62
|
+
},
|
|
63
|
+
controls: String
|
|
64
|
+
}, c = {
|
|
65
|
+
modelValue: !0,
|
|
66
|
+
disabled: !0,
|
|
67
|
+
labelValue: !0
|
|
68
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
69
|
+
name: "FormCheckbox",
|
|
70
|
+
inheritAttrs: !1,
|
|
71
|
+
props: { ...s },
|
|
72
|
+
emits: { ...t },
|
|
73
|
+
setup(t, { emit: n, slots: s, attrs: c }) {
|
|
74
|
+
let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
75
|
+
emit: n,
|
|
76
|
+
slots: s,
|
|
77
|
+
attrs: c,
|
|
78
|
+
predicate: l
|
|
79
|
+
});
|
|
80
|
+
return () => d({ vNodes: r(o, i(m.value, p.value, {
|
|
81
|
+
label: t.labelValue,
|
|
82
|
+
modelValue: u.value,
|
|
83
|
+
"onUpdate:modelValue": (e) => u.value = e,
|
|
84
|
+
disabled: f.value
|
|
85
|
+
}), { default: s.default }) });
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
export { u as t };
|