3h1-ui 2.13.2 → 2.13.3

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/es/index.js CHANGED
@@ -8565,13 +8565,11 @@ function useFormEvents({
8565
8565
  value = handleInputNumberValue(schema == null ? void 0 : schema.component, value);
8566
8566
  if (hasKey && fields.includes(key2)) {
8567
8567
  if (itemIsDateType(key2)) {
8568
- console.log(1, key2);
8569
8568
  if (Array.isArray(value)) {
8570
8569
  const arr = [];
8571
8570
  for (const ele of value) {
8572
8571
  arr.push(ele ? ele : null);
8573
8572
  }
8574
- console.log("arr", arr);
8575
8573
  formModel[key2] = arr;
8576
8574
  } else {
8577
8575
  const { componentProps } = schema || {};
@@ -10614,7 +10612,6 @@ function useForm(props2) {
10614
10612
  const value = await form.validate(nameList);
10615
10613
  Object.keys(value).forEach((key2) => {
10616
10614
  if (value[key2] === void 0) {
10617
- console.log("key", key2);
10618
10615
  value[key2] = "";
10619
10616
  }
10620
10617
  });
@@ -16813,7 +16810,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
16813
16810
  await tableRef.value.setProps({
16814
16811
  searchInfo: { [unref(getTableProps).searchKey]: key2 }
16815
16812
  });
16816
- console.log("unref(getTableProps).searchKey", unref(getTableProps).searchKey);
16817
16813
  tableRef.value.reload();
16818
16814
  };
16819
16815
  const handleComfirm = () => {
@@ -16849,8 +16845,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
16849
16845
  };
16850
16846
  }
16851
16847
  });
16852
- const Modal_vue_vue_type_style_index_0_scoped_dbd84c9c_lang = "";
16853
- const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-dbd84c9c"]]);
16848
+ const Modal_vue_vue_type_style_index_0_scoped_4dc415ac_lang = "";
16849
+ const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-4dc415ac"]]);
16854
16850
  const _hoisted_1$9 = { class: "api-modal-select" };
16855
16851
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
16856
16852
  __name: "ApiModalSelect",
@@ -21267,7 +21263,7 @@ const usePagination = () => {
21267
21263
  };
21268
21264
  return { page, setPage };
21269
21265
  };
21270
- const useTableData = (getProps, { setPage, params }) => {
21266
+ const useTableData = (getProps, { setPage, params, tableRef }) => {
21271
21267
  const dataSource = ref([]);
21272
21268
  const setTableData = (data) => {
21273
21269
  dataSource.value = data.map((item) => {
@@ -21286,6 +21282,14 @@ const useTableData = (getProps, { setPage, params }) => {
21286
21282
  setPage({ total: (res == null ? void 0 : res.total) || 0 });
21287
21283
  }
21288
21284
  };
21285
+ const addTableData = (list = [{}]) => {
21286
+ const temp = list.map((item) => {
21287
+ item._isEdit = true;
21288
+ return item;
21289
+ });
21290
+ dataSource.value.unshift(...temp);
21291
+ tableRef.value.loadData(dataSource.value);
21292
+ };
21289
21293
  onMounted(async () => {
21290
21294
  if (getProps.value.isImmediate) {
21291
21295
  await reload();
@@ -21295,7 +21299,8 @@ const useTableData = (getProps, { setPage, params }) => {
21295
21299
  dataSource,
21296
21300
  setTableData,
21297
21301
  reload,
21298
- getTableData
21302
+ getTableData,
21303
+ addTableData
21299
21304
  };
21300
21305
  };
21301
21306
  const componentMap = /* @__PURE__ */ new Map();
@@ -21344,7 +21349,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21344
21349
  default: null
21345
21350
  }
21346
21351
  },
21347
- emits: ["updateStatusEdit", "edit-ensure", "edit-cancel"],
21352
+ emits: [
21353
+ "updateStatusEdit",
21354
+ "edit-ensure",
21355
+ "edit-cancel",
21356
+ "row-remove"
21357
+ ],
21348
21358
  setup(__props, { emit }) {
21349
21359
  const props2 = __props;
21350
21360
  const getActions = computed(() => {
@@ -21356,6 +21366,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21356
21366
  },
21357
21367
  ifShow: props2.row._isEdit === false
21358
21368
  },
21369
+ {
21370
+ label: "删除",
21371
+ onClick: () => {
21372
+ emit("row-remove", true);
21373
+ },
21374
+ ifShow: props2.row._isEdit === false
21375
+ },
21359
21376
  {
21360
21377
  label: "确定",
21361
21378
  onClick: () => {
@@ -21377,6 +21394,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21377
21394
  return (_ctx, _cache) => {
21378
21395
  return openBlock(), createBlock(_sfc_main$m, {
21379
21396
  actions: unref(getActions),
21397
+ "show-count": 4,
21380
21398
  outside: true
21381
21399
  }, null, 8, ["actions"]);
21382
21400
  };
@@ -22090,7 +22108,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22090
22108
  "register",
22091
22109
  "selection-change",
22092
22110
  "row-ensure",
22093
- "row-cancel"
22111
+ "row-cancel",
22112
+ "row-remove"
22094
22113
  ],
22095
22114
  setup(__props, { emit: emits }) {
22096
22115
  const props2 = __props;
@@ -22114,7 +22133,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22114
22133
  innerProps.value = deepMergeObjects(innerProps.value, props22);
22115
22134
  };
22116
22135
  const attrs = useAttrs$2();
22117
- useSlots();
22136
+ const slots = useSlots();
22118
22137
  const getBindValues = computed(() => {
22119
22138
  return deepMergeObjects(basicProps, attrs, getProps.value);
22120
22139
  });
@@ -22135,6 +22154,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22135
22154
  rowProps: { gutter: 20 }
22136
22155
  };
22137
22156
  });
22157
+ const getFormSlotKeys = computed(() => {
22158
+ const keys2 = Object.keys(slots);
22159
+ return keys2.map((item) => item.startsWith("form-") ? item : null).filter((item) => !!item);
22160
+ });
22161
+ function replaceFormSlotKey(key2) {
22162
+ var _a2;
22163
+ if (!key2)
22164
+ return "";
22165
+ return ((_a2 = key2 == null ? void 0 : key2.replace) == null ? void 0 : _a2.call(key2, /form-/, "")) ?? "";
22166
+ }
22138
22167
  const [registerForm, formActions] = useForm();
22139
22168
  const formSearch = ref({});
22140
22169
  const handleSearchFormSubmit = (form) => {
@@ -22150,14 +22179,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22150
22179
  size: page.pageSize
22151
22180
  };
22152
22181
  });
22153
- const { dataSource, setTableData, reload, getTableData } = useTableData(
22154
- getProps,
22155
- {
22156
- setPage,
22157
- params
22158
- }
22159
- );
22160
22182
  const tableRef = ref();
22183
+ const { dataSource, setTableData, reload, getTableData, addTableData } = useTableData(getProps, {
22184
+ setPage,
22185
+ params,
22186
+ tableRef
22187
+ });
22161
22188
  const handleCheckboxChange = () => {
22162
22189
  const records = tableRef.value.getCheckboxRecords();
22163
22190
  emits("selection-change", records);
@@ -22185,6 +22212,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22185
22212
  const handleEditCancel = (row) => {
22186
22213
  emits("row-cancel", row);
22187
22214
  };
22215
+ const handleRowRemove = (row) => {
22216
+ emits("row-remove", row);
22217
+ };
22188
22218
  const getTreeExpandRecords = () => {
22189
22219
  return toRaw(tableRef.value.getTreeExpandRecords());
22190
22220
  };
@@ -22240,7 +22270,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22240
22270
  hideColumn,
22241
22271
  showColumn,
22242
22272
  resetColumn,
22243
- refreshColumn
22273
+ refreshColumn,
22274
+ addTableData
22244
22275
  };
22245
22276
  createTableContext({ ...tableAction });
22246
22277
  emits("register", tableAction, formActions);
@@ -22258,7 +22289,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22258
22289
  onReset: handleSearchFormSubmit,
22259
22290
  onAdvancedChange: _cache[0] || (_cache[0] = () => {
22260
22291
  })
22261
- }), null, 16, ["onRegister"])
22292
+ }), createSlots({ _: 2 }, [
22293
+ renderList(unref(getFormSlotKeys), (item) => {
22294
+ return {
22295
+ name: replaceFormSlotKey(item),
22296
+ fn: withCtx((data) => [
22297
+ renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
22298
+ ])
22299
+ };
22300
+ })
22301
+ ]), 1040, ["onRegister"])
22262
22302
  ], 2)) : createCommentVNode("", true),
22263
22303
  unref(getProps).isShowToolbar ? (openBlock(), createElementBlock("div", {
22264
22304
  key: 1,
@@ -22320,14 +22360,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22320
22360
  }), {
22321
22361
  default: withCtx((config) => [
22322
22362
  renderSlot(_ctx.$slots, column.field, normalizeProps(guardReactiveProps(config)), () => {
22323
- var _a3, _b2;
22363
+ var _a3, _b2, _c2;
22324
22364
  return [
22325
- config.row._isEdit && (column == null ? void 0 : column.isEdit) ? (openBlock(), createBlock(unref(CellComponent), mergeProps({ key: 0 }, (column == null ? void 0 : column.editProps) || {}, {
22326
- value: config.row[column.field],
22327
- "onUpdate:value": ($event) => config.row[column.field] = $event
22328
- }), null, 16, ["value", "onUpdate:value"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
22329
- (column == null ? void 0 : column.isEdit) && ((_a3 = column == null ? void 0 : column.editProps) == null ? void 0 : _a3.component) === "Select" || ((_b2 = column == null ? void 0 : column.editProps) == null ? void 0 : _b2.component) === "ApiSelect" ? (openBlock(), createElementBlock("span", _hoisted_1, [
22330
- createVNode(unref(CellComponent), mergeProps((column == null ? void 0 : column.editProps) || {}, {
22365
+ config.row._isEdit && (column == null ? void 0 : column.isEdit) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
22366
+ ((_a3 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _a3.component) === "Switch" ? (openBlock(), createBlock(unref(CellComponent), mergeProps({ key: 0 }, (column == null ? void 0 : column.editComponentProps) || {}, {
22367
+ checked: config.row[column.field],
22368
+ "onUpdate:checked": ($event) => config.row[column.field] = $event
22369
+ }), null, 16, ["checked", "onUpdate:checked"])) : (openBlock(), createBlock(unref(CellComponent), mergeProps({ key: 1 }, (column == null ? void 0 : column.editComponentProps) || {}, {
22370
+ value: config.row[column.field],
22371
+ "onUpdate:value": ($event) => config.row[column.field] = $event
22372
+ }), null, 16, ["value", "onUpdate:value"]))
22373
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
22374
+ (column == null ? void 0 : column.isEdit) && ((_b2 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _b2.component) === "Select" || ((_c2 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _c2.component) === "ApiSelect" ? (openBlock(), createElementBlock("span", _hoisted_1, [
22375
+ createVNode(unref(CellComponent), mergeProps((column == null ? void 0 : column.editComponentProps) || {}, {
22331
22376
  value: config.row[column.field],
22332
22377
  "onUpdate:value": ($event) => config.row[column.field] = $event,
22333
22378
  bordered: false,
@@ -22370,8 +22415,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22370
22415
  onEditCancel: ($event) => handleEditCancel(config.row),
22371
22416
  onUpdateStatusEdit: (isEdit) => {
22372
22417
  config.row._isEdit = isEdit;
22373
- }
22374
- }, null, 8, ["row", "onEditEnsure", "onEditCancel", "onUpdateStatusEdit"])) : createCommentVNode("", true)
22418
+ },
22419
+ onRowRemove: ($event) => handleRowRemove(config.row)
22420
+ }, null, 8, ["row", "onEditEnsure", "onEditCancel", "onUpdateStatusEdit", "onRowRemove"])) : createCommentVNode("", true)
22375
22421
  ])
22376
22422
  ])
22377
22423
  ]),
@@ -22441,7 +22487,8 @@ function useTablePlus(tableProps) {
22441
22487
  clearTreeExpand: () => getTableInstance().clearTreeExpand(),
22442
22488
  setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked),
22443
22489
  getVxeTableRef: () => getTableInstance().getVxeTableRef(),
22444
- setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked)
22490
+ setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked),
22491
+ addTableData: (list) => getTableInstance().addTableData(list)
22445
22492
  };
22446
22493
  return [register, methods2];
22447
22494
  }
package/es/style.css CHANGED
@@ -25696,13 +25696,13 @@ span.iconify {
25696
25696
  }
25697
25697
  .hide-scrollbar-y .ant-spin-nested-loading .ant-spin-container .ant-table .ant-table-content .ant-table-fixed-left .ant-table-body-outer .ant-table-body-inner {
25698
25698
  overflow-y: auto !important;
25699
- }.wrapper[data-v-dbd84c9c] {
25699
+ }.wrapper[data-v-4dc415ac] {
25700
25700
  display: flex;
25701
25701
  }
25702
- .tree[data-v-dbd84c9c] {
25702
+ .tree[data-v-4dc415ac] {
25703
25703
  flex: none;
25704
25704
  }
25705
- .table-wrapper[data-v-dbd84c9c] {
25705
+ .table-wrapper[data-v-4dc415ac] {
25706
25706
  flex: 1 1 0%;
25707
25707
  overflow: hidden;
25708
25708
  }[data-v-fb4fe18d] .ant-input-group-addon {
@@ -1,9 +1,11 @@
1
- export declare const useTableData: (getProps: any, { setPage, params }: {
1
+ export declare const useTableData: (getProps: any, { setPage, params, tableRef }: {
2
2
  setPage: any;
3
3
  params: any;
4
+ tableRef: any;
4
5
  }) => {
5
6
  dataSource: import("vue").Ref<any[]>;
6
7
  setTableData: (data: any) => void;
7
8
  reload: () => Promise<void>;
8
9
  getTableData: () => any[];
10
+ addTableData: (list?: {}[]) => void;
9
11
  };
package/lib/index.js CHANGED
@@ -8567,13 +8567,11 @@ function useFormEvents({
8567
8567
  value = handleInputNumberValue(schema == null ? void 0 : schema.component, value);
8568
8568
  if (hasKey && fields.includes(key2)) {
8569
8569
  if (itemIsDateType(key2)) {
8570
- console.log(1, key2);
8571
8570
  if (Array.isArray(value)) {
8572
8571
  const arr = [];
8573
8572
  for (const ele of value) {
8574
8573
  arr.push(ele ? ele : null);
8575
8574
  }
8576
- console.log("arr", arr);
8577
8575
  formModel[key2] = arr;
8578
8576
  } else {
8579
8577
  const { componentProps } = schema || {};
@@ -10616,7 +10614,6 @@ function useForm(props2) {
10616
10614
  const value = await form.validate(nameList);
10617
10615
  Object.keys(value).forEach((key2) => {
10618
10616
  if (value[key2] === void 0) {
10619
- console.log("key", key2);
10620
10617
  value[key2] = "";
10621
10618
  }
10622
10619
  });
@@ -16815,7 +16812,6 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
16815
16812
  await tableRef.value.setProps({
16816
16813
  searchInfo: { [vue.unref(getTableProps).searchKey]: key2 }
16817
16814
  });
16818
- console.log("unref(getTableProps).searchKey", vue.unref(getTableProps).searchKey);
16819
16815
  tableRef.value.reload();
16820
16816
  };
16821
16817
  const handleComfirm = () => {
@@ -16851,8 +16847,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
16851
16847
  };
16852
16848
  }
16853
16849
  });
16854
- const Modal_vue_vue_type_style_index_0_scoped_dbd84c9c_lang = "";
16855
- const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-dbd84c9c"]]);
16850
+ const Modal_vue_vue_type_style_index_0_scoped_4dc415ac_lang = "";
16851
+ const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-4dc415ac"]]);
16856
16852
  const _hoisted_1$9 = { class: "api-modal-select" };
16857
16853
  const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
16858
16854
  __name: "ApiModalSelect",
@@ -21269,7 +21265,7 @@ const usePagination = () => {
21269
21265
  };
21270
21266
  return { page, setPage };
21271
21267
  };
21272
- const useTableData = (getProps, { setPage, params }) => {
21268
+ const useTableData = (getProps, { setPage, params, tableRef }) => {
21273
21269
  const dataSource = vue.ref([]);
21274
21270
  const setTableData = (data) => {
21275
21271
  dataSource.value = data.map((item) => {
@@ -21288,6 +21284,14 @@ const useTableData = (getProps, { setPage, params }) => {
21288
21284
  setPage({ total: (res == null ? void 0 : res.total) || 0 });
21289
21285
  }
21290
21286
  };
21287
+ const addTableData = (list = [{}]) => {
21288
+ const temp = list.map((item) => {
21289
+ item._isEdit = true;
21290
+ return item;
21291
+ });
21292
+ dataSource.value.unshift(...temp);
21293
+ tableRef.value.loadData(dataSource.value);
21294
+ };
21291
21295
  vue.onMounted(async () => {
21292
21296
  if (getProps.value.isImmediate) {
21293
21297
  await reload();
@@ -21297,7 +21301,8 @@ const useTableData = (getProps, { setPage, params }) => {
21297
21301
  dataSource,
21298
21302
  setTableData,
21299
21303
  reload,
21300
- getTableData
21304
+ getTableData,
21305
+ addTableData
21301
21306
  };
21302
21307
  };
21303
21308
  const componentMap = /* @__PURE__ */ new Map();
@@ -21346,7 +21351,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
21346
21351
  default: null
21347
21352
  }
21348
21353
  },
21349
- emits: ["updateStatusEdit", "edit-ensure", "edit-cancel"],
21354
+ emits: [
21355
+ "updateStatusEdit",
21356
+ "edit-ensure",
21357
+ "edit-cancel",
21358
+ "row-remove"
21359
+ ],
21350
21360
  setup(__props, { emit }) {
21351
21361
  const props2 = __props;
21352
21362
  const getActions = vue.computed(() => {
@@ -21358,6 +21368,13 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
21358
21368
  },
21359
21369
  ifShow: props2.row._isEdit === false
21360
21370
  },
21371
+ {
21372
+ label: "删除",
21373
+ onClick: () => {
21374
+ emit("row-remove", true);
21375
+ },
21376
+ ifShow: props2.row._isEdit === false
21377
+ },
21361
21378
  {
21362
21379
  label: "确定",
21363
21380
  onClick: () => {
@@ -21379,6 +21396,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
21379
21396
  return (_ctx, _cache) => {
21380
21397
  return vue.openBlock(), vue.createBlock(_sfc_main$m, {
21381
21398
  actions: vue.unref(getActions),
21399
+ "show-count": 4,
21382
21400
  outside: true
21383
21401
  }, null, 8, ["actions"]);
21384
21402
  };
@@ -22092,7 +22110,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22092
22110
  "register",
22093
22111
  "selection-change",
22094
22112
  "row-ensure",
22095
- "row-cancel"
22113
+ "row-cancel",
22114
+ "row-remove"
22096
22115
  ],
22097
22116
  setup(__props, { emit: emits }) {
22098
22117
  const props2 = __props;
@@ -22116,7 +22135,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22116
22135
  innerProps.value = utils.deepMergeObjects(innerProps.value, props22);
22117
22136
  };
22118
22137
  const attrs = vue.useAttrs();
22119
- vue.useSlots();
22138
+ const slots = vue.useSlots();
22120
22139
  const getBindValues = vue.computed(() => {
22121
22140
  return utils.deepMergeObjects(basicProps, attrs, getProps.value);
22122
22141
  });
@@ -22137,6 +22156,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22137
22156
  rowProps: { gutter: 20 }
22138
22157
  };
22139
22158
  });
22159
+ const getFormSlotKeys = vue.computed(() => {
22160
+ const keys2 = Object.keys(slots);
22161
+ return keys2.map((item) => item.startsWith("form-") ? item : null).filter((item) => !!item);
22162
+ });
22163
+ function replaceFormSlotKey(key2) {
22164
+ var _a2;
22165
+ if (!key2)
22166
+ return "";
22167
+ return ((_a2 = key2 == null ? void 0 : key2.replace) == null ? void 0 : _a2.call(key2, /form-/, "")) ?? "";
22168
+ }
22140
22169
  const [registerForm, formActions] = useForm();
22141
22170
  const formSearch = vue.ref({});
22142
22171
  const handleSearchFormSubmit = (form) => {
@@ -22152,14 +22181,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22152
22181
  size: page.pageSize
22153
22182
  };
22154
22183
  });
22155
- const { dataSource, setTableData, reload, getTableData } = useTableData(
22156
- getProps,
22157
- {
22158
- setPage,
22159
- params
22160
- }
22161
- );
22162
22184
  const tableRef = vue.ref();
22185
+ const { dataSource, setTableData, reload, getTableData, addTableData } = useTableData(getProps, {
22186
+ setPage,
22187
+ params,
22188
+ tableRef
22189
+ });
22163
22190
  const handleCheckboxChange = () => {
22164
22191
  const records = tableRef.value.getCheckboxRecords();
22165
22192
  emits("selection-change", records);
@@ -22187,6 +22214,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22187
22214
  const handleEditCancel = (row) => {
22188
22215
  emits("row-cancel", row);
22189
22216
  };
22217
+ const handleRowRemove = (row) => {
22218
+ emits("row-remove", row);
22219
+ };
22190
22220
  const getTreeExpandRecords = () => {
22191
22221
  return vue.toRaw(tableRef.value.getTreeExpandRecords());
22192
22222
  };
@@ -22242,7 +22272,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22242
22272
  hideColumn,
22243
22273
  showColumn,
22244
22274
  resetColumn,
22245
- refreshColumn
22275
+ refreshColumn,
22276
+ addTableData
22246
22277
  };
22247
22278
  createTableContext({ ...tableAction });
22248
22279
  emits("register", tableAction, formActions);
@@ -22260,7 +22291,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22260
22291
  onReset: handleSearchFormSubmit,
22261
22292
  onAdvancedChange: _cache[0] || (_cache[0] = () => {
22262
22293
  })
22263
- }), null, 16, ["onRegister"])
22294
+ }), vue.createSlots({ _: 2 }, [
22295
+ vue.renderList(vue.unref(getFormSlotKeys), (item) => {
22296
+ return {
22297
+ name: replaceFormSlotKey(item),
22298
+ fn: vue.withCtx((data) => [
22299
+ vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
22300
+ ])
22301
+ };
22302
+ })
22303
+ ]), 1040, ["onRegister"])
22264
22304
  ], 2)) : vue.createCommentVNode("", true),
22265
22305
  vue.unref(getProps).isShowToolbar ? (vue.openBlock(), vue.createElementBlock("div", {
22266
22306
  key: 1,
@@ -22322,14 +22362,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22322
22362
  }), {
22323
22363
  default: vue.withCtx((config) => [
22324
22364
  vue.renderSlot(_ctx.$slots, column.field, vue.normalizeProps(vue.guardReactiveProps(config)), () => {
22325
- var _a3, _b2;
22365
+ var _a3, _b2, _c2;
22326
22366
  return [
22327
- config.row._isEdit && (column == null ? void 0 : column.isEdit) ? (vue.openBlock(), vue.createBlock(vue.unref(CellComponent), vue.mergeProps({ key: 0 }, (column == null ? void 0 : column.editProps) || {}, {
22328
- value: config.row[column.field],
22329
- "onUpdate:value": ($event) => config.row[column.field] = $event
22330
- }), null, 16, ["value", "onUpdate:value"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
22331
- (column == null ? void 0 : column.isEdit) && ((_a3 = column == null ? void 0 : column.editProps) == null ? void 0 : _a3.component) === "Select" || ((_b2 = column == null ? void 0 : column.editProps) == null ? void 0 : _b2.component) === "ApiSelect" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
22332
- vue.createVNode(vue.unref(CellComponent), vue.mergeProps((column == null ? void 0 : column.editProps) || {}, {
22367
+ config.row._isEdit && (column == null ? void 0 : column.isEdit) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
22368
+ ((_a3 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _a3.component) === "Switch" ? (vue.openBlock(), vue.createBlock(vue.unref(CellComponent), vue.mergeProps({ key: 0 }, (column == null ? void 0 : column.editComponentProps) || {}, {
22369
+ checked: config.row[column.field],
22370
+ "onUpdate:checked": ($event) => config.row[column.field] = $event
22371
+ }), null, 16, ["checked", "onUpdate:checked"])) : (vue.openBlock(), vue.createBlock(vue.unref(CellComponent), vue.mergeProps({ key: 1 }, (column == null ? void 0 : column.editComponentProps) || {}, {
22372
+ value: config.row[column.field],
22373
+ "onUpdate:value": ($event) => config.row[column.field] = $event
22374
+ }), null, 16, ["value", "onUpdate:value"]))
22375
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
22376
+ (column == null ? void 0 : column.isEdit) && ((_b2 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _b2.component) === "Select" || ((_c2 = column == null ? void 0 : column.editComponentProps) == null ? void 0 : _c2.component) === "ApiSelect" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
22377
+ vue.createVNode(vue.unref(CellComponent), vue.mergeProps((column == null ? void 0 : column.editComponentProps) || {}, {
22333
22378
  value: config.row[column.field],
22334
22379
  "onUpdate:value": ($event) => config.row[column.field] = $event,
22335
22380
  bordered: false,
@@ -22372,8 +22417,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22372
22417
  onEditCancel: ($event) => handleEditCancel(config.row),
22373
22418
  onUpdateStatusEdit: (isEdit) => {
22374
22419
  config.row._isEdit = isEdit;
22375
- }
22376
- }, null, 8, ["row", "onEditEnsure", "onEditCancel", "onUpdateStatusEdit"])) : vue.createCommentVNode("", true)
22420
+ },
22421
+ onRowRemove: ($event) => handleRowRemove(config.row)
22422
+ }, null, 8, ["row", "onEditEnsure", "onEditCancel", "onUpdateStatusEdit", "onRowRemove"])) : vue.createCommentVNode("", true)
22377
22423
  ])
22378
22424
  ])
22379
22425
  ]),
@@ -22443,7 +22489,8 @@ function useTablePlus(tableProps) {
22443
22489
  clearTreeExpand: () => getTableInstance().clearTreeExpand(),
22444
22490
  setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked),
22445
22491
  getVxeTableRef: () => getTableInstance().getVxeTableRef(),
22446
- setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked)
22492
+ setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked),
22493
+ addTableData: (list) => getTableInstance().addTableData(list)
22447
22494
  };
22448
22495
  return [register, methods2];
22449
22496
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
4
4
  "description": "",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",