@web-utils/form-ui 1.0.0-beta17 → 1.0.0-beta19

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.
Files changed (54) hide show
  1. package/chunks/{CrWDXTno.mjs → 8ORg8rrN.mjs} +2 -2
  2. package/chunks/{CqgD2b0r.mjs → B3DY36vM.mjs} +2 -2
  3. package/chunks/{Du6wl65y.mjs → B7fKv2-x.mjs} +2 -2
  4. package/chunks/{D0EeP-eB.mjs → B9-9iYg8.mjs} +4 -3
  5. package/chunks/{DsBWDK1-.mjs → BAm_wcwz.mjs} +8 -4
  6. package/chunks/{Lnj54GAG.mjs → BJObhbQz.mjs} +2 -2
  7. package/chunks/{CH_v7XkN.mjs → BSriw1Qr.mjs} +3 -3
  8. package/chunks/{uWRsKwOO.mjs → BVzpe2oN.mjs} +2 -2
  9. package/chunks/{3ItTydl6.mjs → Be_E_4G0.mjs} +18 -12
  10. package/chunks/{1BaFmq0z.mjs → Bk3PtIYo.mjs} +13 -10
  11. package/chunks/{CEWLi7G1.mjs → C1DlzLpD.mjs} +56 -56
  12. package/chunks/{DX4Wq2Fb.mjs → CJeq96R0.mjs} +2 -2
  13. package/chunks/CNtf2MHr.mjs +106 -0
  14. package/chunks/{DQDBsEel.mjs → CPE8fqJc.mjs} +3 -3
  15. package/chunks/{Do5h5GzH.mjs → D7hrSVVl.mjs} +2 -2
  16. package/chunks/{CbGBSOlX.mjs → DAS1h_Ei.mjs} +3 -3
  17. package/chunks/{f-CM5UVD.mjs → D_Xobj10.mjs} +3 -3
  18. package/chunks/{DUBc-1s4.mjs → DgCwGit4.mjs} +3 -3
  19. package/chunks/{DFuF0u2g.mjs → DgbDpRQg.mjs} +2 -2
  20. package/chunks/{CQTt0Oq1.mjs → DynLjTwi.mjs} +1 -1
  21. package/chunks/nJ1-P9vh.mjs +189 -0
  22. package/constants.d.ts +26 -10
  23. package/constants.mjs +2 -2
  24. package/form-check-box-group/index.mjs +1 -1
  25. package/form-checkbox/index.mjs +1 -1
  26. package/form-date-picker/index.d.ts +7 -7
  27. package/form-date-picker/index.mjs +1 -1
  28. package/form-holder/index.mjs +1 -1
  29. package/form-image/index.mjs +1 -1
  30. package/form-input/index.mjs +1 -1
  31. package/form-input-cron-expression/index.mjs +1 -1
  32. package/form-input-email/index.mjs +1 -1
  33. package/form-input-id-card/index.mjs +1 -1
  34. package/form-input-number/index.mjs +1 -1
  35. package/form-input-phone-number/index.mjs +1 -1
  36. package/form-item-config-provider/index.mjs +6 -6
  37. package/form-item-group/index.d.ts +91 -17
  38. package/form-item-group/index.mjs +2 -78
  39. package/form-item-group/style.css +1 -1
  40. package/form-item-x/index.mjs +1 -1
  41. package/form-radio-group/index.mjs +1 -1
  42. package/form-rate/index.mjs +1 -1
  43. package/form-row/index.mjs +1 -1
  44. package/form-select/index.mjs +1 -1
  45. package/form-slider/index.mjs +1 -1
  46. package/form-switch/index.d.ts +18 -4
  47. package/form-switch/index.mjs +1 -1
  48. package/form-text/index.d.ts +2 -0
  49. package/form-text/index.mjs +1 -1
  50. package/index.mjs +20 -20
  51. package/package.json +1 -1
  52. package/web-types.json +1 -1
  53. package/chunks/DCKxvrCR.mjs +0 -189
  54. /package/chunks/{98bTmBOR.mjs → DdDv8RSI.mjs} +0 -0
@@ -0,0 +1,189 @@
1
+ import { formHolderContextKey as e } from "../constants.mjs";
2
+ import { n as t } from "./Bh_CMUlo.mjs";
3
+ import n from "../form-advice/index.mjs";
4
+ import r from "../form-red-table/index.mjs";
5
+ import { ElForm as i, ElRow as a } from "element-plus/es";
6
+ import { computed as o, createVNode as s, inject as c, mergeProps as l, nextTick as u, provide as d, reactive as f, toRef as p, useTemplateRef as m } from "vue";
7
+ import { animate as h } from "@web-utils/core";
8
+ //#region src/components/form/props/form.js
9
+ var g = {
10
+ model: Object,
11
+ rules: Object,
12
+ inline: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ labelPosition: {
17
+ type: String,
18
+ default: "right"
19
+ },
20
+ labelWidth: {
21
+ type: [String, Number],
22
+ default: "auto"
23
+ },
24
+ labelSuffix: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ hideRequiredAsterisk: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ requireAsteriskPosition: {
33
+ type: String,
34
+ default: "left"
35
+ },
36
+ showMessage: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ inlineMessage: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ statusIcon: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ validateOnRuleChange: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ size: String,
53
+ disabled: {
54
+ type: Boolean,
55
+ default: void 0
56
+ },
57
+ scrollToError: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ scrollIntoViewOptions: [Object, Boolean],
62
+ requiredFields: Array,
63
+ disabledFields: Array,
64
+ enabledFields: Array,
65
+ showAdvice: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ columns: [Array, Object],
70
+ colCount: Number,
71
+ notTableForm: {
72
+ type: Boolean,
73
+ default: void 0
74
+ },
75
+ commentValueColspan: Number,
76
+ commentLabelColspan: Number,
77
+ wrapRow: {
78
+ type: Boolean,
79
+ default: !0
80
+ }
81
+ }, _ = {
82
+ showMessage: !0,
83
+ required: !0,
84
+ requiredFields: !0,
85
+ disabledFields: !0,
86
+ enabledFields: !0,
87
+ showAdvice: !0,
88
+ columns: !0,
89
+ colCount: !0,
90
+ notTableForm: !0,
91
+ commentValueColspan: !0,
92
+ commentLabelColspan: !0,
93
+ wrapRow: !0
94
+ }, v = ["validate"], y = (e) => _[e] !== !0, b = {
95
+ name: "FormHolder",
96
+ inheritAttrs: !1,
97
+ props: { ...g },
98
+ emits: { validate: null },
99
+ setup(g, { slots: _, expose: b, emit: x }) {
100
+ let S = t(g, {
101
+ emit: x,
102
+ events: v,
103
+ predicate: y
104
+ }), C = c("formView", null), w = m("form"), T = o(() => g.notTableForm === void 0 ? (C == null ? void 0 : C.tableForm) === void 0 ? !1 : C == null ? void 0 : C.tableForm : !g.notTableForm), E = o(() => T.value ? !1 : g.showMessage), D = o(() => {
105
+ let e = {};
106
+ return g.disabledFields && g.disabledFields.forEach((t) => {
107
+ e[t] = !0;
108
+ }), e;
109
+ }), O = o(() => {
110
+ let e = {};
111
+ return g.enabledFields && g.enabledFields.length && g.enabledFields.forEach((t) => {
112
+ e[t] = !0;
113
+ }), e;
114
+ }), k = o(() => {
115
+ let e = {};
116
+ return g.requiredFields && g.requiredFields.length && g.requiredFields.forEach((t) => {
117
+ e[t] = !0;
118
+ }), e;
119
+ }), A = o(() => g.disabled === !0 ? !0 : g.disabled), j = p(() => g.enabledFields), M = p(() => g.requiredFields), N = p(() => g.disabledFields), P = async () => {
120
+ await u();
121
+ let e = w.value.$el.querySelector(".el-form-item.is-error");
122
+ e && e.scrollIntoView({
123
+ block: "center",
124
+ inline: "center",
125
+ behavior: "smooth"
126
+ });
127
+ }, F = f({
128
+ tableForm: T,
129
+ disabled: A,
130
+ enabledFields: j,
131
+ requiredFields: M,
132
+ enabledFieldsMap: O,
133
+ disabledFieldsMap: D,
134
+ requiredFieldsMap: k,
135
+ disabledFields: N,
136
+ scrollIntoRequiredField: P,
137
+ formRef: w,
138
+ validate: async () => {
139
+ try {
140
+ return await w.value.validate();
141
+ } catch {
142
+ throw await P(), w.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
143
+ h(e, "breathe-animation");
144
+ }), Error("表单验证不通过!");
145
+ }
146
+ },
147
+ validateField: (e) => w.value.validateField(e),
148
+ resetFields: (e) => w.value.resetFields(e),
149
+ scrollToField: (e) => w.value.scrollToField(e),
150
+ clearValidate: (e) => w.value.clearValidate(e),
151
+ getField: () => w.value.getField(),
152
+ setInitialValues: (e) => w.value.setInitialValues(e),
153
+ getFields: () => w.value.fields
154
+ });
155
+ return d(e, F), b(F), () => s(i, l({
156
+ ref: "form",
157
+ class: "form-holder",
158
+ "show-message": E.value
159
+ }, S.value), { default: () => {
160
+ if (T.value) {
161
+ var e, t, i;
162
+ return [
163
+ (e = _.top) == null ? void 0 : e.call(_),
164
+ s(r, {
165
+ class: { "hide-error-message": T.value },
166
+ columns: g.columns,
167
+ "col-count": g.colCount
168
+ }, { default: () => {
169
+ var e;
170
+ return [(e = _.default) == null ? void 0 : e.call(_), g.showAdvice ? s(n, {
171
+ "label-colspan": g.commentLabelColspan,
172
+ "value-colspan": g.commentValueColspan
173
+ }, null) : null];
174
+ } }),
175
+ (t = _.bottom) == null ? void 0 : t.call(_),
176
+ s("div", { class: "red-form-footer" }, [(i = _.footer) == null ? void 0 : i.call(_)])
177
+ ];
178
+ } else {
179
+ var o;
180
+ return g.wrapRow ? s(a, null, { default: () => {
181
+ var e;
182
+ return [(e = _.default) == null ? void 0 : e.call(_)];
183
+ } }) : (o = _.default) == null ? void 0 : o.call(_);
184
+ }
185
+ } });
186
+ }
187
+ };
188
+ //#endregion
189
+ export { b as t };
package/constants.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { ComputedRef, InjectionKey, TemplateRef } from 'vue';
1
+ import { InjectionKey } from 'vue';
2
2
  export declare const formHolderContextKey: InjectionKey<{
3
- tableForm: ComputedRef;
4
- disabled: ComputedRef;
5
- enabledFields: ComputedRef;
6
- requiredFields: ComputedRef;
7
- enabledFieldsMap: ComputedRef;
8
- disabledFieldsMap: ComputedRef;
9
- requiredFieldsMap: ComputedRef;
10
- disabledFields: ComputedRef;
3
+ tableForm: boolean;
4
+ disabled: boolean;
5
+ enabledFields: string[];
6
+ requiredFields: string[];
7
+ enabledFieldsMap: Record<string, boolean | undefined>;
8
+ disabledFieldsMap: Record<string, boolean | undefined>;
9
+ requiredFieldsMap: Record<string, boolean | undefined>;
10
+ disabledFields: string[];
11
11
  scrollIntoRequiredField: () => Promise<void> | any;
12
- formRef: TemplateRef;
12
+ formRef: unknown;
13
13
  validate: () => Promise<void> | any;
14
14
  validateField: () => any;
15
15
  resetFields: () => any;
@@ -19,8 +19,24 @@ export declare const formHolderContextKey: InjectionKey<{
19
19
  setInitialValues: () => any;
20
20
  getFields: () => any;
21
21
  }>;
22
+ export declare const formItemGroupContextKey: InjectionKey<{
23
+ disabled: boolean;
24
+ enabled: boolean;
25
+ isDisabled: boolean;
26
+ size: string;
27
+ }>;
22
28
  export declare const formItemConfigProviderContextKey: InjectionKey<{
23
29
  reactive: boolean;
24
30
  block: boolean;
25
31
  wrapCol: boolean;
26
32
  }>;
33
+ export declare const formViewContextKey: unique symbol;
34
+ export declare const formEntityContextKey: unique symbol;
35
+ export declare const formItemConfigContextKey: unique symbol;
36
+ export declare const flowContextKey: unique symbol;
37
+ export declare const toolbarContextKey: unique symbol;
38
+ export declare const tableViewContextKey: unique symbol;
39
+ export declare const pageableTableContextKey: unique symbol;
40
+ export declare const columnSizeContextKey: unique symbol;
41
+ export declare const columnsContextKey: unique symbol;
42
+ export declare const setColumnSizeContextKey: unique symbol;
package/constants.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/components/constants.ts
2
- var e = Symbol("formHolder"), t = Symbol("formItemConfigProvider");
2
+ var e = Symbol("formHolder"), t = Symbol("formItemGroup"), n = Symbol("formItemConfigProvider"), r = Symbol("formView"), i = Symbol("formEntity"), a = Symbol("formItemConfig"), o = Symbol("flow"), s = Symbol("toolbar"), c = Symbol("tableView"), l = Symbol("pageableTable"), u = Symbol("columnSize"), d = Symbol("columns"), f = Symbol("setColumnSize");
3
3
  //#endregion
4
- export { e as formHolderContextKey, t as formItemConfigProviderContextKey };
4
+ export { u as columnSizeContextKey, d as columnsContextKey, o as flowContextKey, i as formEntityContextKey, e as formHolderContextKey, a as formItemConfigContextKey, n as formItemConfigProviderContextKey, t as formItemGroupContextKey, r as formViewContextKey, l as pageableTableContextKey, f as setColumnSizeContextKey, c as tableViewContextKey, s as toolbarContextKey };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CrWDXTno.mjs";
1
+ import { t as e } from "../chunks/8ORg8rrN.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/uWRsKwOO.mjs";
1
+ import { t as e } from "../chunks/BVzpe2oN.mjs";
2
2
  export { e as default };
@@ -1,7 +1,4 @@
1
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- split: BooleanConstructor;
3
- startDate: StringConstructor;
4
- endDate: StringConstructor;
5
2
  modelValue: (StringConstructor | NumberConstructor | DateConstructor | ArrayConstructor)[];
6
3
  readonly: {
7
4
  type: BooleanConstructor;
@@ -94,6 +91,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
94
91
  type: BooleanConstructor;
95
92
  default: boolean;
96
93
  };
94
+ split: BooleanConstructor;
95
+ startDate: StringConstructor;
96
+ endDate: StringConstructor;
97
97
  wrapFormItem: {
98
98
  type: BooleanConstructor;
99
99
  default: boolean;
@@ -189,9 +189,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
189
189
  'update:endDate': null;
190
190
  "update:modelValue": null;
191
191
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
192
- split: BooleanConstructor;
193
- startDate: StringConstructor;
194
- endDate: StringConstructor;
195
192
  modelValue: (StringConstructor | NumberConstructor | DateConstructor | ArrayConstructor)[];
196
193
  readonly: {
197
194
  type: BooleanConstructor;
@@ -284,6 +281,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
284
281
  type: BooleanConstructor;
285
282
  default: boolean;
286
283
  };
284
+ split: BooleanConstructor;
285
+ startDate: StringConstructor;
286
+ endDate: StringConstructor;
287
287
  wrapFormItem: {
288
288
  type: BooleanConstructor;
289
289
  default: boolean;
@@ -400,7 +400,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
400
400
  validateEvent: boolean;
401
401
  wrapFormItem: boolean;
402
402
  col: boolean;
403
- split: boolean;
404
403
  readonly: boolean;
405
404
  editable: boolean;
406
405
  clearable: boolean;
@@ -417,5 +416,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
417
416
  showConfirm: boolean;
418
417
  showWeekNumber: boolean;
419
418
  automaticDropdown: boolean;
419
+ split: boolean;
420
420
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
421
421
  export default _default;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/1BaFmq0z.mjs";
1
+ import { t as e } from "../chunks/Bk3PtIYo.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DCKxvrCR.mjs";
1
+ import { t as e } from "../chunks/nJ1-P9vh.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DFuF0u2g.mjs";
1
+ import { t as e } from "../chunks/DgbDpRQg.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DX4Wq2Fb.mjs";
1
+ import { t as e } from "../chunks/CJeq96R0.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CH_v7XkN.mjs";
1
+ import { t as e } from "../chunks/BSriw1Qr.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/f-CM5UVD.mjs";
1
+ import { t as e } from "../chunks/D_Xobj10.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CbGBSOlX.mjs";
1
+ import { t as e } from "../chunks/DAS1h_Ei.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DUBc-1s4.mjs";
1
+ import { t as e } from "../chunks/DgCwGit4.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DQDBsEel.mjs";
1
+ import { t as e } from "../chunks/CPE8fqJc.mjs";
2
2
  export { e as default };
@@ -1,5 +1,5 @@
1
1
  import { formItemConfigProviderContextKey as e } from "../constants.mjs";
2
- import { computed as t, provide as n, reactive as r } from "vue";
2
+ import { provide as t, reactive as n, toRef as r } from "vue";
3
3
  //#region src/components/form/FormItemConfigProvider.vue
4
4
  var i = {
5
5
  name: "FormItemConfigProvider",
@@ -12,12 +12,12 @@ var i = {
12
12
  }
13
13
  },
14
14
  setup(i, { expose: a, slots: o }) {
15
- let s = r({
16
- reactive: t(() => i.reactive),
17
- block: t(() => i.block),
18
- wrapCol: t(() => i.wrapCol)
15
+ let s = n({
16
+ reactive: r(() => i.reactive),
17
+ block: r(() => i.block),
18
+ wrapCol: r(() => i.wrapCol)
19
19
  });
20
- return n(e, s), a(s), () => o.default(s);
20
+ return t(e, s), a(s), () => o.default(s);
21
21
  }
22
22
  };
23
23
  //#endregion
@@ -1,18 +1,92 @@
1
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ blockTitle: StringConstructor;
3
+ size: StringConstructor;
4
+ tips: StringConstructor;
5
+ active: BooleanConstructor;
6
+ enabled: {
7
+ type: BooleanConstructor;
8
+ default: undefined;
9
+ };
10
+ disabled: {
11
+ type: BooleanConstructor;
12
+ default: undefined;
13
+ };
14
+ tag: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ span: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ };
22
+ block: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ wrapRow: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ gutter: {
31
+ type: NumberConstructor;
32
+ default: number;
33
+ };
34
+ collapse: BooleanConstructor;
35
+ showTitle: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ notDispatch: BooleanConstructor;
40
+ }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
41
+ blockTitle: StringConstructor;
42
+ size: StringConstructor;
43
+ tips: StringConstructor;
44
+ active: BooleanConstructor;
45
+ enabled: {
46
+ type: BooleanConstructor;
47
+ default: undefined;
48
+ };
49
+ disabled: {
50
+ type: BooleanConstructor;
51
+ default: undefined;
52
+ };
53
+ tag: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ span: {
58
+ type: NumberConstructor;
59
+ default: number;
60
+ };
61
+ block: {
62
+ type: BooleanConstructor;
63
+ default: boolean;
64
+ };
65
+ wrapRow: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ gutter: {
70
+ type: NumberConstructor;
71
+ default: number;
72
+ };
73
+ collapse: BooleanConstructor;
74
+ showTitle: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ notDispatch: BooleanConstructor;
79
+ }>> & Readonly<{}>, {
80
+ span: number;
81
+ tag: string;
82
+ block: boolean;
83
+ disabled: boolean;
84
+ wrapRow: boolean;
85
+ active: boolean;
86
+ collapse: boolean;
87
+ notDispatch: boolean;
88
+ enabled: boolean;
89
+ gutter: number;
90
+ showTitle: boolean;
91
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
92
  export default _default;
3
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
7
- type __VLS_TemplateResult = {
8
- attrs: Partial<{}>;
9
- slots: {
10
- title?(_: {}): any;
11
- tips?(_: {}): any;
12
- 'title-right'?(_: {}): any;
13
- default?(_: {}): any;
14
- default?(_: {}): any;
15
- };
16
- refs: {};
17
- rootEl: HTMLDivElement;
18
- };
@@ -1,78 +1,2 @@
1
- import e from "../empty-view/index.mjs";
2
- import { ElRow as t } from "element-plus/es";
3
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, normalizeClass as u, openBlock as d, provide as f, reactive as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, vShow as v, withCtx as y, withDirectives as b } from "vue";
4
- import { ElCollapseTransition as x } from "element-plus";
5
- //#region src/components/form/FormItemGroup.vue
6
- var S = {
7
- class: "flex-item",
8
- style: { flex: "1" }
9
- }, C = { style: {
10
- color: "#ff0000",
11
- "font-size": "14px"
12
- } }, w = /* @__PURE__ */ Object.assign({ name: "FormItemGroup" }, {
13
- __name: "FormItemGroup",
14
- props: {
15
- blockTitle: String,
16
- size: String,
17
- tips: String,
18
- active: Boolean,
19
- enabled: {
20
- type: Boolean,
21
- default: void 0
22
- },
23
- disabled: {
24
- type: Boolean,
25
- default: void 0
26
- },
27
- wrapRow: {
28
- type: Boolean,
29
- default: !0
30
- },
31
- gutter: {
32
- type: Number,
33
- default: 20
34
- },
35
- collapse: Boolean,
36
- showTitle: {
37
- type: Boolean,
38
- default: !0
39
- },
40
- notDispatch: Boolean
41
- },
42
- setup(w, { expose: T }) {
43
- let E = w, D = m(!0), O = r(() => E.enabled), k = r(() => E.disabled), A = r(() => E.enabled === !0 ? !1 : E.disabled === !0), j = () => D.value = !D.value, M = p({
44
- disabled: k,
45
- enabled: O,
46
- isDisabled: A
47
- });
48
- return f("formItemGroup", M), T(M), (r, f) => {
49
- let p = t, m = e;
50
- return d(), o("div", { class: u(["form-item-group", {
51
- "default-active": w.active,
52
- "is-disabled": _(A)
53
- }]) }, [b(s("div", {
54
- class: "form-item-group-title",
55
- onClick: j
56
- }, [s("span", S, [
57
- r.$slots.title || w.blockTitle ? h(r.$slots, "title", { key: 0 }, () => [c(g(w.blockTitle), 1)]) : a("v-if", !0),
58
- r.$slots.tips || w.tips ? h(r.$slots, "tips", { key: 1 }, () => [s("span", C, "(" + g(w.tips) + ")", 1)]) : a("v-if", !0),
59
- r.$slots["title-right"] ? h(r.$slots, "title-right", { key: 2 }) : a("v-if", !0)
60
- ]), s("i", { class: u(_(D) ? "el-icon-arrow-down" : "el-icon-arrow-right") }, null, 2)], 512), [[v, w.showTitle]]), l(_(x), null, {
61
- default: y(() => [b(s("div", null, [r.$slots.default ? (d(), o(n, { key: 0 }, [w.wrapRow ? (d(), i(p, {
62
- key: 0,
63
- gutter: w.gutter
64
- }, {
65
- default: y(() => [h(r.$slots, "default")]),
66
- _: 3
67
- }, 8, ["gutter"])) : h(r.$slots, "default", { key: 1 })], 64)) : (d(), i(m, {
68
- key: 1,
69
- "font-size": "14px",
70
- "empty-tips": "暂无信息"
71
- }))], 512), [[v, _(D)]])]),
72
- _: 3
73
- })], 2);
74
- };
75
- }
76
- });
77
- //#endregion
78
- export { w as default };
1
+ import { t as e } from "../chunks/CNtf2MHr.mjs";
2
+ export { e as default };
@@ -1 +1 @@
1
- .form-item-group{width:100%}.form-item-group.is-disabled .is-required .el-form-item__label:before,.form-item-group.is-disabled .required .el-form-item__label:before{display:none}.form-item-group .form-item-group-title{color:#333;height:30px;font-weight:700;font-size:var(--gloal-font-size);cursor:pointer;background-color:#f3f5fb;flex-direction:row;align-items:center;margin:0 0 10px;padding:0 10px;line-height:30px;display:flex}
1
+ .form-item-group.is-disabled .is-required .el-form-item__label:before,.form-item-group.is-disabled .required .el-form-item__label:before{display:none}.form-item-group .form-item-group-title{color:#333;height:30px;font-weight:700;font-size:var(--gloal-font-size);cursor:pointer;background-color:#f3f5fb;flex-direction:row;align-items:center;margin:0 0 10px;padding:0 10px;line-height:30px;display:flex}
@@ -1,2 +1,2 @@
1
- import { a as e } from "../chunks/CEWLi7G1.mjs";
1
+ import { a as e } from "../chunks/C1DlzLpD.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Do5h5GzH.mjs";
1
+ import { t as e } from "../chunks/D7hrSVVl.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Du6wl65y.mjs";
1
+ import { t as e } from "../chunks/B7fKv2-x.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/98bTmBOR.mjs";
1
+ import { t as e } from "../chunks/DdDv8RSI.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DsBWDK1-.mjs";
1
+ import { t as e } from "../chunks/BAm_wcwz.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Lnj54GAG.mjs";
1
+ import { t as e } from "../chunks/BJObhbQz.mjs";
2
2
  export { e as default };
@@ -25,8 +25,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
25
25
  type: StringConstructor;
26
26
  default: string;
27
27
  };
28
- activeValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
29
- inactiveValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
28
+ activeValue: {
29
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
30
+ default: boolean;
31
+ };
32
+ inactiveValue: {
33
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
34
+ default: boolean;
35
+ };
30
36
  name: {
31
37
  type: StringConstructor;
32
38
  default: string;
@@ -171,8 +177,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
171
177
  type: StringConstructor;
172
178
  default: string;
173
179
  };
174
- activeValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
175
- inactiveValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
180
+ activeValue: {
181
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
182
+ default: boolean;
183
+ };
184
+ inactiveValue: {
185
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
186
+ default: boolean;
187
+ };
176
188
  name: {
177
189
  type: StringConstructor;
178
190
  default: string;
@@ -316,6 +328,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
316
328
  inlinePrompt: boolean;
317
329
  activeText: string;
318
330
  inactiveText: string;
331
+ activeValue: string | number | boolean;
332
+ inactiveValue: string | number | boolean;
319
333
  activeColor: string;
320
334
  inactiveColor: string;
321
335
  borderColor: string;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/3ItTydl6.mjs";
1
+ import { t as e } from "../chunks/Be_E_4G0.mjs";
2
2
  export { e as default };
@@ -13,6 +13,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
13
13
  type: StringConstructor;
14
14
  default: string;
15
15
  };
16
+ text: StringConstructor;
16
17
  wrapFormItem: {
17
18
  type: BooleanConstructor;
18
19
  default: boolean;
@@ -114,6 +115,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
114
115
  type: StringConstructor;
115
116
  default: string;
116
117
  };
118
+ text: StringConstructor;
117
119
  wrapFormItem: {
118
120
  type: BooleanConstructor;
119
121
  default: boolean;