3h1-ui 3.0.0-next.247 → 3.0.0-next.249

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
@@ -11737,7 +11737,7 @@ const FormItem$2 = /* @__PURE__ */ defineComponent({
11737
11737
  schema: schema2,
11738
11738
  tableAction: tableAction2,
11739
11739
  formModel,
11740
- formActionType: formActionType2
11740
+ formActionType
11741
11741
  } = props2;
11742
11742
  let {
11743
11743
  componentProps = {}
@@ -11747,7 +11747,7 @@ const FormItem$2 = /* @__PURE__ */ defineComponent({
11747
11747
  schema: schema2,
11748
11748
  tableAction: tableAction2,
11749
11749
  formModel,
11750
- formActionType: formActionType2
11750
+ formActionType
11751
11751
  }) ?? {};
11752
11752
  }
11753
11753
  if (schema2.component === "Divider") {
@@ -12410,7 +12410,6 @@ function useFormValues({
12410
12410
  }
12411
12411
  return { handleFormValues, initDefault };
12412
12412
  }
12413
- const formActionType = inject("formActionType");
12414
12413
  function useFormEvents({
12415
12414
  emit,
12416
12415
  getProps,
@@ -12419,8 +12418,7 @@ function useFormEvents({
12419
12418
  defaultValueRef,
12420
12419
  formElRef,
12421
12420
  schemaRef,
12422
- handleFormValues,
12423
- tableAction: tableAction2
12421
+ handleFormValues
12424
12422
  }) {
12425
12423
  async function resetFields() {
12426
12424
  const { resetFunc, submitOnReset } = unref(getProps);
@@ -12616,46 +12614,20 @@ function useFormEvents({
12616
12614
  return;
12617
12615
  }
12618
12616
  const schema = [];
12619
- const processedMap = /* @__PURE__ */ new WeakMap();
12620
- function processSchemas(schemas, context = {}) {
12621
- return schemas.map((schemaItem) => {
12622
- const matched = updateData.find(
12623
- (item) => item.field === schemaItem.field
12624
- );
12625
- const merged = matched ? deepMerge$2(schemaItem, matched) : { ...schemaItem };
12626
- if (processedMap.has(merged))
12627
- return processedMap.get(merged);
12628
- const rawComponentProps = merged.componentProps;
12629
- if (typeof rawComponentProps === "function" && merged.component === "Group") {
12630
- merged.componentProps = (ctx) => {
12631
- const result = rawComponentProps(ctx);
12632
- if (Array.isArray(result.schemas)) {
12633
- return {
12634
- ...result,
12635
- schemas: processSchemas(result.schemas, ctx)
12636
- };
12637
- }
12638
- return result;
12639
- };
12640
- }
12641
- if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
12642
- merged.componentProps = {
12643
- ...rawComponentProps,
12644
- schemas: processSchemas(rawComponentProps.schemas, context)
12645
- };
12617
+ unref(getSchema).forEach((val) => {
12618
+ let _val;
12619
+ updateData.forEach((item) => {
12620
+ if (val.field === item.field) {
12621
+ _val = item;
12646
12622
  }
12647
- processedMap.set(merged, merged);
12648
- return merged;
12649
12623
  });
12650
- }
12651
- const rawSchemas = unref(getSchema);
12652
- schema.push(
12653
- ...processSchemas(rawSchemas, {
12654
- formModel,
12655
- formActionType,
12656
- tableAction: tableAction2
12657
- })
12658
- );
12624
+ if (_val !== void 0 && val.field === _val.field) {
12625
+ const newSchema = deepMerge$2(val, _val);
12626
+ schema.push(newSchema);
12627
+ } else {
12628
+ schema.push(val);
12629
+ }
12630
+ });
12659
12631
  _setDefaultValue(schema);
12660
12632
  schemaRef.value = uniqBy(schema, "field");
12661
12633
  }
@@ -25854,8 +25826,7 @@ const ShyForm = /* @__PURE__ */ defineComponent({
25854
25826
  formElRef,
25855
25827
  //@ts-ignore
25856
25828
  schemaRef,
25857
- handleFormValues,
25858
- tableAction: props2.tableAction
25829
+ handleFormValues
25859
25830
  });
25860
25831
  createFormContext({
25861
25832
  resetAction: resetFields,
@@ -25895,27 +25866,28 @@ const ShyForm = /* @__PURE__ */ defineComponent({
25895
25866
  for (const key2 in val) {
25896
25867
  let handleSchemas = function(schemas = []) {
25897
25868
  schemas.forEach((item) => {
25898
- const isTargetField = item.field === key2;
25899
- context.schema = item;
25900
- const rawComponentProps = item.componentProps;
25901
- const resolvedProps = isFunction$5(rawComponentProps) ? rawComponentProps(context) : rawComponentProps;
25902
- if (isTargetField && (resolvedProps == null ? void 0 : resolvedProps.onModelChange)) {
25903
- resolvedProps.onModelChange(val[key2]);
25869
+ var _a2, _b;
25870
+ const isComponentProps = item.field === key2 && item.componentProps;
25871
+ if (isComponentProps && !isFunction$5(item.componentProps) && ((_a2 = item.componentProps) == null ? void 0 : _a2.onModelChange)) {
25872
+ item.componentProps.onModelChange(val[key2]);
25873
+ } else if (isComponentProps && isFunction$5(item.componentProps)) {
25874
+ const modelProps = item.componentProps({
25875
+ schema: item,
25876
+ formModel,
25877
+ formActionType,
25878
+ tableAction: props2.tableAction
25879
+ });
25880
+ if (modelProps.onModelChange) {
25881
+ modelProps.onModelChange(val[key2]);
25882
+ }
25904
25883
  }
25905
- if (item.component === "Group" && resolvedProps && Array.isArray(resolvedProps.schemas)) {
25906
- handleSchemas(resolvedProps.schemas);
25884
+ if (item.component === "Group" && ((_b = item.componentProps) == null ? void 0 : _b.schemas)) {
25885
+ handleSchemas(item.componentProps.schemas);
25907
25886
  }
25908
25887
  });
25909
25888
  };
25910
25889
  if (isEqual(toRaw(val[key2]), toRaw(tempFormModel[key2])))
25911
25890
  continue;
25912
- const context = {
25913
- schema: {},
25914
- // 每次赋值
25915
- formModel,
25916
- formActionType: formActionType2,
25917
- tableAction: props2.tableAction
25918
- };
25919
25891
  handleSchemas(unref(getProps).schemas);
25920
25892
  }
25921
25893
  Object.assign(tempFormModel, cloneDeep(formModel));
@@ -25952,7 +25924,7 @@ const ShyForm = /* @__PURE__ */ defineComponent({
25952
25924
  ;
25953
25925
  }
25954
25926
  }
25955
- const formActionType2 = {
25927
+ const formActionType = {
25956
25928
  getFieldsValue,
25957
25929
  setFieldsValue,
25958
25930
  resetFields,
@@ -25967,7 +25939,7 @@ const ShyForm = /* @__PURE__ */ defineComponent({
25967
25939
  validate,
25968
25940
  scrollToField
25969
25941
  };
25970
- provide("formActionType", formActionType2);
25942
+ provide("formActionType", formActionType);
25971
25943
  const isTableForm = computed(() => {
25972
25944
  return !!unref(getBindValue).tableAction;
25973
25945
  });
@@ -26057,7 +26029,7 @@ const ShyForm = /* @__PURE__ */ defineComponent({
26057
26029
  };
26058
26030
  onMounted(() => {
26059
26031
  initDefault();
26060
- emit("register", formActionType2);
26032
+ emit("register", formActionType);
26061
26033
  });
26062
26034
  return () => {
26063
26035
  const ignoreKeys = ["resetBefore", "submitBefore", "advanceBefore", "advanceAfter", "advancedSearch"];
@@ -26095,7 +26067,7 @@ const ShyForm = /* @__PURE__ */ defineComponent({
26095
26067
  const realSpan = (((_a2 = schema.colProps) == null ? void 0 : _a2.span) ?? ((_c = (_b = unref(getBindValue)) == null ? void 0 : _b.baseColProps) == null ? void 0 : _c.span)) / (unref(ROW_SLICE2) + unref(ACTION_COL2));
26096
26068
  return createVNode(FormItem$2, {
26097
26069
  "tableAction": props2.tableAction,
26098
- "formActionType": formActionType2,
26070
+ "formActionType": formActionType,
26099
26071
  "schema": schema,
26100
26072
  "formProps": getProps.value,
26101
26073
  "allDefaultValues": defaultValueRef.value,
@@ -28275,7 +28247,7 @@ const EQUAL_OPERATOR_OPTIONS = ALL_OPERATOR_OPTION.filter(
28275
28247
  const CONTAIN_OPERATOR_OPTIONS = ALL_OPERATOR_OPTION.filter(
28276
28248
  (item) => ["ct"].includes(item.value)
28277
28249
  );
28278
- const useAdvancedSearch = (schemas, formActionType2) => {
28250
+ const useAdvancedSearch = (schemas, formActionType) => {
28279
28251
  const getSchemaOptions = (type4) => {
28280
28252
  switch (type4) {
28281
28253
  case "number":
@@ -28363,7 +28335,7 @@ const useAdvancedSearch = (schemas, formActionType2) => {
28363
28335
  removeSchemaByField,
28364
28336
  updateSchema,
28365
28337
  setFieldsValue
28366
- } = formActionType2;
28338
+ } = formActionType;
28367
28339
  const {
28368
28340
  schemas: [operatorSchema, valueSchema]
28369
28341
  } = componentProps;
@@ -32091,7 +32063,7 @@ const ShyFormTable = /* @__PURE__ */ defineComponent({
32091
32063
  const {
32092
32064
  prefixCls: prefixCls2
32093
32065
  } = useDesign$1("ant-form-table-children");
32094
- const formActionType2 = inject("formActionType");
32066
+ const formActionType = inject("formActionType");
32095
32067
  const tableWrapperRef = ref();
32096
32068
  const tableElRef = ref();
32097
32069
  const curIndex = ref(0);
@@ -32417,7 +32389,7 @@ const ShyFormTable = /* @__PURE__ */ defineComponent({
32417
32389
  column: column2,
32418
32390
  record,
32419
32391
  ...args
32420
- }, formActionType2);
32392
+ }, formActionType);
32421
32393
  } catch (error2) {
32422
32394
  rulesRef[errKey].show = true;
32423
32395
  rulesRef[errKey].msg = error2;
@@ -35755,7 +35727,7 @@ const Group = /* @__PURE__ */ defineComponent({
35755
35727
  schema,
35756
35728
  tableAction: tableAction2,
35757
35729
  formModel,
35758
- formActionType: formActionType2
35730
+ formActionType
35759
35731
  } = props2;
35760
35732
  let {
35761
35733
  componentProps: _componentProps,
@@ -35767,7 +35739,7 @@ const Group = /* @__PURE__ */ defineComponent({
35767
35739
  schema,
35768
35740
  tableAction: tableAction2,
35769
35741
  formModel,
35770
- formActionType: formActionType2
35742
+ formActionType
35771
35743
  }) ?? {};
35772
35744
  }
35773
35745
  const realSpan = (((_a2 = schema.colProps) == null ? void 0 : _a2.span) ?? ((_c = (_b = unref(contextBindValue)) == null ? void 0 : _b.baseColProps) == null ? void 0 : _c.span)) / (unref(ROW_SLICE) + unref(ACTION_COL));
@@ -35918,7 +35890,7 @@ const FormItem = /* @__PURE__ */ defineComponent({
35918
35890
  const {
35919
35891
  schema,
35920
35892
  formModel,
35921
- formActionType: formActionType2
35893
+ formActionType
35922
35894
  } = props2;
35923
35895
  let {
35924
35896
  componentProps = {}
@@ -35927,7 +35899,7 @@ const FormItem = /* @__PURE__ */ defineComponent({
35927
35899
  componentProps = componentProps({
35928
35900
  schema,
35929
35901
  formModel,
35930
- formActionType: formActionType2
35902
+ formActionType
35931
35903
  }) ?? {};
35932
35904
  }
35933
35905
  if (schema.component === "Divider") {
@@ -41547,7 +41519,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
41547
41519
  type: "number"
41548
41520
  },
41549
41521
  { label: "生日", field: "birth", type: "date" }
41550
- ] }
41522
+ ] },
41523
+ filterKeys: { default: () => [] }
41551
41524
  },
41552
41525
  setup(__props, { expose: __expose }) {
41553
41526
  const props2 = __props;
@@ -41613,18 +41586,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
41613
41586
  };
41614
41587
  const getSearchType = (field) => {
41615
41588
  const type4 = getTypeByField(field);
41589
+ let searchType2 = [];
41616
41590
  switch (type4) {
41617
41591
  case "number":
41618
- return searchTypeNumber;
41592
+ searchType2 = searchTypeNumber;
41593
+ break;
41619
41594
  case "string":
41620
- return searchTypeString;
41595
+ searchType2 = searchTypeString;
41596
+ break;
41621
41597
  case "date":
41622
- return searchTypeDate;
41598
+ searchType2 = searchTypeDate;
41599
+ break;
41623
41600
  case "select":
41624
- return searchTypeSelect;
41601
+ searchType2 = searchTypeSelect;
41602
+ break;
41625
41603
  case "stringSelect":
41626
- return stringSearchTypeSelect;
41604
+ searchType2 = stringSearchTypeSelect;
41605
+ break;
41627
41606
  }
41607
+ return searchType2.filter((item) => !props2.filterKeys.includes(item.value));
41628
41608
  };
41629
41609
  const getComponent2 = (field) => {
41630
41610
  const column2 = props2.schemas.find((schema) => {
@@ -49548,7 +49528,7 @@ const Descriptions = /* @__PURE__ */ defineComponent({
49548
49528
  model: data,
49549
49529
  values: data,
49550
49530
  schema: item,
49551
- transformValue
49531
+ transformValue: unref(transformValue)
49552
49532
  };
49553
49533
  };
49554
49534
  });
@@ -10,9 +10,8 @@ interface UseFormActionContext {
10
10
  formElRef: Ref<FormActionType>;
11
11
  schemaRef: Ref<FormSchema[]>;
12
12
  handleFormValues: Fn;
13
- tableAction?: any;
14
13
  }
15
- export declare function useFormEvents({ emit, getProps, formModel, getSchema, defaultValueRef, formElRef, schemaRef, handleFormValues, tableAction }: UseFormActionContext): {
14
+ export declare function useFormEvents({ emit, getProps, formModel, getSchema, defaultValueRef, formElRef, schemaRef, handleFormValues }: UseFormActionContext): {
16
15
  handleSubmit: (e?: Event) => Promise<void>;
17
16
  clearValidate: (name?: string | string[]) => Promise<void>;
18
17
  validate: (nameList?: NamePath[] | undefined) => Promise<any>;
package/lib/index.js CHANGED
@@ -11761,7 +11761,7 @@ const FormItem$2 = /* @__PURE__ */ vue.defineComponent({
11761
11761
  schema: schema2,
11762
11762
  tableAction: tableAction2,
11763
11763
  formModel,
11764
- formActionType: formActionType2
11764
+ formActionType
11765
11765
  } = props2;
11766
11766
  let {
11767
11767
  componentProps = {}
@@ -11771,7 +11771,7 @@ const FormItem$2 = /* @__PURE__ */ vue.defineComponent({
11771
11771
  schema: schema2,
11772
11772
  tableAction: tableAction2,
11773
11773
  formModel,
11774
- formActionType: formActionType2
11774
+ formActionType
11775
11775
  }) ?? {};
11776
11776
  }
11777
11777
  if (schema2.component === "Divider") {
@@ -12434,7 +12434,6 @@ function useFormValues({
12434
12434
  }
12435
12435
  return { handleFormValues, initDefault };
12436
12436
  }
12437
- const formActionType = vue.inject("formActionType");
12438
12437
  function useFormEvents({
12439
12438
  emit,
12440
12439
  getProps,
@@ -12443,8 +12442,7 @@ function useFormEvents({
12443
12442
  defaultValueRef,
12444
12443
  formElRef,
12445
12444
  schemaRef,
12446
- handleFormValues,
12447
- tableAction: tableAction2
12445
+ handleFormValues
12448
12446
  }) {
12449
12447
  async function resetFields() {
12450
12448
  const { resetFunc, submitOnReset } = vue.unref(getProps);
@@ -12640,46 +12638,20 @@ function useFormEvents({
12640
12638
  return;
12641
12639
  }
12642
12640
  const schema = [];
12643
- const processedMap = /* @__PURE__ */ new WeakMap();
12644
- function processSchemas(schemas, context = {}) {
12645
- return schemas.map((schemaItem) => {
12646
- const matched = updateData.find(
12647
- (item) => item.field === schemaItem.field
12648
- );
12649
- const merged = matched ? utils$1.deepMerge(schemaItem, matched) : { ...schemaItem };
12650
- if (processedMap.has(merged))
12651
- return processedMap.get(merged);
12652
- const rawComponentProps = merged.componentProps;
12653
- if (typeof rawComponentProps === "function" && merged.component === "Group") {
12654
- merged.componentProps = (ctx) => {
12655
- const result = rawComponentProps(ctx);
12656
- if (Array.isArray(result.schemas)) {
12657
- return {
12658
- ...result,
12659
- schemas: processSchemas(result.schemas, ctx)
12660
- };
12661
- }
12662
- return result;
12663
- };
12664
- }
12665
- if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
12666
- merged.componentProps = {
12667
- ...rawComponentProps,
12668
- schemas: processSchemas(rawComponentProps.schemas, context)
12669
- };
12641
+ vue.unref(getSchema).forEach((val) => {
12642
+ let _val;
12643
+ updateData.forEach((item) => {
12644
+ if (val.field === item.field) {
12645
+ _val = item;
12670
12646
  }
12671
- processedMap.set(merged, merged);
12672
- return merged;
12673
12647
  });
12674
- }
12675
- const rawSchemas = vue.unref(getSchema);
12676
- schema.push(
12677
- ...processSchemas(rawSchemas, {
12678
- formModel,
12679
- formActionType,
12680
- tableAction: tableAction2
12681
- })
12682
- );
12648
+ if (_val !== void 0 && val.field === _val.field) {
12649
+ const newSchema = utils$1.deepMerge(val, _val);
12650
+ schema.push(newSchema);
12651
+ } else {
12652
+ schema.push(val);
12653
+ }
12654
+ });
12683
12655
  _setDefaultValue(schema);
12684
12656
  schemaRef.value = uniqBy(schema, "field");
12685
12657
  }
@@ -25878,8 +25850,7 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
25878
25850
  formElRef,
25879
25851
  //@ts-ignore
25880
25852
  schemaRef,
25881
- handleFormValues,
25882
- tableAction: props2.tableAction
25853
+ handleFormValues
25883
25854
  });
25884
25855
  createFormContext({
25885
25856
  resetAction: resetFields,
@@ -25919,27 +25890,28 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
25919
25890
  for (const key2 in val) {
25920
25891
  let handleSchemas = function(schemas = []) {
25921
25892
  schemas.forEach((item) => {
25922
- const isTargetField = item.field === key2;
25923
- context.schema = item;
25924
- const rawComponentProps = item.componentProps;
25925
- const resolvedProps = isFunction$5(rawComponentProps) ? rawComponentProps(context) : rawComponentProps;
25926
- if (isTargetField && (resolvedProps == null ? void 0 : resolvedProps.onModelChange)) {
25927
- resolvedProps.onModelChange(val[key2]);
25893
+ var _a2, _b;
25894
+ const isComponentProps = item.field === key2 && item.componentProps;
25895
+ if (isComponentProps && !isFunction$5(item.componentProps) && ((_a2 = item.componentProps) == null ? void 0 : _a2.onModelChange)) {
25896
+ item.componentProps.onModelChange(val[key2]);
25897
+ } else if (isComponentProps && isFunction$5(item.componentProps)) {
25898
+ const modelProps = item.componentProps({
25899
+ schema: item,
25900
+ formModel,
25901
+ formActionType,
25902
+ tableAction: props2.tableAction
25903
+ });
25904
+ if (modelProps.onModelChange) {
25905
+ modelProps.onModelChange(val[key2]);
25906
+ }
25928
25907
  }
25929
- if (item.component === "Group" && resolvedProps && Array.isArray(resolvedProps.schemas)) {
25930
- handleSchemas(resolvedProps.schemas);
25908
+ if (item.component === "Group" && ((_b = item.componentProps) == null ? void 0 : _b.schemas)) {
25909
+ handleSchemas(item.componentProps.schemas);
25931
25910
  }
25932
25911
  });
25933
25912
  };
25934
25913
  if (isEqual(vue.toRaw(val[key2]), vue.toRaw(tempFormModel[key2])))
25935
25914
  continue;
25936
- const context = {
25937
- schema: {},
25938
- // 每次赋值
25939
- formModel,
25940
- formActionType: formActionType2,
25941
- tableAction: props2.tableAction
25942
- };
25943
25915
  handleSchemas(vue.unref(getProps).schemas);
25944
25916
  }
25945
25917
  Object.assign(tempFormModel, cloneDeep(formModel));
@@ -25976,7 +25948,7 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
25976
25948
  ;
25977
25949
  }
25978
25950
  }
25979
- const formActionType2 = {
25951
+ const formActionType = {
25980
25952
  getFieldsValue,
25981
25953
  setFieldsValue,
25982
25954
  resetFields,
@@ -25991,7 +25963,7 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
25991
25963
  validate,
25992
25964
  scrollToField
25993
25965
  };
25994
- vue.provide("formActionType", formActionType2);
25966
+ vue.provide("formActionType", formActionType);
25995
25967
  const isTableForm = vue.computed(() => {
25996
25968
  return !!vue.unref(getBindValue).tableAction;
25997
25969
  });
@@ -26081,7 +26053,7 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
26081
26053
  };
26082
26054
  vue.onMounted(() => {
26083
26055
  initDefault();
26084
- emit("register", formActionType2);
26056
+ emit("register", formActionType);
26085
26057
  });
26086
26058
  return () => {
26087
26059
  const ignoreKeys = ["resetBefore", "submitBefore", "advanceBefore", "advanceAfter", "advancedSearch"];
@@ -26119,7 +26091,7 @@ const ShyForm = /* @__PURE__ */ vue.defineComponent({
26119
26091
  const realSpan = (((_a2 = schema.colProps) == null ? void 0 : _a2.span) ?? ((_c = (_b = vue.unref(getBindValue)) == null ? void 0 : _b.baseColProps) == null ? void 0 : _c.span)) / (vue.unref(ROW_SLICE2) + vue.unref(ACTION_COL2));
26120
26092
  return vue.createVNode(FormItem$2, {
26121
26093
  "tableAction": props2.tableAction,
26122
- "formActionType": formActionType2,
26094
+ "formActionType": formActionType,
26123
26095
  "schema": schema,
26124
26096
  "formProps": getProps.value,
26125
26097
  "allDefaultValues": defaultValueRef.value,
@@ -28299,7 +28271,7 @@ const EQUAL_OPERATOR_OPTIONS = ALL_OPERATOR_OPTION.filter(
28299
28271
  const CONTAIN_OPERATOR_OPTIONS = ALL_OPERATOR_OPTION.filter(
28300
28272
  (item) => ["ct"].includes(item.value)
28301
28273
  );
28302
- const useAdvancedSearch = (schemas, formActionType2) => {
28274
+ const useAdvancedSearch = (schemas, formActionType) => {
28303
28275
  const getSchemaOptions = (type4) => {
28304
28276
  switch (type4) {
28305
28277
  case "number":
@@ -28387,7 +28359,7 @@ const useAdvancedSearch = (schemas, formActionType2) => {
28387
28359
  removeSchemaByField,
28388
28360
  updateSchema,
28389
28361
  setFieldsValue
28390
- } = formActionType2;
28362
+ } = formActionType;
28391
28363
  const {
28392
28364
  schemas: [operatorSchema, valueSchema]
28393
28365
  } = componentProps;
@@ -32115,7 +32087,7 @@ const ShyFormTable = /* @__PURE__ */ vue.defineComponent({
32115
32087
  const {
32116
32088
  prefixCls: prefixCls2
32117
32089
  } = use.useDesign("ant-form-table-children");
32118
- const formActionType2 = vue.inject("formActionType");
32090
+ const formActionType = vue.inject("formActionType");
32119
32091
  const tableWrapperRef = vue.ref();
32120
32092
  const tableElRef = vue.ref();
32121
32093
  const curIndex = vue.ref(0);
@@ -32441,7 +32413,7 @@ const ShyFormTable = /* @__PURE__ */ vue.defineComponent({
32441
32413
  column: column2,
32442
32414
  record,
32443
32415
  ...args
32444
- }, formActionType2);
32416
+ }, formActionType);
32445
32417
  } catch (error2) {
32446
32418
  rulesRef[errKey].show = true;
32447
32419
  rulesRef[errKey].msg = error2;
@@ -35779,7 +35751,7 @@ const Group = /* @__PURE__ */ vue.defineComponent({
35779
35751
  schema,
35780
35752
  tableAction: tableAction2,
35781
35753
  formModel,
35782
- formActionType: formActionType2
35754
+ formActionType
35783
35755
  } = props2;
35784
35756
  let {
35785
35757
  componentProps: _componentProps,
@@ -35791,7 +35763,7 @@ const Group = /* @__PURE__ */ vue.defineComponent({
35791
35763
  schema,
35792
35764
  tableAction: tableAction2,
35793
35765
  formModel,
35794
- formActionType: formActionType2
35766
+ formActionType
35795
35767
  }) ?? {};
35796
35768
  }
35797
35769
  const realSpan = (((_a2 = schema.colProps) == null ? void 0 : _a2.span) ?? ((_c = (_b = vue.unref(contextBindValue)) == null ? void 0 : _b.baseColProps) == null ? void 0 : _c.span)) / (vue.unref(ROW_SLICE) + vue.unref(ACTION_COL));
@@ -35942,7 +35914,7 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
35942
35914
  const {
35943
35915
  schema,
35944
35916
  formModel,
35945
- formActionType: formActionType2
35917
+ formActionType
35946
35918
  } = props2;
35947
35919
  let {
35948
35920
  componentProps = {}
@@ -35951,7 +35923,7 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
35951
35923
  componentProps = componentProps({
35952
35924
  schema,
35953
35925
  formModel,
35954
- formActionType: formActionType2
35926
+ formActionType
35955
35927
  }) ?? {};
35956
35928
  }
35957
35929
  if (schema.component === "Divider") {
@@ -41571,7 +41543,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
41571
41543
  type: "number"
41572
41544
  },
41573
41545
  { label: "生日", field: "birth", type: "date" }
41574
- ] }
41546
+ ] },
41547
+ filterKeys: { default: () => [] }
41575
41548
  },
41576
41549
  setup(__props, { expose: __expose }) {
41577
41550
  const props2 = __props;
@@ -41637,18 +41610,25 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
41637
41610
  };
41638
41611
  const getSearchType = (field) => {
41639
41612
  const type4 = getTypeByField(field);
41613
+ let searchType2 = [];
41640
41614
  switch (type4) {
41641
41615
  case "number":
41642
- return searchTypeNumber;
41616
+ searchType2 = searchTypeNumber;
41617
+ break;
41643
41618
  case "string":
41644
- return searchTypeString;
41619
+ searchType2 = searchTypeString;
41620
+ break;
41645
41621
  case "date":
41646
- return searchTypeDate;
41622
+ searchType2 = searchTypeDate;
41623
+ break;
41647
41624
  case "select":
41648
- return searchTypeSelect;
41625
+ searchType2 = searchTypeSelect;
41626
+ break;
41649
41627
  case "stringSelect":
41650
- return stringSearchTypeSelect;
41628
+ searchType2 = stringSearchTypeSelect;
41629
+ break;
41651
41630
  }
41631
+ return searchType2.filter((item) => !props2.filterKeys.includes(item.value));
41652
41632
  };
41653
41633
  const getComponent2 = (field) => {
41654
41634
  const column2 = props2.schemas.find((schema) => {
@@ -49572,7 +49552,7 @@ const Descriptions = /* @__PURE__ */ vue.defineComponent({
49572
49552
  model: data,
49573
49553
  values: data,
49574
49554
  schema: item,
49575
- transformValue
49555
+ transformValue: vue.unref(transformValue)
49576
49556
  };
49577
49557
  };
49578
49558
  });
@@ -10,9 +10,8 @@ interface UseFormActionContext {
10
10
  formElRef: Ref<FormActionType>;
11
11
  schemaRef: Ref<FormSchema[]>;
12
12
  handleFormValues: Fn;
13
- tableAction?: any;
14
13
  }
15
- export declare function useFormEvents({ emit, getProps, formModel, getSchema, defaultValueRef, formElRef, schemaRef, handleFormValues, tableAction }: UseFormActionContext): {
14
+ export declare function useFormEvents({ emit, getProps, formModel, getSchema, defaultValueRef, formElRef, schemaRef, handleFormValues }: UseFormActionContext): {
16
15
  handleSubmit: (e?: Event) => Promise<void>;
17
16
  clearValidate: (name?: string | string[]) => Promise<void>;
18
17
  validate: (nameList?: NamePath[] | undefined) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "3.0.0-next.247",
3
+ "version": "3.0.0-next.249",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",