m-eleplus-crud 0.0.2 → 0.0.4

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/dist/index.full.js +28 -17
  2. package/dist/index.full.min.js +15 -15
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +16 -16
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +29 -18
  7. package/es/components/form/src/form.d.ts +5 -1
  8. package/es/index.mjs +3 -3
  9. package/es/packages/components/dialog/index.mjs +2 -2
  10. package/es/packages/components/dialog/src/dialog.mjs +75 -116
  11. package/es/packages/components/dialog/src/dialog.mjs.map +1 -1
  12. package/es/packages/components/dialog/src/dialog2.mjs +116 -75
  13. package/es/packages/components/dialog/src/dialog2.mjs.map +1 -1
  14. package/es/packages/components/form/src/form.mjs.map +1 -1
  15. package/es/packages/components/form/src/form2.mjs +28 -17
  16. package/es/packages/components/form/src/form2.mjs.map +1 -1
  17. package/es/packages/components/index.mjs +3 -3
  18. package/es/packages/components/picture/index.mjs +2 -2
  19. package/es/packages/components/picture/src/picture.mjs +19 -26
  20. package/es/packages/components/picture/src/picture.mjs.map +1 -1
  21. package/es/packages/components/picture/src/picture2.mjs +26 -19
  22. package/es/packages/components/picture/src/picture2.mjs.map +1 -1
  23. package/es/packages/components/search/index.mjs +2 -2
  24. package/es/packages/components/search/src/search.mjs +423 -25
  25. package/es/packages/components/search/src/search.mjs.map +1 -1
  26. package/es/packages/components/search/src/search2.mjs +25 -423
  27. package/es/packages/components/search/src/search2.mjs.map +1 -1
  28. package/es/packages/components/table/src/table2.mjs +1 -1
  29. package/es/packages/components/table/src/table2.mjs.map +1 -1
  30. package/lib/components/form/src/form.d.ts +5 -1
  31. package/lib/index.js +3 -3
  32. package/lib/packages/components/dialog/index.js +2 -2
  33. package/lib/packages/components/dialog/src/dialog.js +76 -116
  34. package/lib/packages/components/dialog/src/dialog.js.map +1 -1
  35. package/lib/packages/components/dialog/src/dialog2.js +116 -76
  36. package/lib/packages/components/dialog/src/dialog2.js.map +1 -1
  37. package/lib/packages/components/form/src/form.js.map +1 -1
  38. package/lib/packages/components/form/src/form2.js +27 -16
  39. package/lib/packages/components/form/src/form2.js.map +1 -1
  40. package/lib/packages/components/index.js +3 -3
  41. package/lib/packages/components/picture/index.js +2 -2
  42. package/lib/packages/components/picture/src/picture.js +20 -26
  43. package/lib/packages/components/picture/src/picture.js.map +1 -1
  44. package/lib/packages/components/picture/src/picture2.js +26 -20
  45. package/lib/packages/components/picture/src/picture2.js.map +1 -1
  46. package/lib/packages/components/search/index.js +2 -2
  47. package/lib/packages/components/search/src/search.js +423 -26
  48. package/lib/packages/components/search/src/search.js.map +1 -1
  49. package/lib/packages/components/search/src/search2.js +26 -423
  50. package/lib/packages/components/search/src/search2.js.map +1 -1
  51. package/lib/packages/components/table/src/table2.js +1 -1
  52. package/lib/packages/components/table/src/table2.js.map +1 -1
  53. package/package.json +1 -1
  54. package/web-types.json +1 -1
@@ -12808,6 +12808,17 @@
12808
12808
  }
12809
12809
  }
12810
12810
  };
12811
+ const getFormItemEventBind = (column) => {
12812
+ const result = {};
12813
+ for (const key in column) {
12814
+ if (key.startsWith("event")) {
12815
+ let funName = key.replace("event", "");
12816
+ funName = funName.charAt(0).toLowerCase() + funName.slice(1);
12817
+ result[funName] = column[key];
12818
+ }
12819
+ }
12820
+ return result;
12821
+ };
12811
12822
  const formatDicValue = (row, column) => {
12812
12823
  let dictLabel = "";
12813
12824
  const findLabelByValue = (dicData, value) => {
@@ -12959,7 +12970,7 @@
12959
12970
  [
12960
12971
  vue.createCommentVNode(""),
12961
12972
  vue.createCommentVNode("\u8F93\u5165\u6846"),
12962
- vue.createVNode(_component_el_input, {
12973
+ vue.createVNode(_component_el_input, vue.mergeProps({
12963
12974
  modelValue: vue.unref(proxys)[column.prop || ""],
12964
12975
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
12965
12976
  modelModifiers: { trim: true },
@@ -12969,7 +12980,7 @@
12969
12980
  "show-word-limit": column.showWordLimit,
12970
12981
  "show-password": column.showPassword,
12971
12982
  type: !column.type || column.type === "input" ? "text" : column.type
12972
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "show-password", "type"])
12983
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "show-password", "type"])
12973
12984
  ],
12974
12985
  2112
12975
12986
  )) : column.type === "select" ? (vue.openBlock(), vue.createElementBlock(
@@ -12978,7 +12989,7 @@
12978
12989
  [
12979
12990
  vue.createCommentVNode(""),
12980
12991
  vue.createCommentVNode("\u4E0B\u62C9\u6846"),
12981
- vue.createVNode(_component_el_select, {
12992
+ vue.createVNode(_component_el_select, vue.mergeProps({
12982
12993
  modelValue: vue.unref(proxys)[column.prop || ""],
12983
12994
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
12984
12995
  modelModifiers: { trim: true },
@@ -12991,7 +13002,7 @@
12991
13002
  remote: column.remote,
12992
13003
  "remote-method": column.remoteMethod,
12993
13004
  loading: column.loading
12994
- }, {
13005
+ }, vue.toHandlers(getFormItemEventBind(column))), {
12995
13006
  default: vue.withCtx(() => [
12996
13007
  (vue.openBlock(true), vue.createElementBlock(
12997
13008
  vue.Fragment,
@@ -13007,7 +13018,7 @@
13007
13018
  ))
13008
13019
  ]),
13009
13020
  _: 2
13010
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "clearable", "filterable", "filter-method", "remote", "remote-method", "loading"])
13021
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "clearable", "filterable", "filter-method", "remote", "remote-method", "loading"])
13011
13022
  ],
13012
13023
  2112
13013
13024
  )) : column.type === "radio" ? (vue.openBlock(), vue.createElementBlock(
@@ -13016,11 +13027,11 @@
13016
13027
  [
13017
13028
  vue.createCommentVNode(""),
13018
13029
  vue.createCommentVNode("radio"),
13019
- vue.createVNode(_component_el_radio_group, {
13030
+ vue.createVNode(_component_el_radio_group, vue.mergeProps({
13020
13031
  modelValue: vue.unref(proxys)[column.prop || ""],
13021
13032
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
13022
13033
  style: { "width": "100%" }
13023
- }, {
13034
+ }, vue.toHandlers(getFormItemEventBind(column))), {
13024
13035
  default: vue.withCtx(() => [
13025
13036
  (vue.openBlock(true), vue.createElementBlock(
13026
13037
  vue.Fragment,
@@ -13044,7 +13055,7 @@
13044
13055
  ))
13045
13056
  ]),
13046
13057
  _: 2
13047
- }, 1032, ["modelValue", "onUpdate:modelValue"])
13058
+ }, 1040, ["modelValue", "onUpdate:modelValue"])
13048
13059
  ],
13049
13060
  2112
13050
13061
  )) : column.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock(
@@ -13053,11 +13064,11 @@
13053
13064
  [
13054
13065
  vue.createCommentVNode(""),
13055
13066
  vue.createCommentVNode("checkbox"),
13056
- vue.createVNode(_component_el_checkbox_group, {
13067
+ vue.createVNode(_component_el_checkbox_group, vue.mergeProps({
13057
13068
  modelValue: vue.unref(proxys)[column.prop || ""],
13058
13069
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
13059
13070
  style: { "width": "100%" }
13060
- }, {
13071
+ }, vue.toHandlers(getFormItemEventBind(column))), {
13061
13072
  default: vue.withCtx(() => [
13062
13073
  (vue.openBlock(true), vue.createElementBlock(
13063
13074
  vue.Fragment,
@@ -13073,7 +13084,7 @@
13073
13084
  ))
13074
13085
  ]),
13075
13086
  _: 2
13076
- }, 1032, ["modelValue", "onUpdate:modelValue"])
13087
+ }, 1040, ["modelValue", "onUpdate:modelValue"])
13077
13088
  ],
13078
13089
  2112
13079
13090
  )) : column.type === "switch" ? (vue.openBlock(), vue.createElementBlock(
@@ -13089,12 +13100,12 @@
13089
13100
  vue.Fragment,
13090
13101
  { key: 1 },
13091
13102
  [
13092
- vue.createVNode(_component_el_switch, {
13103
+ vue.createVNode(_component_el_switch, vue.mergeProps({
13093
13104
  modelValue: vue.unref(proxys)[column.prop || ""],
13094
13105
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
13095
13106
  "active-value": column.dicData[0].value,
13096
13107
  "inactive-value": column.dicData[1].value
13097
- }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"]),
13108
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"]),
13098
13109
  vue.createElementVNode(
13099
13110
  "span",
13100
13111
  { style: { "font-size": "var(--el-font-size-base)", "color": "var(--el-text-color-regular)", "margin-left": "6px" } },
@@ -13112,7 +13123,7 @@
13112
13123
  [
13113
13124
  vue.createCommentVNode(""),
13114
13125
  vue.createCommentVNode("\u65F6\u95F4"),
13115
- column.type !== "time" && column.type !== "timerange" ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, {
13126
+ column.type !== "time" && column.type !== "timerange" ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, vue.mergeProps({
13116
13127
  key: 0,
13117
13128
  modelValue: vue.unref(proxys)[column.prop || ""],
13118
13129
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
@@ -13122,7 +13133,7 @@
13122
13133
  "end-placeholder": column.endPlaceholder,
13123
13134
  format: column.format,
13124
13135
  "value-format": column.valueFormat || getValueFormatByType(column.type)
13125
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "clearable", "start-placeholder", "end-placeholder", "format", "value-format"])) : (vue.openBlock(), vue.createBlock(_component_el_time_picker, {
13136
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "type", "clearable", "start-placeholder", "end-placeholder", "format", "value-format"])) : (vue.openBlock(), vue.createBlock(_component_el_time_picker, vue.mergeProps({
13126
13137
  key: 1,
13127
13138
  modelValue: vue.unref(proxys)[column.prop || ""],
13128
13139
  "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
@@ -13131,7 +13142,7 @@
13131
13142
  "start-placeholder": column.startPlaceholder,
13132
13143
  "end-placeholder": column.endPlaceholder,
13133
13144
  "value-format": column.valueFormat || getValueFormatByType(column.type)
13134
- }, null, 8, ["modelValue", "onUpdate:modelValue", "is-range", "clearable", "start-placeholder", "end-placeholder", "value-format"]))
13145
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "is-range", "clearable", "start-placeholder", "end-placeholder", "value-format"]))
13135
13146
  ],
13136
13147
  64
13137
13148
  )) : column.type === "picture" ? (vue.openBlock(), vue.createElementBlock(
@@ -18279,7 +18290,7 @@
18279
18290
  vue.renderList(tableOption.value.column, (column, columnIndex) => {
18280
18291
  return vue.openBlock(), vue.createBlock(_component_el_table_column, {
18281
18292
  key: columnIndex,
18282
- type: ["index", "selection"].includes(column.type) ? column.type : null,
18293
+ type: ["index", "selection"].includes(column.type) ? column.type : "default",
18283
18294
  width: column.width,
18284
18295
  label: column.label,
18285
18296
  prop: column.prop,