@fecp/vue 1.1.9 → 1.2.1

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 (50) hide show
  1. package/es/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.mjs +1 -1
  2. package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/cascader/src/cascader.vue2.mjs +1 -1
  3. package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.mjs +6 -6
  4. package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs +1 -1
  5. package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/src/input.vue2.mjs +1 -1
  6. package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
  7. package/es/packages/vue/index.mjs +1 -1
  8. package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +19 -11
  9. package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +403 -0
  10. package/es/packages/vue/src/components/dialog/index.mjs +68 -0
  11. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +50 -19
  12. package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +10 -4
  13. package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +6 -1
  14. package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +2 -3
  15. package/es/packages/vue/src/components/forms/text/Text.vue.mjs +81 -8
  16. package/es/packages/vue/src/components/table/Pagination.vue.mjs +3 -2
  17. package/es/packages/vue/src/components/table/Table.vue.mjs +59 -18
  18. package/es/packages/vue/src/components/table/TableColumn.vue.mjs +32 -17
  19. package/es/packages/vue/src/components/table/TableFilter.vue.mjs +8 -5
  20. package/es/packages/vue/src/components/table/index.mjs +2 -2
  21. package/es/packages/vue/src/composables/usePageEvents.mjs +14 -6
  22. package/es/packages/vue/src/utils/common.mjs +5 -0
  23. package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +48 -3
  24. package/es/packages/vue/src/utils/eventFlow/eventFlowHandler.mjs +58 -26
  25. package/es/packages/vue/src/utils/eventFlowParser.mjs +9 -6
  26. package/es/packages/vue/src/utils/formulajs/calculate.mjs +1 -1
  27. package/es/vue.css +293 -208
  28. package/lib/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/cascader/src/cascader.vue2.js +29 -29
  29. package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
  30. package/lib/packages/vue/index.js +1 -1
  31. package/lib/packages/vue/src/components/details/footer/Footer.vue.js +19 -11
  32. package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +403 -0
  33. package/lib/packages/vue/src/components/dialog/index.js +68 -0
  34. package/lib/packages/vue/src/components/forms/form/Form.vue.js +50 -19
  35. package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +10 -4
  36. package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +6 -1
  37. package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +0 -1
  38. package/lib/packages/vue/src/components/forms/text/Text.vue.js +80 -7
  39. package/lib/packages/vue/src/components/table/Pagination.vue.js +3 -2
  40. package/lib/packages/vue/src/components/table/Table.vue.js +59 -18
  41. package/lib/packages/vue/src/components/table/TableColumn.vue.js +31 -16
  42. package/lib/packages/vue/src/components/table/TableFilter.vue.js +8 -5
  43. package/lib/packages/vue/src/composables/usePageEvents.js +14 -6
  44. package/lib/packages/vue/src/utils/common.js +5 -0
  45. package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +56 -11
  46. package/lib/packages/vue/src/utils/eventFlow/eventFlowHandler.js +58 -26
  47. package/lib/packages/vue/src/utils/eventFlowParser.js +9 -6
  48. package/lib/packages/vue/src/utils/formulajs/calculate.js +1 -1
  49. package/lib/vue.css +293 -208
  50. package/package.json +1 -1
@@ -13,22 +13,26 @@ import _FormItem from "../formItem/FormItem.vue.mjs";
13
13
  import { createDataSource } from "../../../utils/datasource.mjs";
14
14
  import { generateFieldRules } from "./validation.mjs";
15
15
  import { cloneDeep } from "../../../utils/common.mjs";
16
- /* empty css */
17
16
  /* empty css */
18
- /* empty css */
19
17
  /* empty css */
18
+ /* empty css */
19
+ import "../../table/index.mjs";
20
+ import "./index.mjs";
21
+ import { calculate } from "../../../utils/formulajs/calculate.mjs";
20
22
  import { useEventFlow } from "../../../utils/eventFlow/eventFlowHandler.mjs";
23
+ /* empty css */
24
+ /* empty css */
25
+ /* empty css */
26
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
27
+ /* empty css */
28
+ /* empty css */
21
29
  import { usePageEvents } from "../../../composables/usePageEvents.mjs";
22
30
  import { header } from "../../details/header/index.mjs";
23
31
  import { main } from "../../details/main/index.mjs";
24
32
  import { footer } from "../../details/footer/index.mjs";
25
33
  import { checkFilterMatch } from "../../../utils/parseFilterConfig.mjs";
26
- import { calculate } from "../../../utils/formulajs/calculate.mjs";
27
34
  import hooks from "../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.mjs";
28
- /* empty css */
29
- /* empty css */
30
35
  /* empty css */
31
- import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
32
36
  import { ElContainer } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.mjs";
33
37
  import { ElForm } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
34
38
  import De from "../../../../../../node_modules/.pnpm/grid-layout-plus@1.1.1_vue@3.5.13_typescript@5.7.3_/node_modules/grid-layout-plus/es/components/grid-layout.vue.mjs";
@@ -57,9 +61,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
57
61
  type: Boolean,
58
62
  default: false
59
63
  },
64
+ isDialog: {
65
+ type: Boolean,
66
+ default: false
67
+ },
60
68
  canPageEvent: {
61
69
  type: Boolean,
62
70
  default: true
71
+ },
72
+ initSearchData: {
73
+ type: Object,
74
+ default: {}
75
+ },
76
+ initFormMode: {
77
+ type: String,
78
+ default: ""
63
79
  }
64
80
  },
65
81
  emits: [
@@ -89,17 +105,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
89
105
  const pageEvents = props.canPageEvent ? usePageEvents(() => ({
90
106
  pageEventConfig: localConfig.value.pageEventConfig,
91
107
  fields: [...fieldsData.value, ...hiddenFields.value],
92
- ctx,
108
+ instance,
93
109
  formData: formData.value,
94
110
  localConfig: localConfig.value,
111
+ initSearchData: props.initSearchData,
95
112
  components: {
96
- form: instance == null ? void 0 : instance.proxy
113
+ form: ctx
97
114
  }
98
115
  })) : null;
99
116
  if (pageEvents) {
100
117
  pageEvents.handleBeforeUnmount();
101
118
  pageEvents.handleUnmounted();
102
119
  }
120
+ const formMode = ref("");
103
121
  const loadConfig = async () => {
104
122
  if (!props.templateKey) {
105
123
  return;
@@ -115,8 +133,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
115
133
  emit("loaded", option);
116
134
  rowHeight.value = option.labelPosition == "top" ? 1.5 : 1;
117
135
  localConfig.value = option;
136
+ if (props.initFormMode) {
137
+ formMode.value = props.initFormMode;
138
+ } else {
139
+ formMode.value = option.formMode;
140
+ }
118
141
  fieldsData.value = option.fieldsData.map((item) => {
119
- if (option.formMode == "query") {
142
+ if (formMode.value == "query") {
120
143
  item.component.disabled = true;
121
144
  }
122
145
  return item.component;
@@ -277,10 +300,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
277
300
  handleEvent: createHandleEvent
278
301
  } = useEventFlow({
279
302
  fields: [...fieldsData.value, ...hiddenFields.value],
280
- ctx,
281
- dataSources: localConfig.value.dataSources,
303
+ instance,
304
+ localConfig: localConfig.value,
282
305
  components: {
283
- form: instance == null ? void 0 : instance.proxy
306
+ form: ctx
284
307
  }
285
308
  });
286
309
  handleEvent.value = createHandleEvent;
@@ -325,6 +348,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
325
348
  if (field && formulaText) {
326
349
  const calcResult = calculate({
327
350
  text: formulaText,
351
+ marks: [],
328
352
  value: formData.value
329
353
  });
330
354
  formData.value[field.fieldName] = calcResult;
@@ -540,15 +564,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
540
564
  { deep: true }
541
565
  );
542
566
  provide("formData", formData);
567
+ provide("localConfig", localConfig);
568
+ provide("fieldsData", fieldsData);
569
+ provide("hiddenFields", hiddenFields);
543
570
  provide("rowHeight", rowHeight);
544
571
  provide("gridLayout", gridLayout);
545
572
  provide("gridLayoutFieldsData", gridLayoutFieldsData);
573
+ provide("formCtx", ctx);
546
574
  __expose({
547
575
  validate,
548
576
  resetFields,
549
577
  getFormData,
550
578
  setFormData,
551
- formRef
579
+ formRef,
580
+ localConfig
552
581
  });
553
582
  return (_ctx, _cache) => {
554
583
  const _component_el_form = ElForm;
@@ -562,7 +591,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
562
591
  "data-version": "v5"
563
592
  }, {
564
593
  default: withCtx(() => [
565
- !configLoading.value && !__props.isSubForm ? (openBlock(), createBlock(unref(header), {
594
+ !configLoading.value && !__props.isSubForm && !__props.isDialog ? (openBlock(), createBlock(unref(header), {
566
595
  key: 0,
567
596
  pageHeaderConfig: localConfig.value.pageHeaderConfig
568
597
  }, null, 8, ["pageHeaderConfig"])) : createCommentVNode("", true),
@@ -574,7 +603,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
574
603
  model: formData.value,
575
604
  rules: formRules.value,
576
605
  "label-position": localConfig.value.labelPosition,
577
- style: normalizeStyle({ padding: __props.isSubForm ? "0" : "18px" }),
606
+ style: normalizeStyle({ padding: __props.isSubForm || __props.isDialog ? "0" : "18px" }),
578
607
  "validate-on-rule-change": false
579
608
  }, {
580
609
  default: withCtx(() => [
@@ -598,8 +627,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
598
627
  localConfig: localConfig.value,
599
628
  error: getFieldError(component.fieldName),
600
629
  formRef: formRef.value,
630
+ formMode: formMode.value,
601
631
  onChange: handleFieldChange
602
- }, null, 8, ["modelValue", "onUpdate:modelValue", "config", "localConfig", "error", "formRef"])
632
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "config", "localConfig", "error", "formRef", "formMode"])
603
633
  ]),
604
634
  _: 1
605
635
  }, 8, ["layout", "row-height", "col-num"])) : createCommentVNode("", true),
@@ -617,18 +647,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
617
647
  ]),
618
648
  _: 1
619
649
  }),
620
- !__props.isSubForm ? (openBlock(), createBlock(unref(footer), {
650
+ !__props.isSubForm && !__props.isDialog ? (openBlock(), createBlock(unref(footer), {
621
651
  key: 1,
652
+ formMode: formMode.value,
622
653
  pageFooterConfig: localConfig.value.pageFooterConfig,
623
654
  onCustomButtonClick: handleCustomButtonClick
624
- }, null, 8, ["pageFooterConfig"])) : createCommentVNode("", true)
655
+ }, null, 8, ["formMode", "pageFooterConfig"])) : createCommentVNode("", true)
625
656
  ]),
626
657
  _: 1
627
658
  }, 8, ["data-id", "data-name", "data-pkId"]);
628
659
  };
629
660
  }
630
661
  });
631
- const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-caaa182c"]]);
662
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5877fafa"]]);
632
663
  export {
633
664
  _Form as default
634
665
  };
@@ -45,6 +45,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
45
45
  formRef: {
46
46
  type: Object,
47
47
  default: null
48
+ },
49
+ formMode: {
50
+ type: String,
51
+ default: ""
48
52
  }
49
53
  },
50
54
  emits: ["update:modelValue", "change"],
@@ -103,8 +107,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
103
107
  }, null, 8, ["config"])) : __props.config.fieldType == "subForm" ? (openBlock(), createBlock(unref(SubForm), {
104
108
  key: 2,
105
109
  config: __props.config,
106
- localConfig: __props.localConfig
107
- }, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "subTable" ? (openBlock(), createBlock(unref(SubTable), {
110
+ localConfig: __props.localConfig,
111
+ formMode: __props.formMode
112
+ }, null, 8, ["config", "localConfig", "formMode"])) : __props.config.fieldType == "subTable" ? (openBlock(), createBlock(unref(SubTable), {
108
113
  key: 3,
109
114
  config: __props.config,
110
115
  localConfig: __props.localConfig
@@ -122,10 +127,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
122
127
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => compValue.value = $event)
123
128
  }, componentProps.value, {
124
129
  config: __props.config,
130
+ formMode: __props.formMode,
125
131
  onChange: _cache[1] || (_cache[1] = (value) => {
126
132
  handleChange(__props.config, value);
127
133
  })
128
- }), null, 16, ["modelValue", "config"])) : createCommentVNode("", true)
134
+ }), null, 16, ["modelValue", "config", "formMode"])) : createCommentVNode("", true)
129
135
  ]),
130
136
  _: 2
131
137
  }, [
@@ -155,7 +161,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
155
161
  };
156
162
  }
157
163
  });
158
- const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7ba9115b"]]);
164
+ const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1f0d0846"]]);
159
165
  export {
160
166
  _FormItem as default
161
167
  };
@@ -18,6 +18,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
18
18
  localConfig: {
19
19
  type: Object,
20
20
  required: true
21
+ },
22
+ formMode: {
23
+ type: String,
24
+ default: ""
21
25
  }
22
26
  // subFormId: {
23
27
  // type: String,
@@ -78,9 +82,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
78
82
  isSubForm: "",
79
83
  onLoaded: subFormLoaded,
80
84
  canPageEvent: __props.config.triggerSubFormPageEvent,
85
+ initFormMode: __props.formMode,
81
86
  modelValue: unref(formData),
82
87
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(formData) ? formData.value = $event : null)
83
- }, null, 8, ["templateKey", "canPageEvent", "modelValue"])
88
+ }, null, 8, ["templateKey", "canPageEvent", "initFormMode", "modelValue"])
84
89
  ], 64);
85
90
  };
86
91
  }
@@ -1,5 +1,5 @@
1
1
  import { inject, computed, createElementBlock, openBlock, Fragment, createCommentVNode, createVNode, createBlock, unref } from "vue";
2
- import Table from "../../table/Table.vue.mjs";
2
+ import _Table from "../../table/Table.vue.mjs";
3
3
  import { Divider } from "../divider/index.mjs";
4
4
  import { H2 } from "../h2/index.mjs";
5
5
  import { parseRouteParams } from "../../../utils/parseRouteParams.mjs";
@@ -61,7 +61,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
61
61
  formData.value,
62
62
  fields
63
63
  );
64
- console.log("🚀 ~ params:", params);
65
64
  return params;
66
65
  }
67
66
  return {};
@@ -89,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
89
88
  config: __props.config
90
89
  }, null, 8, ["config"])) : createCommentVNode("", true)
91
90
  ])) : createCommentVNode("", true),
92
- createVNode(unref(Table), {
91
+ createVNode(unref(_Table), {
93
92
  templateKey: __props.config.subTableKey,
94
93
  isSubTable: "",
95
94
  onLoaded: subTableLoaded,
@@ -1,7 +1,14 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
3
  /* empty css */
4
- import { computed, createElementBlock, openBlock, createTextVNode, createVNode, createCommentVNode, toDisplayString, mergeProps, toHandlers, createSlots, withCtx, createElementVNode } from "vue";
4
+ import { computed, getCurrentInstance, inject, createElementBlock, openBlock, createVNode, createCommentVNode, mergeProps, toHandlers, createSlots, withCtx, createElementVNode, toDisplayString, createBlock, createTextVNode, unref } from "vue";
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ import { openDialog } from "../../dialog/index.mjs";
9
+ /* empty css */
10
+ /* empty css */
11
+ import { useEventFlow } from "../../../utils/eventFlow/eventFlowHandler.mjs";
5
12
  /* empty css */
6
13
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
7
14
  import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
@@ -58,6 +65,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
58
65
  type: String,
59
66
  default: ""
60
67
  },
68
+ suffixButtonName: {
69
+ type: String,
70
+ default: ""
71
+ },
72
+ suffixButtonConfig: {
73
+ type: Array,
74
+ default: []
75
+ },
76
+ suffixDialogId: {
77
+ type: String,
78
+ default: ""
79
+ },
61
80
  label: {
62
81
  type: String,
63
82
  default: ""
@@ -65,6 +84,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
65
84
  dataMasking: {
66
85
  type: String,
67
86
  default: ""
87
+ },
88
+ formMode: {
89
+ type: String,
90
+ default: ""
68
91
  }
69
92
  },
70
93
  emits: ["update:modelValue", "change"],
@@ -84,18 +107,56 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
84
107
  if (!props.dataMasking || !props.modelValue) return "";
85
108
  return "****";
86
109
  });
110
+ const instance = getCurrentInstance();
111
+ const formData = inject("formData", null);
112
+ const localConfig = inject("localConfig", null);
113
+ const fieldsData = inject("fieldsData", null);
114
+ const hiddenFields = inject("hiddenFields", null);
115
+ const formCtx = inject("formCtx", null);
116
+ const fieldsList = [
117
+ ...(fieldsData == null ? void 0 : fieldsData.value) || [],
118
+ ...(hiddenFields == null ? void 0 : hiddenFields.value) || []
119
+ ];
120
+ const { getEventHandlers: createEventHandlers } = useEventFlow({
121
+ fields: fieldsList,
122
+ instance,
123
+ localConfig: localConfig == null ? void 0 : localConfig.value,
124
+ components: {
125
+ form: formCtx
126
+ }
127
+ });
128
+ const getEventHandlers = (row, item, eventConfig) => createEventHandlers(item, row, eventConfig);
129
+ function openSuffixDialog() {
130
+ const dialogsConfig = localConfig.value.dialogs || [];
131
+ const dialog = dialogsConfig.find((item) => item.id == props.suffixDialogId);
132
+ if (dialog) {
133
+ openDialog(
134
+ props.config.fieldName,
135
+ dialog,
136
+ instance,
137
+ formCtx,
138
+ fieldsList,
139
+ formData.value
140
+ ).then((result) => {
141
+ console.log("确定", result);
142
+ }).catch(() => {
143
+ console.log("取消");
144
+ });
145
+ } else {
146
+ console.error(`对话框配置不存在:${props.suffixDialogId}`);
147
+ }
148
+ }
87
149
  return (_ctx, _cache) => {
88
150
  const _component_el_button = ElButton;
89
151
  const _component_el_input = ElInput;
90
152
  return openBlock(), createElementBlock("div", _hoisted_1, [
91
- createTextVNode(toDisplayString(__props.suffix) + " ", 1),
92
153
  createVNode(_component_el_input, mergeProps({
93
154
  modelValue: inputValue.value,
94
155
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
95
156
  }, toHandlers(__props.config.eventHandlers), {
96
157
  placeholder: __props.placeholder,
97
158
  disabled: __props.disabled,
98
- readonly: __props.readonly,
159
+ readonly: __props.suffixButton == "dialog" ? true : __props.readonly,
99
160
  maxlength: __props.maxLength,
100
161
  "show-word-limit": __props.showWordCount,
101
162
  onChange: handleChange,
@@ -115,15 +176,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
115
176
  ]),
116
177
  key: "1"
117
178
  } : void 0,
118
- __props.suffixButton ? {
179
+ __props.formMode != "query" && __props.suffixButton && __props.suffixButton != "none" ? {
119
180
  name: "append",
120
181
  fn: withCtx(() => [
121
- createVNode(_component_el_button, null, {
182
+ __props.suffixButton == "dialog" ? (openBlock(), createBlock(_component_el_button, {
183
+ key: 0,
184
+ class: "suffixButton",
185
+ onClick: openSuffixDialog
186
+ }, {
187
+ default: withCtx(() => _cache[1] || (_cache[1] = [
188
+ createTextVNode("选择")
189
+ ])),
190
+ _: 1
191
+ })) : __props.suffixButton == "custom" ? (openBlock(), createBlock(_component_el_button, mergeProps({
192
+ key: 1,
193
+ class: "suffixButton"
194
+ }, toHandlers(getEventHandlers(unref(formData), {}, __props.suffixButtonConfig))), {
122
195
  default: withCtx(() => [
123
- createTextVNode(toDisplayString(__props.suffixButton), 1)
196
+ createTextVNode(toDisplayString(__props.suffixButtonName), 1)
124
197
  ]),
125
198
  _: 1
126
- })
199
+ }, 16)) : createCommentVNode("", true)
127
200
  ]),
128
201
  key: "2"
129
202
  } : void 0
@@ -133,7 +206,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
133
206
  };
134
207
  }
135
208
  });
136
- const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58ba93bc"]]);
209
+ const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6f1ce0e3"]]);
137
210
  export {
138
211
  _Text as default
139
212
  };
@@ -92,7 +92,8 @@ const _sfc_main = {
92
92
  "current-page": __props.pagination.pageNo,
93
93
  layout: getLayout(__props.config.layout),
94
94
  total: __props.pagination.pageTotal,
95
- size: __props.config.size === "default" ? "" : __props.config.size
95
+ size: __props.config.size === "default" ? "" : __props.config.size,
96
+ style: { "width": "100%" }
96
97
  }, {
97
98
  default: withCtx(() => [
98
99
  getLayout(__props.config.layout).includes("slot") ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.pagination.pageNo) + "/" + toDisplayString(Math.ceil(__props.pagination.pageTotal / __props.pagination.pageSize)) + " 页 ", 1)) : createCommentVNode("", true)
@@ -103,7 +104,7 @@ const _sfc_main = {
103
104
  };
104
105
  }
105
106
  };
106
- const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e197e5c9"]]);
107
+ const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1ac70114"]]);
107
108
  export {
108
109
  Pagination as default
109
110
  };
@@ -13,16 +13,22 @@ import CustomButtons from "./CustomButtons.vue.mjs";
13
13
  import TableColumn from "./TableColumn.vue.mjs";
14
14
  import TableFilter from "./TableFilter.vue.mjs";
15
15
  import { getCurrentVueInstance } from "../../utils/getInstance.mjs";
16
- /* empty css */
16
+ import { isEqual } from "../../utils/common.mjs";
17
17
  /* empty css */
18
- /* empty css */
19
18
  /* empty css */
19
+ /* empty css */
20
+ import "./index.mjs";
21
+ import "../forms/form/index.mjs";
22
+ import "../../utils/formulajs/functionCore.mjs";
20
23
  import { useEventFlow } from "../../utils/eventFlow/eventFlowHandler.mjs";
21
- import getJsonAsyncUtil from "../../utils/getJsonAsyncUtil.mjs";
22
24
  /* empty css */
23
25
  /* empty css */
24
- /* empty css */
26
+ /* empty css */
25
27
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
28
+ /* empty css */
29
+ /* empty css */
30
+ import getJsonAsyncUtil from "../../utils/getJsonAsyncUtil.mjs";
31
+ /* empty css */
26
32
  import { ElContainer } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.mjs";
27
33
  import { VxeTable } from "../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/table/index.mjs";
28
34
  import { ElMessage } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.mjs";
@@ -63,6 +69,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
63
69
  type: Boolean,
64
70
  default: false
65
71
  },
72
+ isDialog: {
73
+ type: Boolean,
74
+ default: false
75
+ },
66
76
  hasPagination: {
67
77
  type: Boolean,
68
78
  default: false
@@ -74,6 +84,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
74
84
  readonly: {
75
85
  type: Boolean,
76
86
  default: false
87
+ },
88
+ selectMode: {
89
+ type: String,
90
+ default: "",
91
+ validator: (value) => ["", "none", "single", "multiple"].includes(value)
77
92
  }
78
93
  },
79
94
  emits: [
@@ -107,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
107
122
  });
108
123
  const isPagination = computed(() => {
109
124
  var _a;
110
- if (props.isSubTable) {
125
+ if (props.isSubTable || props.isDialog) {
111
126
  return props.hasPagination;
112
127
  } else {
113
128
  return (_a = localConfig.value.paginationConfig) == null ? void 0 : _a.enabled;
@@ -264,8 +279,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
264
279
  };
265
280
  const { handleEvent } = useEventFlow({
266
281
  fields: localConfig.value.fieldsData,
267
- ctx: getCurrentVueInstance(),
268
- dataSources: localConfig.value.dataSources,
282
+ instance,
283
+ localConfig: localConfig.value,
269
284
  components: {
270
285
  table: instance == null ? void 0 : instance.proxy
271
286
  }
@@ -381,6 +396,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
381
396
  $table.openExport();
382
397
  }
383
398
  };
399
+ const rowConfig = computed(() => {
400
+ return {
401
+ keyField: localConfig.value.pkFieldName || ""
402
+ };
403
+ });
404
+ const radioConfig = reactive({
405
+ strict: true,
406
+ trigger: "row",
407
+ highlight: true
408
+ });
409
+ const checkboxConfig = reactive({
410
+ showHeader: true,
411
+ strict: true,
412
+ trigger: "row",
413
+ highlight: true,
414
+ showReserveStatus: true,
415
+ isShiftKey: true,
416
+ range: true,
417
+ reserve: true
418
+ });
384
419
  const handlePersonalize = () => {
385
420
  if (tableRef.value) {
386
421
  tableRef.value.openCustom();
@@ -435,9 +470,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
435
470
  });
436
471
  watch(
437
472
  () => props.initSearchData,
438
- (val) => {
439
- if (props.canLoadBySearchData && dataSourceManager.value) {
440
- dataSourceManager.value.updateInitSearchData(val);
473
+ (newVal, oldVal) => {
474
+ if (props.canLoadBySearchData && dataSourceManager.value && !isEqual(newVal, oldVal)) {
475
+ dataSourceManager.value.updateInitSearchData(newVal);
441
476
  refresh();
442
477
  }
443
478
  },
@@ -455,7 +490,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
455
490
  switchMode,
456
491
  getSelection,
457
492
  clearSelection,
458
- exportData: handleExport
493
+ exportData: handleExport,
494
+ localConfig
459
495
  });
460
496
  return (_ctx, _cache) => {
461
497
  const _component_el_container = ElContainer;
@@ -498,6 +534,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
498
534
  height: tableHeight.value,
499
535
  "empty-text": "暂无数据",
500
536
  "export-config": unref(exportConfig),
537
+ "row-config": rowConfig.value,
538
+ "radio-config": unref(radioConfig),
539
+ "checkbox-config": unref(checkboxConfig),
501
540
  onSortChange: handleSortChange,
502
541
  onCheckboxChange: handleCheckboxChange,
503
542
  onCheckboxAll: handleCheckboxAll,
@@ -509,16 +548,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
509
548
  createVNode(TableColumn, {
510
549
  "fields-data": localConfig.value.fieldsData,
511
550
  "show-index": localConfig.value.showIndex,
512
- "select-mode": localConfig.value.selectMode,
551
+ "select-mode": __props.selectMode || localConfig.value.selectMode,
513
552
  "is-opt-btns": localConfig.value.isOptBtns,
514
553
  "opt-btns": localConfig.value.optBtns,
515
554
  "mode-key": currentMode.value,
516
555
  modes: localConfig.value.mode,
517
556
  "data-source-options": dataSourceOptions.value,
518
557
  "dictionary-options": dictionaryOptions.value,
519
- "data-sources": localConfig.value.dataSources,
558
+ localConfig: localConfig.value,
520
559
  "table-ref": (_a = unref(instance)) == null ? void 0 : _a.proxy,
521
- "table-data": displayData.value
560
+ "table-data": displayData.value,
561
+ readonly: __props.readonly,
562
+ isDialog: __props.isDialog
522
563
  }, createSlots({ _: 2 }, [
523
564
  renderList(localConfig.value.fieldsData, (field) => {
524
565
  return {
@@ -528,11 +569,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
528
569
  ])
529
570
  };
530
571
  })
531
- ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "data-sources", "table-ref", "table-data"])
572
+ ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog"])
532
573
  ];
533
574
  }),
534
575
  _: 3
535
- }, 8, ["data", "auto-resize", "height", "export-config"])
576
+ }, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
536
577
  ]),
537
578
  isPagination.value ? (openBlock(), createBlock(Pagination, {
538
579
  key: 2,
@@ -547,7 +588,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
547
588
  };
548
589
  }
549
590
  });
550
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0446411a"]]);
591
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6ce36f88"]]);
551
592
  export {
552
- Table as default
593
+ _Table as default
553
594
  };