@dinert/element-plus 1.1.22 → 1.1.24
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/dist/element-plus.umd.js +2 -2
- package/dist/element-plus.umd.js.map +1 -1
- package/es/packages/components/form/src/cascader.mjs +19 -9
- package/es/packages/components/form/src/cascader.mjs.map +1 -1
- package/es/packages/components/form/src/checkbox.mjs.map +1 -1
- package/es/packages/components/form/src/date.mjs +22 -16
- package/es/packages/components/form/src/date.mjs.map +1 -1
- package/es/packages/components/form/src/index.mjs +156 -141
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/src/input-autocomplete.mjs +12 -6
- package/es/packages/components/form/src/input-autocomplete.mjs.map +1 -1
- package/es/packages/components/form/src/input-number.mjs +12 -6
- package/es/packages/components/form/src/input-number.mjs.map +1 -1
- package/es/packages/components/form/src/input.mjs +12 -6
- package/es/packages/components/form/src/input.mjs.map +1 -1
- package/es/packages/components/form/src/rate.mjs +12 -6
- package/es/packages/components/form/src/rate.mjs.map +1 -1
- package/es/packages/components/form/src/select-v2.mjs +11 -6
- package/es/packages/components/form/src/select-v2.mjs.map +1 -1
- package/es/packages/components/form/src/select.mjs +13 -9
- package/es/packages/components/form/src/select.mjs.map +1 -1
- package/es/packages/components/form/src/switch.mjs +12 -6
- package/es/packages/components/form/src/switch.mjs.map +1 -1
- package/es/packages/components/form/src/tree-select.mjs +12 -7
- package/es/packages/components/form/src/tree-select.mjs.map +1 -1
- package/es/packages/components/form/utils/index.mjs +28 -17
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/packages/components/table/src/index.mjs +100 -89
- package/es/packages/components/table/src/index.mjs.map +1 -1
- package/es/packages/components/table/src/recuve-table-column.mjs +96 -98
- package/es/packages/components/table/src/recuve-table-column.mjs.map +1 -1
- package/es/packages/index.mjs.map +1 -1
- package/es/packages/utils/tools.mjs +13 -12
- package/es/packages/utils/tools.mjs.map +1 -1
- package/es/src/components/form/index.d.ts +3 -1
- package/es/src/components/form/src/cascader.d.ts +1 -0
- package/es/src/components/form/src/checkbox.d.ts +1 -1
- package/es/src/components/form/src/date.d.ts +1 -0
- package/es/src/components/form/src/index.d.ts +3 -1
- package/es/src/components/form/src/input-autocomplete.d.ts +1 -0
- package/es/src/components/form/src/input-number.d.ts +1 -0
- package/es/src/components/form/src/input.d.ts +1 -0
- package/es/src/components/form/src/rate.d.ts +1 -0
- package/es/src/components/form/src/select-v2.d.ts +1 -0
- package/es/src/components/form/src/select.d.ts +1 -0
- package/es/src/components/form/src/switch.d.ts +1 -0
- package/es/src/components/form/src/tree-select.d.ts +1 -0
- package/es/src/components/form/types/index.d.ts +8 -1
- package/es/src/components/form/utils/index.d.ts +1 -0
- package/es/src/components/table/types/index.d.ts +2 -0
- package/es/src/components/table-page/index.d.ts +6 -2
- package/es/src/components/table-page/src/index.d.ts +6 -2
- package/es/src/index.d.ts +6 -6
- package/es/src/utils/tools.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/src/components/form/index.d.ts +3 -1
- package/lib/src/components/form/src/cascader.d.ts +1 -0
- package/lib/src/components/form/src/checkbox.d.ts +1 -1
- package/lib/src/components/form/src/date.d.ts +1 -0
- package/lib/src/components/form/src/index.d.ts +3 -1
- package/lib/src/components/form/src/input-autocomplete.d.ts +1 -0
- package/lib/src/components/form/src/input-number.d.ts +1 -0
- package/lib/src/components/form/src/input.d.ts +1 -0
- package/lib/src/components/form/src/rate.d.ts +1 -0
- package/lib/src/components/form/src/select-v2.d.ts +1 -0
- package/lib/src/components/form/src/select.d.ts +1 -0
- package/lib/src/components/form/src/switch.d.ts +1 -0
- package/lib/src/components/form/src/tree-select.d.ts +1 -0
- package/lib/src/components/form/types/index.d.ts +8 -1
- package/lib/src/components/form/utils/index.d.ts +1 -0
- package/lib/src/components/table/types/index.d.ts +2 -0
- package/lib/src/components/table-page/index.d.ts +6 -2
- package/lib/src/components/table-page/src/index.d.ts +6 -2
- package/lib/src/index.d.ts +6 -6
- package/lib/src/utils/tools.d.ts +1 -0
- package/package.json +7 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as r, ref as s, computed as n, createVNode as o, resolveComponent as p, mergeProps as a } from "vue";
|
|
2
|
+
const d = /* @__PURE__ */ r({
|
|
3
3
|
name: "dinert-cascader",
|
|
4
4
|
props: {
|
|
5
5
|
form: {
|
|
@@ -12,30 +12,40 @@ const p = /* @__PURE__ */ t({
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
setup(e) {
|
|
15
|
+
const t = s(null);
|
|
15
16
|
return {
|
|
16
|
-
options:
|
|
17
|
+
options: n(() => e.formItem.options || {
|
|
17
18
|
options: [],
|
|
18
19
|
props: {
|
|
19
20
|
children: "children",
|
|
20
21
|
value: "value",
|
|
21
|
-
label: "label"
|
|
22
|
+
label: "label",
|
|
23
|
+
expandTrigger: "hover"
|
|
22
24
|
}
|
|
23
|
-
})
|
|
25
|
+
}),
|
|
26
|
+
cascaderRef: t
|
|
24
27
|
};
|
|
25
28
|
},
|
|
26
29
|
render() {
|
|
27
|
-
return o("div", null, [o(
|
|
30
|
+
return o("div", null, [o(p("el-cascader"), a({
|
|
28
31
|
modelValue: this.form.model[this.formItem.key],
|
|
29
32
|
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e,
|
|
30
33
|
clearable: !0
|
|
31
34
|
}, {
|
|
32
|
-
...this.options
|
|
35
|
+
...this.options,
|
|
36
|
+
props: {
|
|
37
|
+
expandTrigger: "hover",
|
|
38
|
+
...this.options.props
|
|
39
|
+
}
|
|
33
40
|
}, {
|
|
34
|
-
key: this.formItem.key
|
|
41
|
+
key: this.formItem.key,
|
|
42
|
+
ref: (e) => {
|
|
43
|
+
this.cascaderRef = e;
|
|
44
|
+
}
|
|
35
45
|
}), this.$slots)]);
|
|
36
46
|
}
|
|
37
47
|
});
|
|
38
48
|
export {
|
|
39
|
-
|
|
49
|
+
d as default
|
|
40
50
|
};
|
|
41
51
|
//# sourceMappingURL=cascader.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader.mjs","sources":["../../../../../packages/components/form/src/cascader.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\nexport default defineComponent({\n name: 'dinert-cascader',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['cascader']>(() => {\n const options = props.formItem.options || {\n options: [],\n props: {\n children: 'children',\n value: 'value',\n label: 'label',\n }\n }\n return options\n })\n\n return {\n options\n }\n },\n render() {\n return (\n <div>\n <el-cascader\n v-model={this.form.model[this.formItem.key]}\n clearable\n {...{\n ...this.options,\n }}\n v-slots={this.$slots}\n key={this.formItem.key}\n >\n </el-cascader>\n </div>\n )\n }\n})\n\n"],"names":["defineComponent","name","props","form","type","Object","default","formItem","setup","options","computed","children","value","label","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","$slots"],"mappings":";AAKA,MAAeA,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNH,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAMN,GAAO;
|
|
1
|
+
{"version":3,"file":"cascader.mjs","sources":["../../../../../packages/components/form/src/cascader.tsx"],"sourcesContent":["import {computed, defineComponent, ref} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\nexport default defineComponent({\n name: 'dinert-cascader',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const cascaderRef = ref(null)\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['cascader']>(() => {\n const options = props.formItem.options || {\n options: [],\n props: {\n children: 'children',\n value: 'value',\n label: 'label',\n expandTrigger: 'hover'\n }\n }\n return options\n })\n\n return {\n options,\n cascaderRef\n }\n },\n render() {\n return (\n <div>\n <el-cascader\n v-model={this.form.model[this.formItem.key]}\n clearable\n {...{\n ...this.options,\n props: {\n expandTrigger: 'hover',\n ...this.options.props\n }\n }}\n v-slots={this.$slots}\n key={this.formItem.key}\n ref={el => {this.cascaderRef = el}}\n >\n </el-cascader>\n </div>\n )\n }\n})\n\n"],"names":["defineComponent","name","props","form","type","Object","default","formItem","setup","cascaderRef","ref","options","computed","children","value","label","expandTrigger","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","el","$slots"],"mappings":";AAKA,MAAeA,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNH,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAMN,GAAO;AAET,UAAMO,IAAcC,EAAI,IAAI;AAc5B,WAAO;AAAA,MACHC,SAdYC,EAAqE,MACjEV,EAAMK,SAASI,WAAW;AAAA,QACtCA,SAAS,CAAE;AAAA,QACXT,OAAO;AAAA,UACHW,UAAU;AAAA,UACVC,OAAO;AAAA,UACPC,OAAO;AAAA,UACPC,eAAe;AAAA,QACnB;AAAA,OAGP;AAAA,MAIGP,aAAAA;AAAAA;EAEP;AAAA,EACDQ,SAAS;AACL,WAAAC,EAAAA,OAAAA,MAAAA,CAAAA,EAAAC,kBAAAC,EAAA;AAAA,MAAA,YAGqB,KAAKjB,KAAKkB,MAAM,KAAKd,SAASe,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKpB,KAAKkB,MAAM,KAAKd,SAASe,GAAG,IAACC;AAAAA,MAAA,WAAA;AAAA,IAAA,GAAA;AAAA,MAGvC,GAAG,KAAKZ;AAAAA,MACRT,OAAO;AAAA,QACHc,eAAe;AAAA,QACf,GAAG,KAAKL,QAAQT;AAAAA,MACpB;AAAA,IAAC,GAAA;AAAA,MAAA,KAGA,KAAKK,SAASe;AAAAA,MAAG,KACjBE,CAAAA,MAAM;AAAC,aAAKf,cAAce;AAAAA,MAAE;AAAA,IAFxB,CAAA,GAAA,KAAKC,MAAM,CAAA,CAAA;AAAA,EAOpC;AACJ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","sources":["../../../../../packages/components/form/src/checkbox.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","sources":["../../../../../packages/components/form/src/checkbox.tsx"],"sourcesContent":["import {computed, defineComponent, PropType} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\nexport default defineComponent({\n name: 'dinert-checkbox',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['checkbox']>(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n }\n },\n render() {\n const options = this.options.options || []\n return (\n <el-checkbox-group v-model={this.form.model[this.formItem.key]}>\n {\n options.map(item => {\n if (this.formItem.type === 'checkbox-button') {\n return (<el-checkbox-button\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox-button>)\n }\n\n return (<el-checkbox\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox>)\n })\n }\n </el-checkbox-group>\n\n )\n }\n})\n\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","formItem","setup","options","computed","render","_slot","_createVNode","_resolveComponent","model","key","$event","map","item","_mergeProps","value","label","$slots"],"mappings":";AAAuD,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAIvD,MAAeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNF,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AAOT,WAAO;AAAA,MACHM,SANYC,EAAqE,MACjEP,EAAMI,SAASE,WAAW,CAAA,CAE7C;AAAA;EAKJ;AAAA,EACDE,SAAS;AAAA,QAAAC;AACL,UAAMH,IAAU,KAAKA,QAAQA,WAAW,CAAA;AACxC,WAAAI,EAAAC,EAAA,mBAAA,GAAA;AAAA,MAAA,YACgC,KAAKV,KAAKW,MAAM,KAAKR,SAASS,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKb,KAAKW,MAAM,KAAKR,SAASS,GAAG,IAACC;AAAAA,IAAAvB,GAAAA,EAAAkB,IAEtDH,EAAQS,IAAIC,CAAAA,MACJ,KAAKZ,SAASF,SAAS,oBACvBQ,EAAAC,EAAAM,oBAAAA,GAAAA,EACQD,GAAI;AAAA,MAAA,OAEDA,EAAK,KAAKV,QAAQY,SAAS,OAAO;AAAA,IAAC,CAAA,GAAA;AAAA,MAAAf,SAAAA,MAEzCa,CAAAA,EAAK,KAAKV,QAAQa,SAAS,OAAO,CAAC;AAAA,MAAA,GAH3B,KAAKC;AAAAA,IAAM,CAAA,IAO5BV,EAAAC,EAAAM,aAAAA,GAAAA,EACQD,GAAI;AAAA,MAAA,OAEDA,EAAK,KAAKV,QAAQY,SAAS,OAAO;AAAA,IAAC,CAAA,GAAA;AAAA,MAAAf,SAAAA,MAEzCa,CAAAA,EAAK,KAAKV,QAAQa,SAAS,OAAO,CAAC;AAAA,MAAA,GAH3B,KAAKC;AAAAA,IAAM,CAAA,CAK3B,CAAC,IAAAX,IAAA;AAAA,MAAAN,SAAAA,MAAA,CAAAM,CAAA;AAAA,IAAA,CAAA;AAAA,EAKlB;AACJ,CAAC;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as i, computed as
|
|
2
|
-
import { Calendar as
|
|
3
|
-
import { customPlaceholder as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
return ["week"].includes(
|
|
7
|
-
},
|
|
1
|
+
import { defineComponent as i, ref as a, computed as l, createVNode as m, resolveComponent as d, mergeProps as u } from "vue";
|
|
2
|
+
import { Calendar as p } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
3
|
+
import { customPlaceholder as n } from "../utils/index.mjs";
|
|
4
|
+
const s = (e, r) => {
|
|
5
|
+
const o = r.type;
|
|
6
|
+
return ["week"].includes(o) ? "周" : ["month", "monthrange"].includes(o) ? "月份" : ["year", "yearrange"].includes(o) ? "年份" : "时间";
|
|
7
|
+
}, f = (e) => ["datetime", "datetimerange"].includes(e.type) ? "YYYY-MM-DD HH:mm:ss" : e.type === "year" ? "YYYY" : ["month", "monthrange"].includes(e.type) ? "YYYY-MM" : ["date", "daterange", "dates"].includes(e.type) ? "YYYY-MM-DD" : "", y = /* @__PURE__ */ i({
|
|
8
8
|
name: "dinert-date",
|
|
9
9
|
props: {
|
|
10
10
|
form: {
|
|
@@ -17,28 +17,34 @@ const n = (e, o) => {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(e) {
|
|
20
|
+
const r = a(null);
|
|
20
21
|
return {
|
|
21
|
-
options:
|
|
22
|
+
options: l(() => {
|
|
22
23
|
const t = e.formItem.options || {};
|
|
23
24
|
return t.type = e.formItem.type, t.defaultTime = t.defaultTime || (["datetimerange"].includes(t.type) ? [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)] : t.defaultTime), t;
|
|
24
|
-
})
|
|
25
|
+
}),
|
|
26
|
+
dateRef: r
|
|
25
27
|
};
|
|
26
28
|
},
|
|
27
29
|
render() {
|
|
28
|
-
return
|
|
30
|
+
return m(d("el-date-picker"), u({
|
|
29
31
|
modelValue: this.form.model[this.formItem.key],
|
|
30
32
|
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e,
|
|
31
|
-
prefixIcon:
|
|
33
|
+
prefixIcon: p,
|
|
32
34
|
clearable: !0,
|
|
33
|
-
startPlaceholder:
|
|
34
|
-
endPlaceholder:
|
|
35
|
+
startPlaceholder: n(s(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "开始"),
|
|
36
|
+
endPlaceholder: n(s(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "结束"),
|
|
35
37
|
"unlink-panels": !0,
|
|
36
|
-
valueFormat:
|
|
38
|
+
valueFormat: f(this.options),
|
|
37
39
|
format: this.options.type === "week" ? "YYYY第ww周" : this.options.format
|
|
38
|
-
}, this.options
|
|
40
|
+
}, this.options, {
|
|
41
|
+
ref: (e) => {
|
|
42
|
+
this.dateRef = e;
|
|
43
|
+
}
|
|
44
|
+
}), this.$slots);
|
|
39
45
|
}
|
|
40
46
|
});
|
|
41
47
|
export {
|
|
42
|
-
|
|
48
|
+
y as default
|
|
43
49
|
};
|
|
44
50
|
//# sourceMappingURL=date.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nconst datePickerPlaceholder = (_label: string, item: any) => {\n const type = item.type\n if (['week'].includes(type)) {\n return '周'\n } else if (['month', 'monthrange'].includes(type)) {\n return '月份'\n } else if (['year', 'yearrange'].includes(type)) {\n return '年份'\n }\n return '时间'\n}\n\nconst customValuFormat = (options: any): string => {\n if (['datetime', 'datetimerange'].includes(options.type)) {\n return 'YYYY-MM-DD HH:mm:ss'\n } else if (options.type === 'year') {\n return 'YYYY'\n } else if (['month', 'monthrange'].includes(options.type)) {\n return 'YYYY-MM'\n } else if (['date', 'daterange', 'dates'].includes(options.type)) {\n return 'YYYY-MM-DD'\n }\n return ''\n}\nexport default defineComponent({\n name: 'dinert-date',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['date']>(() => {\n const options = props.formItem.options || {}\n options.type = props.formItem.type\n options.defaultTime = options.defaultTime || (['datetimerange'].includes(options.type) ? [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)] : options.defaultTime)\n return options\n })\n\n return {\n options\n }\n },\n render() {\n\n return (\n <el-date-picker\n v-model={this.form.model[this.formItem.key]}\n prefixIcon={Calendar}\n clearable\n startPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '开始')}\n endPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '结束')}\n unlink-panels={true}\n valueFormat={customValuFormat(this.options)}\n format={this.options.type === 'week' ? 'YYYY第ww周' : this.options.format}\n {...this.options}\n v-slots={this.$slots}\n >\n </el-date-picker>\n )\n }\n})\n\n"],"names":["datePickerPlaceholder","_label","item","type","includes","customValuFormat","options","defineComponent","name","props","form","Object","default","formItem","setup","computed","defaultTime","Date","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","Calendar","customPlaceholder","label","format","$slots"],"mappings":";;;AASA,MAAMA,IAAwBA,CAACC,GAAgBC,MAAc;AACzD,QAAMC,IAAOD,EAAKC;AAClB,SAAI,CAAC,MAAM,EAAEC,SAASD,CAAI,IACf,MACA,CAAC,SAAS,YAAY,EAAEC,SAASD,CAAI,IACrC,OACA,CAAC,QAAQ,WAAW,EAAEC,SAASD,CAAI,IACnC,OAEJ;AACX,GAEME,IAAoBC,CAAAA,MAClB,CAAC,YAAY,eAAe,EAAEF,SAASE,EAAQH,IAAI,IAC5C,wBACAG,EAAQH,SAAS,SACjB,SACA,CAAC,SAAS,YAAY,EAAEC,SAASE,EAAQH,IAAI,IAC7C,YACA,CAAC,QAAQ,aAAa,OAAO,EAAEC,SAASE,EAAQH,IAAI,IACpD,eAEJ,IAEII,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFP,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNV,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;
|
|
1
|
+
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent, ref} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nconst datePickerPlaceholder = (_label: string, item: any) => {\n const type = item.type\n if (['week'].includes(type)) {\n return '周'\n } else if (['month', 'monthrange'].includes(type)) {\n return '月份'\n } else if (['year', 'yearrange'].includes(type)) {\n return '年份'\n }\n return '时间'\n}\n\nconst customValuFormat = (options: any): string => {\n if (['datetime', 'datetimerange'].includes(options.type)) {\n return 'YYYY-MM-DD HH:mm:ss'\n } else if (options.type === 'year') {\n return 'YYYY'\n } else if (['month', 'monthrange'].includes(options.type)) {\n return 'YYYY-MM'\n } else if (['date', 'daterange', 'dates'].includes(options.type)) {\n return 'YYYY-MM-DD'\n }\n return ''\n}\nexport default defineComponent({\n name: 'dinert-date',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n const dateRef = ref(null)\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['date']>(() => {\n const options = props.formItem.options || {}\n options.type = props.formItem.type\n options.defaultTime = options.defaultTime || (['datetimerange'].includes(options.type) ? [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)] : options.defaultTime)\n return options\n })\n\n\n return {\n options,\n dateRef\n }\n },\n render() {\n\n return (\n <el-date-picker\n v-model={this.form.model[this.formItem.key]}\n prefixIcon={Calendar}\n clearable\n startPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '开始')}\n endPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '结束')}\n unlink-panels={true}\n valueFormat={customValuFormat(this.options)}\n format={this.options.type === 'week' ? 'YYYY第ww周' : this.options.format}\n {...this.options}\n v-slots={this.$slots}\n ref={el => {this.dateRef = el}}\n >\n </el-date-picker>\n )\n }\n})\n\n"],"names":["datePickerPlaceholder","_label","item","type","includes","customValuFormat","options","defineComponent","name","props","form","Object","default","formItem","setup","dateRef","ref","computed","defaultTime","Date","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","Calendar","customPlaceholder","label","format","el","$slots"],"mappings":";;;AASA,MAAMA,IAAwBA,CAACC,GAAgBC,MAAc;AACzD,QAAMC,IAAOD,EAAKC;AAClB,SAAI,CAAC,MAAM,EAAEC,SAASD,CAAI,IACf,MACA,CAAC,SAAS,YAAY,EAAEC,SAASD,CAAI,IACrC,OACA,CAAC,QAAQ,WAAW,EAAEC,SAASD,CAAI,IACnC,OAEJ;AACX,GAEME,IAAoBC,CAAAA,MAClB,CAAC,YAAY,eAAe,EAAEF,SAASE,EAAQH,IAAI,IAC5C,wBACAG,EAAQH,SAAS,SACjB,SACA,CAAC,SAAS,YAAY,EAAEC,SAASE,EAAQH,IAAI,IAC7C,YACA,CAAC,QAAQ,aAAa,OAAO,EAAEC,SAASE,EAAQH,IAAI,IACpD,eAEJ,IAEII,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFP,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNV,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AACT,UAAMM,IAAUC,EAAI,IAAI;AASxB,WAAO;AAAA,MACHV,SATYW,EAAiE,MAAM;AACnF,cAAMX,IAAUG,EAAMI,SAASP,WAAW,CAAA;AAC1CA,eAAAA,EAAQH,OAAOM,EAAMI,SAASV,MAC9BG,EAAQY,cAAcZ,EAAQY,gBAAgB,CAAC,eAAe,EAAEd,SAASE,EAAQH,IAAI,IAAI,CAAC,IAAIgB,KAAK,KAAM,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,IAAIA,KAAK,KAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,IAAIb,EAAQY,cAC9JZ;AAAAA,MACX,CAAC;AAAA,MAKGS,SAAAA;AAAAA;EAEP;AAAA,EACDK,SAAS;AAEL,WAAAC,EAAAC,EAAA,gBAAA,GAAAC,EAAA;AAAA,MAAA,YAEiB,KAAKb,KAAKc,MAAM,KAAKX,SAASY,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKhB,KAAKc,MAAM,KAAKX,SAASY,GAAG,IAACC;AAAAA,MAAA,YAC/BC;AAAAA,MAAQ,WAAA;AAAA,MAAA,kBAEFC,EAAkB5B,EAAsB,OAAO,KAAKM,QAAQuB,SAAU,aAAa,KAAKvB,QAAQuB,MAAM,KAAKnB,KAAKc,KAAK,IAAI,KAAKlB,QAAQuB,OAAO,KAAKvB,OAAO,GAAG,SAAS,IAAI;AAAA,MAAC,gBAC5KsB,EAAkB5B,EAAsB,OAAO,KAAKM,QAAQuB,SAAU,aAAa,KAAKvB,QAAQuB,MAAM,KAAKnB,KAAKc,KAAK,IAAI,KAAKlB,QAAQuB,OAAO,KAAKvB,OAAO,GAAG,SAAS,IAAI;AAAA,MAAC,iBAC3K;AAAA,MAAI,aACND,EAAiB,KAAKC,OAAO;AAAA,MAAC,QACnC,KAAKA,QAAQH,SAAS,SAAS,aAAa,KAAKG,QAAQwB;AAAAA,OAC7D,KAAKxB,SAAO;AAAA,MAAA,KAEXyB,CAAAA,MAAM;AAAC,aAAKhB,UAAUgB;AAAAA,MAAE;AAAA,KADpB,GAAA,KAAKC,MAAM;AAAA,EAKhC;AACJ,CAAC;"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { customPlaceholder as
|
|
16
|
-
import { getUuid as
|
|
17
|
-
import { ArrowUp as
|
|
1
|
+
import { defineComponent as R, toRefs as C, ref as b, onBeforeUpdate as F, computed as I, createVNode as r, resolveComponent as n, mergeProps as c, Fragment as T, isVNode as L, nextTick as x } from "vue";
|
|
2
|
+
import S from "./input.mjs";
|
|
3
|
+
import U from "./input-number.mjs";
|
|
4
|
+
import _ from "./input-autocomplete.mjs";
|
|
5
|
+
import A from "./select.mjs";
|
|
6
|
+
import B from "./select-v2.mjs";
|
|
7
|
+
import q from "./switch.mjs";
|
|
8
|
+
import $ from "./date.mjs";
|
|
9
|
+
import M from "./radio.mjs";
|
|
10
|
+
import j from "./tree-select.mjs";
|
|
11
|
+
import D from "./rate.mjs";
|
|
12
|
+
import E from "./checkbox.mjs";
|
|
13
|
+
import V from "./cascader.mjs";
|
|
14
|
+
import O from "../../../hooks/useWindowResize.mjs";
|
|
15
|
+
import { customPlaceholder as v, labelMouseEnter as N, getTooltipValue as z, valueMouseEnter as H, formItemSlot as g, renderSlot as p } from "../utils/index.mjs";
|
|
16
|
+
import { getUuid as P, dataTransformRod as W } from "../../../utils/tools.mjs";
|
|
17
|
+
import { ArrowUp as G, ArrowDown as J } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
18
18
|
import "../../../assets/scss/dinert-form.scss.mjs";
|
|
19
|
-
function
|
|
20
|
-
return typeof
|
|
19
|
+
function K(a) {
|
|
20
|
+
return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !L(a);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const me = /* @__PURE__ */ R({
|
|
23
23
|
name: "dinert-form",
|
|
24
24
|
props: {
|
|
25
25
|
form: {
|
|
@@ -32,45 +32,51 @@ const we = /* @__PURE__ */ $({
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
emits: ["UnFold", "SearchFn", "ResetFn"],
|
|
35
|
-
setup(
|
|
35
|
+
setup(a, {
|
|
36
36
|
emit: e
|
|
37
37
|
}) {
|
|
38
38
|
const {
|
|
39
39
|
form: u
|
|
40
|
-
} =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
} = C(a), l = b(u.value.packUp === void 0), i = b(!1), h = b(), m = b({}), o = (f, d) => {
|
|
41
|
+
m.value[f] = d;
|
|
42
|
+
}, t = b("form_" + P());
|
|
43
|
+
F(() => {
|
|
44
|
+
m.value = {};
|
|
45
|
+
});
|
|
46
|
+
const k = I(() => {
|
|
47
|
+
const f = [];
|
|
48
|
+
return Object.keys(u.value.formItem).forEach((d) => {
|
|
49
|
+
const y = u.value.formItem[d];
|
|
50
|
+
f.push({
|
|
51
|
+
...y,
|
|
52
|
+
key: d
|
|
53
|
+
});
|
|
54
|
+
}), f.sort((d, y) => (d.sort || 1 / 0) - (y.sort || 1 / 0)), f;
|
|
55
|
+
}), w = () => {
|
|
56
|
+
let f = document.querySelectorAll(`.${t.value} .el-form-left > div`);
|
|
57
|
+
f[0] && (i.value = !1, x(() => {
|
|
58
|
+
const d = f[0].getBoundingClientRect().top, y = f[f.length - 1].getBoundingClientRect().top;
|
|
59
|
+
d !== y ? i.value = !0 : (l.value || (l.value = !0), i.value = !1), f = null;
|
|
56
60
|
}));
|
|
57
61
|
};
|
|
58
|
-
return
|
|
59
|
-
|
|
62
|
+
return O(() => {
|
|
63
|
+
w();
|
|
60
64
|
}, 100, !0), {
|
|
61
|
-
formItemMap:
|
|
65
|
+
formItemMap: k,
|
|
66
|
+
formClass: t,
|
|
67
|
+
formTypeRef: m,
|
|
68
|
+
formRef: h,
|
|
69
|
+
packUp: l,
|
|
70
|
+
isArrow: i,
|
|
71
|
+
setFormTypeRefs: o,
|
|
62
72
|
unfold: () => {
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
formClass: b,
|
|
66
|
-
formRef: i,
|
|
67
|
-
packUp: t,
|
|
68
|
-
isArrow: a
|
|
73
|
+
l.value ? l.value = !1 : l.value = !0, e("UnFold", l.value);
|
|
74
|
+
}
|
|
69
75
|
};
|
|
70
76
|
},
|
|
71
77
|
render() {
|
|
72
|
-
let
|
|
73
|
-
return
|
|
78
|
+
let a;
|
|
79
|
+
return r(n("el-form"), c({
|
|
74
80
|
inline: !0
|
|
75
81
|
}, this.form, {
|
|
76
82
|
ref: (e) => {
|
|
@@ -78,26 +84,26 @@ const we = /* @__PURE__ */ $({
|
|
|
78
84
|
},
|
|
79
85
|
class: [this.formClass, this.packUp ? "" : "packUp", "dinert-form"]
|
|
80
86
|
}), {
|
|
81
|
-
default: () => [
|
|
87
|
+
default: () => [r(n("el-row"), c(this.form.row, {
|
|
82
88
|
class: "el-form-left"
|
|
83
|
-
}),
|
|
89
|
+
}), K(a = this.formItemMap.map((e) => {
|
|
84
90
|
const u = {};
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
if (
|
|
89
|
-
placeholder:
|
|
91
|
+
let l = typeof e.vif == "function" ? e.vif(this.form.model) : e.vif;
|
|
92
|
+
l = l === void 0 && typeof this.form.vif == "function" ? this.form.vif(this.form.model) : l, l = l === void 0 ? !0 : l;
|
|
93
|
+
let i = typeof e.show == "function" ? e.show(this.form.model) : e.show;
|
|
94
|
+
if (i = i === void 0 ? !0 : i, e.options = {
|
|
95
|
+
placeholder: v(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type),
|
|
90
96
|
...e.options
|
|
91
|
-
},
|
|
97
|
+
}, i || (u.display = "none"), l) {
|
|
92
98
|
e.required = e.required === void 0 ? e.required || this.form.required : e.required, e.showLabel = e.showLabel === void 0 ? e.showLabel || this.form.showLabel : e.showLabel;
|
|
93
|
-
let
|
|
94
|
-
|
|
99
|
+
let h = e.rules || [];
|
|
100
|
+
h = e.required ? [{
|
|
95
101
|
required: !0,
|
|
96
102
|
trigger: ["blur", "change"],
|
|
97
|
-
message:
|
|
98
|
-
}].concat(
|
|
99
|
-
const
|
|
100
|
-
return
|
|
103
|
+
message: v(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type)
|
|
104
|
+
}].concat(h) : h, h = e.showLabel ? [] : h;
|
|
105
|
+
const m = e.showLabel ? !0 : e.tempValueDisabled;
|
|
106
|
+
return r(n("el-col"), c({
|
|
101
107
|
style: u,
|
|
102
108
|
class: [e.type, e.key],
|
|
103
109
|
key: e.key
|
|
@@ -110,100 +116,103 @@ const we = /* @__PURE__ */ $({
|
|
|
110
116
|
...this.form.colLayout,
|
|
111
117
|
...e.colLayout
|
|
112
118
|
}), {
|
|
113
|
-
default: () => [
|
|
119
|
+
default: () => [r(n("el-form-item"), c({
|
|
114
120
|
key: e.key,
|
|
115
121
|
prop: e.key,
|
|
116
122
|
class: [e.labelWrap ? "label-wrap" : "", e.showLabel || this.form.showLabel ? "show-label" : ""]
|
|
117
123
|
}, {
|
|
118
124
|
...e,
|
|
119
125
|
label: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
120
|
-
rules:
|
|
126
|
+
rules: h
|
|
121
127
|
}), {
|
|
122
|
-
label: () =>
|
|
128
|
+
label: () => r(n("dinert-tooltip"), {
|
|
123
129
|
key: e.key,
|
|
124
130
|
content: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
125
131
|
disabled: e.labelDisabled,
|
|
126
|
-
onLabelMouseEnter: (
|
|
132
|
+
onLabelMouseEnter: (o) => N(o, e, this)
|
|
127
133
|
}, null),
|
|
128
|
-
default: () =>
|
|
134
|
+
default: () => r(n("dinert-tooltip"), {
|
|
129
135
|
key: e.key,
|
|
130
|
-
content: String(
|
|
131
|
-
disabled:
|
|
136
|
+
content: String(z(this.form.model[e.key], e)),
|
|
137
|
+
disabled: m,
|
|
132
138
|
item: e,
|
|
133
|
-
onLabelMouseEnter: (
|
|
139
|
+
onLabelMouseEnter: (o) => H(o, e, this.form.model[e.key], this)
|
|
134
140
|
}, {
|
|
141
|
+
// eslint-disable-next-line max-statements
|
|
135
142
|
default: () => {
|
|
136
|
-
var
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
if (this.$slots[
|
|
140
|
-
|
|
143
|
+
var k, w;
|
|
144
|
+
const o = {};
|
|
145
|
+
let t = r("span", null, [W(this.form.model[e.key])]);
|
|
146
|
+
if (this.$slots[g(e.key)])
|
|
147
|
+
t = (w = (k = this.$slots)[g(e.key)]) == null ? void 0 : w.call(k, {
|
|
141
148
|
...e,
|
|
142
149
|
model: this.form.model
|
|
143
150
|
});
|
|
144
151
|
else {
|
|
145
152
|
if (e.showLabel || this.form.showLabel && [!0, void 0].includes(e.showLabel))
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
153
|
+
return t;
|
|
154
|
+
["input", "textarea"].includes(e.type) ? (p(["prefix", "suffix", "prepend", "append"], this, o, e), t = r(S, {
|
|
155
|
+
form: this.form,
|
|
156
|
+
formItem: e,
|
|
157
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
158
|
+
}, o)) : ["input-number"].includes(e.type) ? (p(["decrease-icon", "increase-icon"], this, o, e), t = r(U, {
|
|
159
|
+
form: this.form,
|
|
160
|
+
formItem: e,
|
|
161
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
162
|
+
}, o)) : ["input-autocomplete"].includes(e.type) ? (p(["prefix", "suffix", "prepend", "append", "loading"], this, o, e), t = r(_, {
|
|
163
|
+
form: this.form,
|
|
164
|
+
formItem: e,
|
|
165
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
166
|
+
}, o)) : ["select"].includes(e.type) ? (p(["header", "footer", "prefix", "empty", "tag", "loading", "label"], this, o, e), t = r(A, {
|
|
167
|
+
form: this.form,
|
|
168
|
+
formItem: e,
|
|
169
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
170
|
+
}, o)) : ["select-v2"].includes(e.type) ? (p(["header", "footer", "prefix", "empty", "tag", "loading", "label"], this, o, e), t = r(B, {
|
|
171
|
+
form: this.form,
|
|
172
|
+
formItem: e,
|
|
173
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
174
|
+
}, o)) : ["switch"].includes(e.type) ? (p(["active-action", "inactive-action"], this, o, e), t = r(q, {
|
|
175
|
+
form: this.form,
|
|
176
|
+
formItem: e,
|
|
177
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
178
|
+
}, o)) : ["datetime", "date", "dates", "week", "month", "year", "years", "datetimerange", "daterange", "monthrange", "yearrange"].includes(e.type) ? (p(["range-separator", "prev-month", "next-month", "prev-year", "next-year"], this, o, e), t = r($, {
|
|
179
|
+
form: this.form,
|
|
180
|
+
formItem: e,
|
|
181
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
182
|
+
}, o)) : ["radio", "radio-button"].includes(e.type) ? t = r(M, {
|
|
183
|
+
form: this.form,
|
|
184
|
+
formItem: e,
|
|
185
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
186
|
+
}, o) : ["tree-select"].includes(e.type) ? (p(["header", "footer", "prefix", "empty", "tag", "loading", "label"], this, o, e), t = r(j, {
|
|
187
|
+
form: this.form,
|
|
188
|
+
formItem: e,
|
|
189
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
190
|
+
}, o)) : ["rate"].includes(e.type) ? t = r(D, {
|
|
191
|
+
form: this.form,
|
|
192
|
+
formItem: e,
|
|
193
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
194
|
+
}, o) : ["checkbox", "checkbox-button"].includes(e.type) ? t = r(E, {
|
|
195
|
+
form: this.form,
|
|
196
|
+
formItem: e,
|
|
197
|
+
ref: (s) => this.setFormTypeRefs(e.key, s)
|
|
198
|
+
}, o) : ["cascader"].includes(e.type) && (p(["empty"], this, o, e), t = r(V, {
|
|
199
|
+
ref: (s) => this.setFormTypeRefs(e.key, s),
|
|
200
|
+
form: this.form,
|
|
201
|
+
formItem: e
|
|
202
|
+
}, o));
|
|
194
203
|
}
|
|
195
|
-
return
|
|
204
|
+
return t;
|
|
196
205
|
},
|
|
197
206
|
defaultAfter: () => {
|
|
198
|
-
var
|
|
199
|
-
return (
|
|
207
|
+
var o, t;
|
|
208
|
+
return (t = (o = this.$slots)[g("after_" + e.key)]) == null ? void 0 : t.call(o, {
|
|
200
209
|
...e,
|
|
201
210
|
model: this.form.model
|
|
202
211
|
});
|
|
203
212
|
},
|
|
204
213
|
defaultBefore: () => {
|
|
205
|
-
var
|
|
206
|
-
return (
|
|
214
|
+
var o, t;
|
|
215
|
+
return (t = (o = this.$slots)[g("before_" + e.key)]) == null ? void 0 : t.call(o, {
|
|
207
216
|
...e,
|
|
208
217
|
model: this.form.model
|
|
209
218
|
});
|
|
@@ -212,33 +221,39 @@ const we = /* @__PURE__ */ $({
|
|
|
212
221
|
})]
|
|
213
222
|
});
|
|
214
223
|
}
|
|
215
|
-
})) ?
|
|
216
|
-
default: () => [
|
|
217
|
-
}), this.search &&
|
|
224
|
+
})) ? a : {
|
|
225
|
+
default: () => [a]
|
|
226
|
+
}), this.search && r(n("el-row"), {
|
|
218
227
|
class: ["el-form-right", this.isArrow ? "isArrow" : ""]
|
|
219
228
|
}, {
|
|
220
229
|
default: () => {
|
|
221
230
|
var e, u;
|
|
222
|
-
return [this.isArrow &&
|
|
231
|
+
return [this.isArrow && r(n("el-button"), {
|
|
223
232
|
class: "el-form-right-operation",
|
|
224
233
|
text: !0,
|
|
225
234
|
type: "primary",
|
|
226
235
|
onClick: this.unfold
|
|
227
236
|
}, {
|
|
228
|
-
default: () => [
|
|
229
|
-
default: () => [this.packUp ?
|
|
237
|
+
default: () => [r(n("el-icon"), null, {
|
|
238
|
+
default: () => [this.packUp ? r(G, null, null) : r(J, null, null)]
|
|
230
239
|
}), this.packUp ? "收起" : "展开"]
|
|
231
|
-
}), ((u = (e = this.$slots).form_search) == null ? void 0 : u.call(e)) ||
|
|
240
|
+
}), ((u = (e = this.$slots).form_search) == null ? void 0 : u.call(e)) || r(T, null, [r(n("el-button"), c({
|
|
232
241
|
type: "primary",
|
|
233
242
|
onClick: () => this.$emit("SearchFn")
|
|
234
|
-
}, {
|
|
235
|
-
default: () =>
|
|
236
|
-
|
|
243
|
+
}, this.form.searchButton), {
|
|
244
|
+
default: () => {
|
|
245
|
+
var l;
|
|
246
|
+
return [((l = this.form.searchButton) == null ? void 0 : l.message) || "搜索"];
|
|
247
|
+
}
|
|
248
|
+
}), r(n("el-button"), c({
|
|
237
249
|
type: "primary",
|
|
238
250
|
plain: !0,
|
|
239
251
|
onClick: () => this.$emit("ResetFn")
|
|
240
|
-
}, {
|
|
241
|
-
default: () =>
|
|
252
|
+
}, this.form.resetButton), {
|
|
253
|
+
default: () => {
|
|
254
|
+
var l;
|
|
255
|
+
return [((l = this.form.searchButton) == null ? void 0 : l.message) || "重置"];
|
|
256
|
+
}
|
|
242
257
|
})])];
|
|
243
258
|
}
|
|
244
259
|
})]
|
|
@@ -246,6 +261,6 @@ const we = /* @__PURE__ */ $({
|
|
|
246
261
|
}
|
|
247
262
|
});
|
|
248
263
|
export {
|
|
249
|
-
|
|
264
|
+
me as default
|
|
250
265
|
};
|
|
251
266
|
//# sourceMappingURL=index.mjs.map
|