@dinert/element-plus 1.1.22 → 1.1.23

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 (78) hide show
  1. package/dist/element-plus.umd.js +2 -2
  2. package/dist/element-plus.umd.js.map +1 -1
  3. package/es/packages/components/form/src/cascader.mjs +19 -9
  4. package/es/packages/components/form/src/cascader.mjs.map +1 -1
  5. package/es/packages/components/form/src/checkbox.mjs.map +1 -1
  6. package/es/packages/components/form/src/date.mjs +22 -16
  7. package/es/packages/components/form/src/date.mjs.map +1 -1
  8. package/es/packages/components/form/src/index.mjs +156 -141
  9. package/es/packages/components/form/src/index.mjs.map +1 -1
  10. package/es/packages/components/form/src/input-autocomplete.mjs +12 -6
  11. package/es/packages/components/form/src/input-autocomplete.mjs.map +1 -1
  12. package/es/packages/components/form/src/input-number.mjs +12 -6
  13. package/es/packages/components/form/src/input-number.mjs.map +1 -1
  14. package/es/packages/components/form/src/input.mjs +12 -6
  15. package/es/packages/components/form/src/input.mjs.map +1 -1
  16. package/es/packages/components/form/src/rate.mjs +12 -6
  17. package/es/packages/components/form/src/rate.mjs.map +1 -1
  18. package/es/packages/components/form/src/select-v2.mjs +11 -6
  19. package/es/packages/components/form/src/select-v2.mjs.map +1 -1
  20. package/es/packages/components/form/src/select.mjs +13 -9
  21. package/es/packages/components/form/src/select.mjs.map +1 -1
  22. package/es/packages/components/form/src/switch.mjs +12 -6
  23. package/es/packages/components/form/src/switch.mjs.map +1 -1
  24. package/es/packages/components/form/src/tree-select.mjs +12 -7
  25. package/es/packages/components/form/src/tree-select.mjs.map +1 -1
  26. package/es/packages/components/form/utils/index.mjs +28 -17
  27. package/es/packages/components/form/utils/index.mjs.map +1 -1
  28. package/es/packages/components/table/src/index.mjs +100 -89
  29. package/es/packages/components/table/src/index.mjs.map +1 -1
  30. package/es/packages/components/table/src/recuve-table-column.mjs +104 -106
  31. package/es/packages/components/table/src/recuve-table-column.mjs.map +1 -1
  32. package/es/packages/index.mjs.map +1 -1
  33. package/es/packages/utils/tools.mjs +13 -12
  34. package/es/packages/utils/tools.mjs.map +1 -1
  35. package/es/src/components/form/index.d.ts +3 -1
  36. package/es/src/components/form/src/cascader.d.ts +1 -0
  37. package/es/src/components/form/src/checkbox.d.ts +1 -1
  38. package/es/src/components/form/src/date.d.ts +1 -0
  39. package/es/src/components/form/src/index.d.ts +3 -1
  40. package/es/src/components/form/src/input-autocomplete.d.ts +1 -0
  41. package/es/src/components/form/src/input-number.d.ts +1 -0
  42. package/es/src/components/form/src/input.d.ts +1 -0
  43. package/es/src/components/form/src/rate.d.ts +1 -0
  44. package/es/src/components/form/src/select-v2.d.ts +1 -0
  45. package/es/src/components/form/src/select.d.ts +1 -0
  46. package/es/src/components/form/src/switch.d.ts +1 -0
  47. package/es/src/components/form/src/tree-select.d.ts +1 -0
  48. package/es/src/components/form/types/index.d.ts +8 -1
  49. package/es/src/components/form/utils/index.d.ts +1 -0
  50. package/es/src/components/table/types/index.d.ts +2 -0
  51. package/es/src/components/table-page/index.d.ts +6 -2
  52. package/es/src/components/table-page/src/index.d.ts +6 -2
  53. package/es/src/index.d.ts +6 -6
  54. package/es/src/utils/tools.d.ts +1 -0
  55. package/es/style.css +1 -1
  56. package/lib/index.js +2 -2
  57. package/lib/index.js.map +1 -1
  58. package/lib/src/components/form/index.d.ts +3 -1
  59. package/lib/src/components/form/src/cascader.d.ts +1 -0
  60. package/lib/src/components/form/src/checkbox.d.ts +1 -1
  61. package/lib/src/components/form/src/date.d.ts +1 -0
  62. package/lib/src/components/form/src/index.d.ts +3 -1
  63. package/lib/src/components/form/src/input-autocomplete.d.ts +1 -0
  64. package/lib/src/components/form/src/input-number.d.ts +1 -0
  65. package/lib/src/components/form/src/input.d.ts +1 -0
  66. package/lib/src/components/form/src/rate.d.ts +1 -0
  67. package/lib/src/components/form/src/select-v2.d.ts +1 -0
  68. package/lib/src/components/form/src/select.d.ts +1 -0
  69. package/lib/src/components/form/src/switch.d.ts +1 -0
  70. package/lib/src/components/form/src/tree-select.d.ts +1 -0
  71. package/lib/src/components/form/types/index.d.ts +8 -1
  72. package/lib/src/components/form/utils/index.d.ts +1 -0
  73. package/lib/src/components/table/types/index.d.ts +2 -0
  74. package/lib/src/components/table-page/index.d.ts +6 -2
  75. package/lib/src/components/table-page/src/index.d.ts +6 -2
  76. package/lib/src/index.d.ts +6 -6
  77. package/lib/src/utils/tools.d.ts +1 -0
  78. package/package.json +7 -2
@@ -1,5 +1,5 @@
1
- import { defineComponent as t, computed as r, createVNode as o, resolveComponent as s, mergeProps as m } from "vue";
2
- const p = /* @__PURE__ */ t({
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: r(() => e.formItem.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(s("el-cascader"), m({
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
- p as default
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;AAaT,WAAO;AAAA,MACHO,SAbYC,EAAqE,MACjER,EAAMK,SAASE,WAAW;AAAA,QACtCA,SAAS,CAAE;AAAA,QACXP,OAAO;AAAA,UACHS,UAAU;AAAA,UACVC,OAAO;AAAA,UACPC,OAAO;AAAA,QACX;AAAA,OAGP;AAAA;EAKJ;AAAA,EACDC,SAAS;AACL,WAAAC,EAAAA,OAAAA,MAAAA,CAAAA,EAAAC,kBAAAC,EAAA;AAAA,MAAA,YAGqB,KAAKd,KAAKe,MAAM,KAAKX,SAASY,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKjB,KAAKe,MAAM,KAAKX,SAASY,GAAG,IAACC;AAAAA,MAAA,WAAA;AAAA,IAAA,GAAA;AAAA,MAGvC,GAAG,KAAKX;AAAAA,IAAO,GAAA;AAAA,MAAA,KAGd,KAAKF,SAASY;AAAAA,IADV,CAAA,GAAA,KAAKE,MAAM,CAAA,CAAA;AAAA,EAMpC;AACJ,CAAC;"}
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'\nimport type {PropType} from 'vue'\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":";AAA6C,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAK7C,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
+ {"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 s, createVNode as a, resolveComponent as l, mergeProps as m } from "vue";
2
- import { Calendar as d } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
3
- import { customPlaceholder as r } from "../utils/index.mjs";
4
- const n = (e, o) => {
5
- const t = o.type;
6
- return ["week"].includes(t) ? "周" : ["month", "monthrange"].includes(t) ? "月份" : ["year", "yearrange"].includes(t) ? "年份" : "时间";
7
- }, p = (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" : "", h = /* @__PURE__ */ i({
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: s(() => {
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 a(l("el-date-picker"), m({
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: d,
33
+ prefixIcon: p,
32
34
  clearable: !0,
33
- startPlaceholder: r(n(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "开始"),
34
- endPlaceholder: r(n(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "结束"),
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: p(this.options),
38
+ valueFormat: f(this.options),
37
39
  format: this.options.type === "week" ? "YYYY第ww周" : this.options.format
38
- }, this.options), this.$slots);
40
+ }, this.options, {
41
+ ref: (e) => {
42
+ this.dateRef = e;
43
+ }
44
+ }), this.$slots);
39
45
  }
40
46
  });
41
47
  export {
42
- h as default
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;AAST,WAAO;AAAA,MACHH,SARYS,EAAiE,MAAM;AACnF,cAAMT,IAAUG,EAAMI,SAASP,WAAW,CAAA;AAC1CA,eAAAA,EAAQH,OAAOM,EAAMI,SAASV,MAC9BG,EAAQU,cAAcV,EAAQU,gBAAgB,CAAC,eAAe,EAAEZ,SAASE,EAAQH,IAAI,IAAI,CAAC,IAAIc,KAAK,KAAM,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,IAAIA,KAAK,KAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,IAAIX,EAAQU,cAC9JV;AAAAA,MACX,CAAC;AAAA;EAKJ;AAAA,EACDY,SAAS;AAEL,WAAAC,EAAAC,EAAA,gBAAA,GAAAC,EAAA;AAAA,MAAA,YAEiB,KAAKX,KAAKY,MAAM,KAAKT,SAASU,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKd,KAAKY,MAAM,KAAKT,SAASU,GAAG,IAACC;AAAAA,MAAA,YAC/BC;AAAAA,MAAQ,WAAA;AAAA,MAAA,kBAEFC,EAAkB1B,EAAsB,OAAO,KAAKM,QAAQqB,SAAU,aAAa,KAAKrB,QAAQqB,MAAM,KAAKjB,KAAKY,KAAK,IAAI,KAAKhB,QAAQqB,OAAO,KAAKrB,OAAO,GAAG,SAAS,IAAI;AAAA,MAAC,gBAC5KoB,EAAkB1B,EAAsB,OAAO,KAAKM,QAAQqB,SAAU,aAAa,KAAKrB,QAAQqB,MAAM,KAAKjB,KAAKY,KAAK,IAAI,KAAKhB,QAAQqB,OAAO,KAAKrB,OAAO,GAAG,SAAS,IAAI;AAAA,MAAC,iBAC3K;AAAA,MAAI,aACND,EAAiB,KAAKC,OAAO;AAAA,MAAC,QACnC,KAAKA,QAAQH,SAAS,SAAS,aAAa,KAAKG,QAAQsB;AAAAA,IAAM,GACnE,KAAKtB,OAAO,GACP,KAAKuB,MAAM;AAAA,EAIhC;AACJ,CAAC;"}
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 $, toRefs as F, ref as k, computed as U, createVNode as o, resolveComponent as n, mergeProps as w, Fragment as x, createTextVNode as L, isVNode as A, nextTick as q } from "vue";
2
- import V from "./input.mjs";
3
- import D from "./input-number.mjs";
4
- import T from "./input-autocomplete.mjs";
5
- import E from "./select.mjs";
6
- import M from "./select-v2.mjs";
7
- import j from "./switch.mjs";
8
- import B from "./date.mjs";
9
- import N from "./radio.mjs";
10
- import O from "./tree-select.mjs";
11
- import z from "./rate.mjs";
12
- import H from "./checkbox.mjs";
13
- import P from "./cascader.mjs";
14
- import W from "../../../hooks/useWindowResize.mjs";
15
- import { customPlaceholder as S, labelMouseEnter as G, getTooltipValue as J, valueMouseEnter as K, formItemSlot as m } from "../utils/index.mjs";
16
- import { getUuid as Q, dataTransformRod as X } from "../../../utils/tools.mjs";
17
- import { ArrowUp as Y, ArrowDown as Z } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
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 ee(f) {
20
- return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !A(f);
19
+ function K(a) {
20
+ return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !L(a);
21
21
  }
22
- const we = /* @__PURE__ */ $({
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(f, {
35
+ setup(a, {
36
36
  emit: e
37
37
  }) {
38
38
  const {
39
39
  form: u
40
- } = F(f), t = k(u.value.packUp === void 0), a = k(!1), i = k(), b = k("form_" + Q()), r = U(() => {
41
- let s = 0;
42
- const c = [];
43
- return Object.keys(u.value.formItem).forEach((p) => {
44
- const d = u.value.formItem[p];
45
- c.push({
46
- ...d,
47
- key: p,
48
- sort: typeof d.sort > "u" ? s : d.sort
49
- }), s += 10;
50
- }), c.sort((p, d) => p.sort - d.sort), c;
51
- }), l = () => {
52
- let s = document.querySelectorAll(`.${b.value} .el-form-left > div`);
53
- s[0] && (a.value = !1, q(() => {
54
- const c = s[0].getBoundingClientRect().top, p = s[s.length - 1].getBoundingClientRect().top;
55
- c !== p ? a.value = !0 : (t.value || (t.value = !0), a.value = !1), s = null;
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 W(() => {
59
- l();
62
+ return O(() => {
63
+ w();
60
64
  }, 100, !0), {
61
- formItemMap: r,
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
- t.value ? t.value = !1 : t.value = !0, e("UnFold", t.value);
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 f;
73
- return o(n("el-form"), w({
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: () => [o(n("el-row"), w(this.form.row, {
87
+ default: () => [r(n("el-row"), c(this.form.row, {
82
88
  class: "el-form-left"
83
- }), ee(f = this.formItemMap.map((e) => {
89
+ }), K(a = this.formItemMap.map((e) => {
84
90
  const u = {};
85
- let t = typeof e.vif == "function" ? e.vif(this.form.model) : e.vif;
86
- t = t === void 0 ? !0 : t;
87
- let a = typeof e.show == "function" ? e.show(this.form.model) : e.show;
88
- if (a = a === void 0 ? !0 : a, e.options = {
89
- placeholder: S(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type),
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
- }, a || (u.display = "none"), t) {
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 i = e.rules || [];
94
- i = e.required ? [{
99
+ let h = e.rules || [];
100
+ h = e.required ? [{
95
101
  required: !0,
96
102
  trigger: ["blur", "change"],
97
- message: S(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type)
98
- }].concat(i) : i, i = e.showLabel ? [] : i;
99
- const b = e.showLabel ? !0 : e.tempValueDisabled;
100
- return o(n("el-col"), w({
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: () => [o(n("el-form-item"), w({
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: i
126
+ rules: h
121
127
  }), {
122
- label: () => o(n("dinert-tooltip"), {
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: (r) => G(r, e, this)
132
+ onLabelMouseEnter: (o) => N(o, e, this)
127
133
  }, null),
128
- default: () => o(n("dinert-tooltip"), {
134
+ default: () => r(n("dinert-tooltip"), {
129
135
  key: e.key,
130
- content: String(J(this.form.model[e.key], e)),
131
- disabled: b,
136
+ content: String(z(this.form.model[e.key], e)),
137
+ disabled: m,
132
138
  item: e,
133
- onLabelMouseEnter: (r) => K(r, e, this.form.model[e.key], this)
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 C, s, c, p, d, I;
137
- const r = {};
138
- let l = o("span", null, [X(this.form.model[e.key])]);
139
- if (this.$slots[m(e.key)])
140
- l = (s = (C = this.$slots)[m(e.key)]) == null ? void 0 : s.call(C, {
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 l;
147
- if (["input", "textarea"].includes(e.type)) {
148
- const g = (p = (c = this.$slots)[m(e.key + "_append")]) == null ? void 0 : p.call(c), _ = g && g[0] && g[0].children, v = (I = (d = this.$slots)[m(e.key + "_prepend")]) == null ? void 0 : I.call(d), R = v && v[0] && v[0].children;
149
- _ && (r.append = () => {
150
- var h, y;
151
- return (y = (h = this.$slots)[m(e.key + "_append")]) == null ? void 0 : y.call(h);
152
- }), R && (r.prepend = () => {
153
- var h, y;
154
- return (y = (h = this.$slots)[m(e.key + "_prepend")]) == null ? void 0 : y.call(h);
155
- }), l = o(V, {
156
- form: this.form,
157
- formItem: e
158
- }, r);
159
- } else
160
- ["input-number"].includes(e.type) ? l = o(D, {
161
- form: this.form,
162
- formItem: e
163
- }, null) : ["input-autocomplete"].includes(e.type) ? l = o(T, {
164
- form: this.form,
165
- formItem: e
166
- }, null) : ["select"].includes(e.type) ? l = o(E, {
167
- form: this.form,
168
- formItem: e
169
- }, null) : ["select-v2"].includes(e.type) ? l = o(M, {
170
- form: this.form,
171
- formItem: e
172
- }, null) : ["switch"].includes(e.type) ? l = o(j, {
173
- form: this.form,
174
- formItem: e
175
- }, null) : ["datetime", "date", "dates", "week", "month", "year", "years", "datetimerange", "daterange", "monthrange", "yearrange"].includes(e.type) ? l = o(B, {
176
- form: this.form,
177
- formItem: e
178
- }, null) : ["radio", "radio-button"].includes(e.type) ? l = o(N, {
179
- form: this.form,
180
- formItem: e
181
- }, null) : ["tree-select"].includes(e.type) ? l = o(O, {
182
- form: this.form,
183
- formItem: e
184
- }, null) : ["rate"].includes(e.type) ? l = o(z, {
185
- form: this.form,
186
- formItem: e
187
- }, null) : ["checkbox", "checkbox-button"].includes(e.type) ? l = o(H, {
188
- form: this.form,
189
- formItem: e
190
- }, null) : ["cascader"].includes(e.type) && (l = o(P, {
191
- form: this.form,
192
- formItem: e
193
- }, null));
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 l;
204
+ return t;
196
205
  },
197
206
  defaultAfter: () => {
198
- var r, l;
199
- return (l = (r = this.$slots)[m("after_" + e.key)]) == null ? void 0 : l.call(r, {
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 r, l;
206
- return (l = (r = this.$slots)[m("before_" + e.key)]) == null ? void 0 : l.call(r, {
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
- })) ? f : {
216
- default: () => [f]
217
- }), this.search && o(n("el-row"), {
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 && o(n("el-button"), {
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: () => [o(n("el-icon"), null, {
229
- default: () => [this.packUp ? o(Y, null, null) : o(Z, null, null)]
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)) || o(x, null, [o(n("el-button"), {
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: () => [L("搜索")]
236
- }), o(n("el-button"), {
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: () => [L("重置")]
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
- we as default
264
+ me as default
250
265
  };
251
266
  //# sourceMappingURL=index.mjs.map