@qin-ui/antd-vue-pro 1.0.7 → 1.0.9

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.
@@ -1,4 +1,6 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
+ import "ant-design-vue";
3
+ import { INJECT_COMPONENT_PROPS_KEYS } from "../form/index.js";
2
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
5
  __name: "index",
4
6
  props: {
@@ -8,8 +10,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
10
  const props = __props;
9
11
  if (props.componentVars) {
10
12
  Object.values(props.componentVars).forEach((item) => {
13
+ const injectKeys = { ...INJECT_COMPONENT_PROPS_KEYS };
11
14
  Object.entries(item).forEach(([key, value]) => {
12
- provide(key, value);
15
+ if (Object.hasOwn(injectKeys, key)) {
16
+ provide(injectKeys[key], value);
17
+ }
13
18
  });
14
19
  });
15
20
  }
package/es/form/index.js CHANGED
@@ -15735,7 +15735,7 @@ const INJECT_COMPONENT_PROPS_KEYS = {
15735
15735
  const PROPS_KEYS = INJECT_COMPONENT_PROPS_KEYS;
15736
15736
  const INIT_COMPONENT_PROPS_MAP = /* @__PURE__ */ new Map([
15737
15737
  [PROPS_KEYS.input, { maxlength: 100, allowClear: true }],
15738
- [PROPS_KEYS.textarea, { maxlength: 200, autosize: { minRows: 3, maxRows: 6 }, showCount: true, allowClear: true }],
15738
+ [PROPS_KEYS.textarea, { maxlength: 200, autoSize: { minRows: 3, maxRows: 6 }, showCount: true, allowClear: true }],
15739
15739
  [PROPS_KEYS["input-password"], { maxlength: 100, allowClear: true }],
15740
15740
  [PROPS_KEYS["input-number"], { max: 10 ** 15 - 1, min: -(10 ** 15 + 1), controls: false, allowClear: true }],
15741
15741
  [PROPS_KEYS.select, { allowClear: true }],
@@ -15884,7 +15884,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15884
15884
  return {
15885
15885
  name,
15886
15886
  fn: withCtx(() => [
15887
- unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, { path: _ctx.path }, { component: slot }), null, 16, ["component"])) : createCommentVNode("", true)
15887
+ unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, { path: getPath(field.key) }, { component: slot }), null, 16, ["component"])) : createCommentVNode("", true)
15888
15888
  ])
15889
15889
  };
15890
15890
  })
@@ -15912,7 +15912,7 @@ const generateFieldMap = (fields, prePath = "", preFieldPath = "", fieldMap = {}
15912
15912
  path = field.key || "";
15913
15913
  }
15914
15914
  const fieldPath = `${preFieldPath || ""}[${index2}]`;
15915
- if (path) {
15915
+ if (path && !fieldMap[path]) {
15916
15916
  fieldMap[path] = { field, fieldPath };
15917
15917
  }
15918
15918
  if (field.fields) {
package/es/index.d.ts CHANGED
@@ -228,7 +228,7 @@ export declare type Condition = {
228
228
  disabled?: boolean;
229
229
  };
230
230
 
231
- export declare type ContainerComponent = FunctionalComponent | DefineComponent;
231
+ export declare type ContainerComponent = FunctionalComponent<Pick<RenderProps, 'path'>> | DefineComponent<Pick<RenderProps, 'path'>>;
232
232
 
233
233
  export declare const ContainerFragment: __VLS_WithTemplateSlots_2<DefineComponent<{
234
234
  component: {
@@ -257,7 +257,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
257
257
  type: PropType<string>;
258
258
  };
259
259
  size: {
260
- type: PropType<"middle" | "small" | "large">;
260
+ type: PropType<"small" | "middle" | "large">;
261
261
  };
262
262
  disabled: {
263
263
  type: PropType<boolean>;
@@ -434,7 +434,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
434
434
  type: PropType<string>;
435
435
  };
436
436
  size: {
437
- type: PropType<"middle" | "small" | "large">;
437
+ type: PropType<"small" | "middle" | "large">;
438
438
  };
439
439
  disabled: {
440
440
  type: PropType<boolean>;
@@ -730,7 +730,7 @@ export declare type Grid = boolean | RowProps;
730
730
  export declare const INIT_COMPONENT_PROPS_MAP: Map<symbol, {
731
731
  maxlength: number;
732
732
  allowClear: boolean;
733
- autosize?: undefined;
733
+ autoSize?: undefined;
734
734
  showCount?: undefined;
735
735
  max?: undefined;
736
736
  min?: undefined;
@@ -739,7 +739,7 @@ export declare const INIT_COMPONENT_PROPS_MAP: Map<symbol, {
739
739
  valueFormat?: undefined;
740
740
  } | {
741
741
  maxlength: number;
742
- autosize: {
742
+ autoSize: {
743
743
  minRows: number;
744
744
  maxRows: number;
745
745
  };
@@ -756,14 +756,14 @@ export declare const INIT_COMPONENT_PROPS_MAP: Map<symbol, {
756
756
  controls: boolean;
757
757
  allowClear: boolean;
758
758
  maxlength?: undefined;
759
- autosize?: undefined;
759
+ autoSize?: undefined;
760
760
  showCount?: undefined;
761
761
  format?: undefined;
762
762
  valueFormat?: undefined;
763
763
  } | {
764
764
  allowClear: boolean;
765
765
  maxlength?: undefined;
766
- autosize?: undefined;
766
+ autoSize?: undefined;
767
767
  showCount?: undefined;
768
768
  max?: undefined;
769
769
  min?: undefined;
@@ -775,7 +775,7 @@ export declare const INIT_COMPONENT_PROPS_MAP: Map<symbol, {
775
775
  valueFormat: string;
776
776
  allowClear: boolean;
777
777
  maxlength?: undefined;
778
- autosize?: undefined;
778
+ autoSize?: undefined;
779
779
  showCount?: undefined;
780
780
  max?: undefined;
781
781
  min?: undefined;
@@ -783,7 +783,7 @@ export declare const INIT_COMPONENT_PROPS_MAP: Map<symbol, {
783
783
  } | {
784
784
  maxlength?: undefined;
785
785
  allowClear?: undefined;
786
- autosize?: undefined;
786
+ autoSize?: undefined;
787
787
  showCount?: undefined;
788
788
  max?: undefined;
789
789
  min?: undefined;
@@ -861,7 +861,6 @@ export declare const ProComponentProvider: SFCWithInstall<{
861
861
  $props: {
862
862
  key?: string | number | symbol | undefined;
863
863
  style?: unknown;
864
- readonly componentVars: ComponentVars;
865
864
  ref?: VNodeRef | undefined;
866
865
  ref_for?: boolean | undefined;
867
866
  ref_key?: string | undefined;
@@ -904,6 +903,7 @@ export declare const ProComponentProvider: SFCWithInstall<{
904
903
  [key: string]: any;
905
904
  }>) => void)[] | undefined;
906
905
  class?: unknown;
906
+ readonly componentVars: ComponentVars;
907
907
  };
908
908
  $attrs: {
909
909
  [x: string]: unknown;
@@ -975,7 +975,7 @@ export declare const ProForm: SFCWithInstall<{
975
975
  autoCommandDisabled?: boolean | undefined;
976
976
  readonly prefixCls?: string | undefined;
977
977
  readonly name?: string | undefined;
978
- readonly size?: "middle" | "small" | "large" | undefined;
978
+ readonly size?: "small" | "middle" | "large" | undefined;
979
979
  readonly disabled?: boolean | undefined;
980
980
  readonly labelCol?: (Partial<ExtractPropTypes<{
981
981
  span: (StringConstructor | NumberConstructor)[];
@@ -1132,7 +1132,7 @@ export declare const ProForm: SFCWithInstall<{
1132
1132
  type: PropType<string>;
1133
1133
  };
1134
1134
  size: {
1135
- type: PropType<"middle" | "small" | "large">;
1135
+ type: PropType<"small" | "middle" | "large">;
1136
1136
  };
1137
1137
  disabled: {
1138
1138
  type: PropType<boolean>;
@@ -1337,7 +1337,7 @@ export declare const ProForm: SFCWithInstall<{
1337
1337
  type: PropType<string>;
1338
1338
  };
1339
1339
  size: {
1340
- type: PropType<"middle" | "small" | "large">;
1340
+ type: PropType<"small" | "middle" | "large">;
1341
1341
  };
1342
1342
  disabled: {
1343
1343
  type: PropType<boolean>;
@@ -1518,7 +1518,7 @@ export declare const ProForm: SFCWithInstall<{
1518
1518
  type: PropType<string>;
1519
1519
  };
1520
1520
  size: {
1521
- type: PropType<"middle" | "small" | "large">;
1521
+ type: PropType<"small" | "middle" | "large">;
1522
1522
  };
1523
1523
  disabled: {
1524
1524
  type: PropType<boolean>;
@@ -1778,7 +1778,7 @@ export declare const SlotComponent: DefineComponent<{
1778
1778
  };
1779
1779
  }>>, {}, {}>;
1780
1780
 
1781
- export declare type SlotComponentType = string | VNode | FunctionalComponent;
1781
+ export declare type SlotComponentType = string | VNode | FunctionalComponent<Pick<RenderProps, 'path'>>;
1782
1782
 
1783
1783
  declare type SwitchSlots = FieldSlot<'checkedChildren' | 'unCheckedChildren'>;
1784
1784
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",