znyg-frontend-common 1.0.26 → 1.0.28

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 (87) hide show
  1. package/es/components/index.d.ts +3 -2
  2. package/es/components/index.mjs +1 -1
  3. package/es/components/znCountTo/src/countUp.d.ts +6 -0
  4. package/es/components/znForm/src/helper/index.d.ts +42 -0
  5. package/es/components/znForm/src/hooks/useZnForm.d.ts +52 -1
  6. package/es/components/znForm/src/interface/index.d.ts +139 -0
  7. package/es/components/znGrid/index.d.ts +194 -0
  8. package/es/components/znGrid/index.mjs +2 -0
  9. package/es/components/znGrid/index.mjs.map +1 -0
  10. package/es/components/znGrid/src/components/GridItem.vue.d.ts +130 -0
  11. package/es/components/znGrid/src/components/GridItem.vue.mjs +3 -0
  12. package/es/components/znGrid/src/components/GridItem.vue.mjs.map +1 -0
  13. package/es/components/znGrid/src/components/GridItem.vue2.mjs +2 -0
  14. package/es/components/znGrid/src/components/GridItem.vue2.mjs.map +1 -0
  15. package/es/components/znGrid/src/index.vue.d.ts +87 -0
  16. package/es/components/znGrid/src/index.vue.mjs +3 -0
  17. package/es/components/znGrid/src/index.vue.mjs.map +1 -0
  18. package/es/components/znGrid/src/index.vue2.mjs +4 -0
  19. package/es/components/znGrid/src/index.vue2.mjs.map +1 -0
  20. package/es/components/znTable/src/hooks/useSelection.d.ts +4 -0
  21. package/es/components/znTable/src/hooks/useTable.d.ts +7 -0
  22. package/es/components/znTable/src/utils.d.ts +118 -0
  23. package/es/components/znTimeLine/src/component/timelineItem.vue.d.ts +8 -0
  24. package/es/components/znTimeLine/src/index.vue.d.ts +3 -0
  25. package/es/components/znWorkGrid/index.d.ts +4 -2
  26. package/es/components/znWorkGrid/src/index.vue.d.ts +4 -2
  27. package/es/components/znWorkGrid/src/index.vue.mjs +9 -8
  28. package/es/components/znWorkGrid/src/index.vue.mjs.map +1 -1
  29. package/es/components/znWorkGrid/src/index.vue2.mjs +1 -1
  30. package/es/components/znWorkGrid/src/index.vue2.mjs.map +1 -1
  31. package/es/directives/modules/copy.d.ts +5 -0
  32. package/es/directives/modules/drag.d.ts +4 -0
  33. package/es/functions/modules/uitls.d.ts +22 -2
  34. package/es/functions/modules/uitls.mjs +1 -1
  35. package/es/functions/modules/uitls.mjs.map +1 -1
  36. package/es/hooks/useDialog/src/index.d.ts +10 -0
  37. package/es/hooks/useDrawer/src/index.d.ts +7 -0
  38. package/es/hooks/usePopWindow/src/index.d.ts +25 -0
  39. package/es/hooks/usePopWindow/src/interface/index.d.ts +24 -0
  40. package/es/index.mjs +1 -1
  41. package/es/index.mjs.map +1 -1
  42. package/es/utils/index.d.ts +5 -0
  43. package/global.d.ts +1 -0
  44. package/lib/components/index.d.ts +3 -2
  45. package/lib/components/index.js +1 -1
  46. package/lib/components/znCountTo/src/countUp.d.ts +6 -0
  47. package/lib/components/znForm/src/helper/index.d.ts +42 -0
  48. package/lib/components/znForm/src/hooks/useZnForm.d.ts +52 -1
  49. package/lib/components/znForm/src/interface/index.d.ts +139 -0
  50. package/lib/components/znGrid/index.d.ts +194 -0
  51. package/lib/components/znGrid/index.js +2 -0
  52. package/lib/components/znGrid/index.js.map +1 -0
  53. package/lib/components/znGrid/src/components/GridItem.vue.d.ts +130 -0
  54. package/lib/components/znGrid/src/components/GridItem.vue.js +3 -0
  55. package/lib/components/znGrid/src/components/GridItem.vue.js.map +1 -0
  56. package/lib/components/znGrid/src/components/GridItem.vue2.js +2 -0
  57. package/lib/components/znGrid/src/components/GridItem.vue2.js.map +1 -0
  58. package/lib/components/znGrid/src/index.vue.d.ts +87 -0
  59. package/lib/components/znGrid/src/index.vue.js +3 -0
  60. package/lib/components/znGrid/src/index.vue.js.map +1 -0
  61. package/lib/components/znGrid/src/index.vue2.js +4 -0
  62. package/lib/components/znGrid/src/index.vue2.js.map +1 -0
  63. package/lib/components/znTable/src/hooks/useSelection.d.ts +4 -0
  64. package/lib/components/znTable/src/hooks/useTable.d.ts +7 -0
  65. package/lib/components/znTable/src/utils.d.ts +118 -0
  66. package/lib/components/znTimeLine/src/component/timelineItem.vue.d.ts +8 -0
  67. package/lib/components/znTimeLine/src/index.vue.d.ts +3 -0
  68. package/lib/components/znWorkGrid/index.d.ts +4 -2
  69. package/lib/components/znWorkGrid/src/index.vue.d.ts +4 -2
  70. package/lib/components/znWorkGrid/src/index.vue.js +6 -5
  71. package/lib/components/znWorkGrid/src/index.vue.js.map +1 -1
  72. package/lib/components/znWorkGrid/src/index.vue2.js +1 -1
  73. package/lib/components/znWorkGrid/src/index.vue2.js.map +1 -1
  74. package/lib/directives/modules/copy.d.ts +5 -0
  75. package/lib/directives/modules/drag.d.ts +4 -0
  76. package/lib/functions/modules/uitls.d.ts +22 -2
  77. package/lib/functions/modules/uitls.js +1 -1
  78. package/lib/functions/modules/uitls.js.map +1 -1
  79. package/lib/hooks/useDialog/src/index.d.ts +10 -0
  80. package/lib/hooks/useDrawer/src/index.d.ts +7 -0
  81. package/lib/hooks/usePopWindow/src/index.d.ts +25 -0
  82. package/lib/hooks/usePopWindow/src/interface/index.d.ts +24 -0
  83. package/lib/index.js +1 -1
  84. package/lib/index.js.map +1 -1
  85. package/lib/utils/index.d.ts +5 -0
  86. package/package.json +1 -1
  87. package/theme-default/index.css +1 -1
@@ -4,9 +4,10 @@ import ZnTreeFilter from './znTreeFilter/index';
4
4
  import ZnCountTo from './znCountTo/index';
5
5
  import { default as ZnForm } from './znForm/index';
6
6
  import { default as ZnTimeline, type ZnTimelineItemPro } from './znTimeLine/index';
7
+ import { default as ZnGrid, ZnGridItem, type ZnGridProps, type ZnGridItemProps } from './znGrid/index';
7
8
  import ZnTest from './znTest/index';
8
9
  import ZnWorkGrid from './znWorkGrid';
9
10
  export { type ZnFormProps, useZnForm } from './znForm/index';
10
11
  export type { ZnWorkGridProps, ZnWorkGridItemsProps, ZnWorkGridWrokListProps } from './znWorkGrid/index';
11
- export type { ZnTableProps, SearchProps, ColumnProps, ZnTimelineItemPro };
12
- export { ZnTable, ZnTreeFilter, ZnChart, ZnCountTo, ZnTest, ZnForm, ZnTimeline, ZnWorkGrid };
12
+ export type { ZnTableProps, SearchProps, ColumnProps, ZnTimelineItemPro, ZnGridProps, ZnGridItemProps };
13
+ export { ZnTable, ZnTreeFilter, ZnChart, ZnCountTo, ZnTest, ZnForm, ZnTimeline, ZnWorkGrid, ZnGrid, ZnGridItem };
@@ -1,2 +1,2 @@
1
- export{ZnChart}from"./znChart/index.mjs";export{ZnTable}from"./znTable/index.mjs";export{ZnTreeFilter}from"./znTreeFilter/index.mjs";export{ZnCountTo}from"./znCountTo/index.mjs";export{ZnForm}from"./znForm/index.mjs";export{ZnTimeline}from"./znTimeLine/index.mjs";export{ZnTest}from"./znTest/index.mjs";export{ZnWorkGrid}from"./znWorkGrid/index.mjs";export{useZnForm}from"./znForm/src/hooks/useZnForm.mjs";
1
+ export{ZnChart}from"./znChart/index.mjs";export{ZnTable}from"./znTable/index.mjs";export{ZnTreeFilter}from"./znTreeFilter/index.mjs";export{ZnCountTo}from"./znCountTo/index.mjs";export{ZnForm}from"./znForm/index.mjs";export{ZnTimeline}from"./znTimeLine/index.mjs";export{ZnGrid,ZnGridItem}from"./znGrid/index.mjs";export{ZnTest}from"./znTest/index.mjs";export{ZnWorkGrid}from"./znWorkGrid/index.mjs";export{useZnForm}from"./znForm/src/hooks/useZnForm.mjs";
2
2
  //# sourceMappingURL=index.mjs.map
@@ -46,6 +46,12 @@ export declare class CountUp {
46
46
  once: boolean;
47
47
  constructor(target: string | HTMLElement | HTMLInputElement, endVal: number, options?: CountUpOptions);
48
48
  handleScroll(self: CountUp): void;
49
+ /**
50
+ * Smart easing works by breaking the animation into 2 parts, the second part being the
51
+ * smartEasingAmount and first part being the total amount minus the smartEasingAmount. It works
52
+ * by disabling easing for the first part and enabling it on the second part. It is used if
53
+ * useEasing is true and the total animation amount exceeds the smartEasingThreshold.
54
+ */
49
55
  private determineDirectionAndSmartEasing;
50
56
  start(callback?: (args?: any) => any): void;
51
57
  pauseResume(): void;
@@ -1,14 +1,56 @@
1
1
  export declare const isResponsive: (obj: any) => boolean;
2
+ /**
3
+ * @description 处理 ProForm 多级 prop,将多级 prop 转为对象
4
+ * 如 prop 为 meta.title,则转为 { meta: { title: "" } }
5
+ */
2
6
  export declare const handleNestProp: (obj: Record<string, any>, delimiter?: string) => Record<string, any>;
7
+ /**
8
+ * @description 处理 prop 为多级嵌套的情况,返回的数据 (列如: prop: user.name)
9
+ */
3
10
  export declare const getFormProp: (form: Record<string, any>, prop: string, valueFormat?: "default" | "string" | "number" | "boolean") => any;
11
+ /**
12
+ * @description 对 form 对象的 pro 赋值
13
+ */
4
14
  export declare const setFormProp: (form: Record<string, any>, prop: string, value: any) => void;
15
+ /**
16
+ * @description 是否是有效的数字(包含正负整数,0以及正负浮点数)
17
+ */
5
18
  export declare const isNumber: (val: string) => boolean;
19
+ /**
20
+ * @description 是否为字符串
21
+ */
6
22
  export declare function isString(val: unknown): val is string;
7
23
  export declare const isObject: (val: any) => val is Record<any, any>;
24
+ /**
25
+ * @description 补 px 单位
26
+ * @param val 值
27
+ * @returns 补 px 单位的 string
28
+ */
8
29
  export declare const getPx: (val: number | string | undefined) => string;
30
+ /**
31
+ * @description 是否为空值项
32
+ */
9
33
  export declare const isEmptyVal: (val: any) => boolean;
34
+ /**
35
+ * @description 将连字符转换为大驼峰格式
36
+ */
10
37
  export declare const hyphenToCamelCase: (val?: string) => string;
38
+ /**
39
+ *
40
+ * @param slots 插槽属性
41
+ */
11
42
  export declare const setComponentSlots: (slots?: Record<string, any>) => Record<string, any>;
43
+ /**
44
+ * 删除对象中的属性,包括嵌套属性
45
+ * @param obj 对象
46
+ * @param prop 对象的key
47
+ */
12
48
  export declare const deleteObjProperty: (obj: Record<string, any>, prop: string) => boolean;
49
+ /**
50
+ * @description 处理 prop 为多级嵌套的情况,返回的数据 (列如: prop: user.name)
51
+ */
13
52
  export declare const getProp: (form: Record<string, any>, prop: string, valueFormat?: "default" | "string" | "number" | "boolean") => any;
53
+ /**
54
+ * @description 对 form 对象的 pro 赋值
55
+ */
14
56
  export declare const setProp: (form: Record<string, any>, prop: string, value: any) => void;
@@ -49,7 +49,9 @@ export declare const useZnForm: () => {
49
49
  };
50
50
  readonly labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
51
51
  readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
52
- readonly labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
52
+ readonly labelWidth: import("element-plus/es/utils" /**
53
+ * 动态创建表单。使用该函数,控制台会有 warning: Slot "XXX" invoked outside of the render function,可以忽略
54
+ */).EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
53
55
  readonly labelSuffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
54
56
  readonly inline: BooleanConstructor;
55
57
  readonly inlineMessage: BooleanConstructor;
@@ -225,14 +227,53 @@ export declare const useZnForm: () => {
225
227
  };
226
228
  };
227
229
  formMethods: {
230
+ /**
231
+ * @description 设置 ProForm 组件的 props
232
+ * @param props ProForm 组件的 props
233
+ */
228
234
  setProps: (props?: ZnFormProps) => Promise<void>;
235
+ /**
236
+ * @description 设置 form 的值
237
+ * @param data 需要设置的数据
238
+ */
229
239
  setValues: (data: Record<string, any>) => Promise<void>;
240
+ /**
241
+ * @description 设置 schema
242
+ * @param schemaProps 需要设置的 schemaProps
243
+ */
230
244
  setSchema: (schemaProps: FormSetProps[]) => Promise<void>;
245
+ /**
246
+ * @description 新增 schema
247
+ * @param prop 在哪里新增,number 为下标,字符串为指定的 prop
248
+ * @param position 如果 prop 为字符串,则指定新增到 prop 前还是后
249
+ */
231
250
  addSchema: (formSchema: ZnFormSchemaProps, prop?: number | string, position?: "before" | "after") => Promise<void>;
251
+ /**
252
+ * @description 删除 schema
253
+ * @param field 删除哪个数据
254
+ */
232
255
  delSchema: (prop: string) => Promise<void>;
256
+ /**
257
+ * @description 获取表单数据
258
+ * @returns form data
259
+ */
233
260
  getFormData: <T = Record<string, any>>(filterEmptyVal?: boolean) => Promise<T>;
261
+ /**
262
+ * @description 获取表单组件的实例
263
+ * @param prop 表单项唯一标识
264
+ * @returns ElForm instance
265
+ */
234
266
  getComponentExpose: (prop: string) => Promise<any>;
267
+ /**
268
+ * @description 获取 ElFormItem 组件的实例
269
+ * @param prop 表单项唯一标识
270
+ * @returns formItem instance
271
+ */
235
272
  getFormItemExpose: (prop: string) => Promise<any>;
273
+ /**
274
+ * @description 获取 ElForm 组件的实例
275
+ * @returns ElForm instance
276
+ */
236
277
  getElFormExpose: () => Promise<{
237
278
  $: import("vue").ComponentInternalInstance;
238
279
  $data: {};
@@ -451,13 +492,23 @@ export declare const useZnForm: () => {
451
492
  default?(_: {}): any;
452
493
  };
453
494
  }>;
495
+ /**
496
+ * @description 获取 ProForm 组件的实例
497
+ * @returns ProForm instance
498
+ */
454
499
  getFormExpose: () => Promise<ProFormInstance>;
455
500
  };
456
501
  formRegister: (ref?: ProFormInstance, elRef?: FormInstance) => void;
457
502
  createMethods: {
503
+ /**
504
+ * 返回 ProForm 组件的虚拟 DOM,直接在页面中渲染该虚拟 DOM 即可。可以理解为返回一个 Vue 组件
505
+ */
458
506
  createFormComponent: (ZnFormProps?: ZnFormProps & Partial<ProFormOnEmits>, context?: Record<string, any>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
459
507
  [key: string]: any;
460
508
  }>;
509
+ /**
510
+ * 动态创建表单。使用该函数,控制台会有 warning: Slot "XXX" invoked outside of the render function,可以忽略
511
+ */
461
512
  createForm: (el: string | Ref<HTMLElement> | ShallowRef<HTMLElement>, ZnFormProps?: ZnFormProps & Partial<ProFormOnEmits>, slots?: any) => Promise<void>;
462
513
  };
463
514
  };
@@ -5,6 +5,9 @@ import type { TimeSelectProps } from 'element-plus/es/components/time-select/src
5
5
  import type { ComponentPublicInstance, ComputedRef, ExtractPropTypes, InjectionKey, Ref, VNode } from 'vue';
6
6
  import { type ZnFormProps } from '../index.vue';
7
7
  import type ProForm from '../index.vue';
8
+ /**
9
+ * 组件内置导入需要
10
+ */
8
11
  export declare enum ComponentNameEnum {
9
12
  EL_INPUT = "ElInput",
10
13
  EL_INPUT_NUMBER = "ElInputNumber",
@@ -35,14 +38,41 @@ export declare enum ComponentNameEnum {
35
38
  USER_SELECT = "UserSelect",
36
39
  ICON_PICKER = "IconPicker"
37
40
  }
41
+ /**
42
+ * el 字面量
43
+ */
38
44
  export type PascalCaseComponentName = keyof typeof ComponentNameEnum extends infer K ? K extends string ? K extends `${infer A}_${infer B}` ? K extends `${infer A}_${infer B}_${infer C}` ? `${Capitalize<Lowercase<A>>}${Capitalize<Lowercase<B>>}${Capitalize<Lowercase<C>>}` : `${Capitalize<Lowercase<A>>}${Capitalize<Lowercase<B>>}` : Capitalize<Lowercase<K>> : never : never;
45
+ /**
46
+ * el 字面量
47
+ */
39
48
  export type HyphenCaseComponentName = keyof typeof ComponentNameEnum extends infer K ? K extends string ? K extends `${infer A}_${infer B}` ? K extends `${infer A}_${infer B}_${infer C}` ? `${Lowercase<A>}-${Lowercase<B>}-${Lowercase<C>}` : `${Lowercase<A>}-${Lowercase<B>}` : Lowercase<K> : never : never;
49
+ /**
50
+ * el 字面量
51
+ */
40
52
  export type FormType = PascalCaseComponentName | HyphenCaseComponentName;
53
+ /**
54
+ * 基本类型
55
+ */
41
56
  export type ValueType = string | number | boolean | any[];
57
+ /**
58
+ * 字典数据类型
59
+ */
42
60
  export interface FormEnumProps {
61
+ /**
62
+ * 选项框显示的文字
63
+ */
43
64
  label?: string;
65
+ /**
66
+ * 选项框值
67
+ */
44
68
  value?: ValueType;
69
+ /**
70
+ * 是否禁用此选项
71
+ */
45
72
  disabled?: boolean;
73
+ /**
74
+ * 为树形选择时,可以通过 children 属性指定子选项
75
+ */
46
76
  children?: FormEnumProps[];
47
77
  [key: string]: any;
48
78
  }
@@ -50,52 +80,161 @@ export interface ZnElFormProps extends Partial<FormProps> {
50
80
  fixWidth?: boolean;
51
81
  width?: number | string;
52
82
  }
83
+ /**
84
+ * 自定义字典的 key
85
+ */
53
86
  export interface FormFieldNamesProps {
54
87
  label: string;
55
88
  value: string;
56
89
  disabled?: string;
57
90
  children?: string;
58
91
  }
92
+ /**
93
+ * 自定义 render 的参数类型
94
+ */
59
95
  export interface FormRenderScope {
60
96
  model: Record<string, any>;
61
97
  data: ValueType;
62
98
  enumData: Record<string, any>;
63
99
  }
100
+ /**
101
+ * setSchema 函数的参数类型
102
+ */
64
103
  export interface FormSetProps {
65
104
  prop: string;
66
105
  field: string;
67
106
  value: ValueType;
68
107
  }
108
+ /**
109
+ * 表单配置项
110
+ */
69
111
  export interface ZnFormSchemaProps<T = any> {
112
+ /**
113
+ * ElCol Props
114
+ */
70
115
  col?: Partial<ColProps>;
116
+ /**
117
+ * ElFormItem props
118
+ */
71
119
  formItem?: Partial<FormItemProps>;
120
+ /**
121
+ * 表单组件 Props
122
+ */
72
123
  prop: string;
124
+ /**
125
+ * ElFormItem 的 label 属性
126
+ */
73
127
  label: ValueType | ((model: T) => any);
128
+ /**
129
+ * 使用的表单组件名
130
+ */
74
131
  el?: FormType;
132
+ /**
133
+ * 字典编码,如何使用字典编码,则枚举值根据code从字典中去除,无需再设置enum
134
+ */
75
135
  dictCode?: string;
136
+ /**
137
+ * 字典数据,如果 enum 是接口调用,那么可以指定哪个 key 获取 enum 数据,默认返回的数据作为 enum
138
+ */
76
139
  enum?: FormEnumProps[] | ((model: T, enumMap: Map<string, Record<string, any>>) => Promise<any>) | ComputedRef<FormEnumProps[]> | ((params?: any, enumData?: any) => Promise<any>);
140
+ /**
141
+ * 是否缓存 enum 数据
142
+ * @default true
143
+ */
77
144
  useCacheEnum?: boolean;
145
+ /**
146
+ * 从 enumMap 中获取其他的 enum 数据
147
+ */
78
148
  useEnumMap?: string | ((enumMap: Map<string, Record<string, any>>) => Record<string, any>);
149
+ /**
150
+ * 搭配 useEnumMap 使用,指定 enumMap 的 key
151
+ */
79
152
  enumKey?: string;
153
+ /**
154
+ * 字典指定 label && value && children 的 key 值
155
+ * @default Object { label: "label", value: "value", children: "children" }
156
+ */
80
157
  fieldNames?: FormFieldNamesProps;
158
+ /**
159
+ * 级联表单的 prop
160
+ */
81
161
  subProp?: string;
162
+ /**
163
+ * 级联表单的 enum
164
+ */
82
165
  subEnum?: FormEnumProps[] | ((params?: any, enumData?: any) => Promise<any> | FormEnumProps[]);
166
+ /**
167
+ * 根据 element plus 官方文档来传递,该属性所有值会透传到表单组件
168
+ */
83
169
  props?: InputProps | InputNumberProps | ExtractPropTypes<typeof SelectProps> | ExtractPropTypes<typeof SelectV2Props> | CascaderProps | DatePickerProps | TimePickerDefaultProps | TimeSelectProps | SwitchProps | SliderProps | RadioProps | RadioGroupProps | RadioButtonProps | CheckboxProps | CheckboxGroupProps | AutocompleteProps | RateProps | ColorPickerProps | TransferProps | DividerProps | UploadProps | any;
170
+ /**
171
+ * 表单排序(从大到小)
172
+ */
84
173
  order?: number;
174
+ /**
175
+ * 表单属性的默认值
176
+ */
85
177
  defaultValue?: ValueType | ((model: T, enumMap: Map<string, Record<string, any>>) => ValueType | any) | ComputedRef<ValueType>;
178
+ /**
179
+ * 表单组件宽度
180
+ */
86
181
  width?: string | number;
182
+ /**
183
+ * 自定义搜索内容渲染(tsx 语法)
184
+ */
87
185
  render?: (scope: FormRenderScope) => VNode;
186
+ /** 当isView时的自定义渲染 */
88
187
  renderInView?: (scope: FormRenderScope) => VNode;
188
+ /**
189
+ * 自定义 render 时候,需要填写 render 里表单组件使用 v-model 绑定的 prop
190
+ */
89
191
  renderUseProp?: string[];
192
+ /**
193
+ * 是否销毁表单,true 销毁,false 不销毁,类似于 v-if
194
+ * @default false
195
+ */
90
196
  destroy?: boolean | ((model: T) => boolean);
197
+ /**
198
+ * 是否隐藏表单,true 隐藏,false 不隐藏,类似于 v-show
199
+ * @default false
200
+ */
91
201
  hidden?: boolean | ((model: T) => boolean);
202
+ /**
203
+ * 是否在查看时隐藏表单,true 隐藏,false 不隐藏,类似于 v-show
204
+ * @default false
205
+ */
92
206
  hiddenInView?: boolean | ((model: T) => boolean);
207
+ /**
208
+ * 是否隐藏el-form-item的label
209
+ * @default false
210
+ */
93
211
  hiddenLabel?: boolean | ((model: T) => boolean);
212
+ /**
213
+ * 是否禁用表单,true 禁用,false 不禁用
214
+ * @default false
215
+ */
94
216
  disabled?: boolean | ((model: T) => boolean);
217
+ /**
218
+ * 表单绑定的值格式,针对 Enum Value 是 string "1",而值是 number 1 导致编辑时无法匹配问题
219
+ * @default default
220
+ */
95
221
  valueFormat?: 'default' | 'string' | 'number' | 'boolean';
222
+ /**
223
+ * label 标题大小,默认 default。仅 el 为 el-divider | ElDivider 生效
224
+ * @default default
225
+ */
96
226
  labelSize?: 'default' | 'small' | 'large';
227
+ /**
228
+ * 表单组件的插槽
229
+ */
97
230
  slots?: any;
231
+ /**
232
+ * 其他拓展
233
+ */
98
234
  [key: string]: any;
99
235
  }
100
236
  export type ProFormInstance = Omit<InstanceType<typeof ProForm>, keyof ComponentPublicInstance | keyof ZnFormProps>;
237
+ /**
238
+ * provide 类型
239
+ */
101
240
  export declare const formEnumMapKey: InjectionKey<Ref<Map<string, Record<string, any>[]>>>;
@@ -0,0 +1,194 @@
1
+ import index from './src/index.vue';
2
+ export { type ZnGridProps, type BreakPoint, type Responsive } from './src/index.vue';
3
+ export { type ZnGridItemProps } from './src/components/GridItem.vue';
4
+ export declare const ZnGrid: import("../../types").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ cols: {
6
+ type: (ObjectConstructor | NumberConstructor)[];
7
+ required: true;
8
+ default: () => {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ xl: number;
14
+ };
15
+ };
16
+ collapsed: {
17
+ type: BooleanConstructor;
18
+ required: false;
19
+ default: boolean;
20
+ };
21
+ collapsedRows: {
22
+ type: NumberConstructor;
23
+ required: false;
24
+ default: number;
25
+ };
26
+ gap: {
27
+ type: (ArrayConstructor | NumberConstructor)[];
28
+ required: false;
29
+ default: number;
30
+ };
31
+ }>, {
32
+ props: any;
33
+ breakPoint: import("vue").Ref<import("./src/index.vue").BreakPoint, import("./src/index.vue").BreakPoint>;
34
+ gridCols: import("vue").ComputedRef<any>;
35
+ hiddenIndex: import("vue").Ref<number, number>;
36
+ resize: (e: UIEvent) => void;
37
+ slots: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }>[];
40
+ findHiddenIndex: () => void;
41
+ gridGap: import("vue").ComputedRef<string>;
42
+ style: import("vue").ComputedRef<{
43
+ display: string;
44
+ gap: string;
45
+ gridTemplateColumns: string;
46
+ }>;
47
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
48
+ cols: {
49
+ type: (ObjectConstructor | NumberConstructor)[];
50
+ required: true;
51
+ default: () => {
52
+ xs: number;
53
+ sm: number;
54
+ md: number;
55
+ lg: number;
56
+ xl: number;
57
+ };
58
+ };
59
+ collapsed: {
60
+ type: BooleanConstructor;
61
+ required: false;
62
+ default: boolean;
63
+ };
64
+ collapsedRows: {
65
+ type: NumberConstructor;
66
+ required: false;
67
+ default: number;
68
+ };
69
+ gap: {
70
+ type: (ArrayConstructor | NumberConstructor)[];
71
+ required: false;
72
+ default: number;
73
+ };
74
+ }>> & Readonly<{}>, {
75
+ gap: number | unknown[];
76
+ cols: number | Record<string, any>;
77
+ collapsed: boolean;
78
+ collapsedRows: number;
79
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
80
+ export declare const ZnGridItem: import("../../types").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
81
+ offset: {
82
+ type: NumberConstructor;
83
+ required: false;
84
+ default: number;
85
+ };
86
+ span: {
87
+ type: NumberConstructor;
88
+ required: false;
89
+ default: number;
90
+ };
91
+ suffix: {
92
+ type: BooleanConstructor;
93
+ required: false;
94
+ default: boolean;
95
+ };
96
+ xs: {
97
+ type: ObjectConstructor;
98
+ required: false;
99
+ default: any;
100
+ };
101
+ sm: {
102
+ type: ObjectConstructor;
103
+ required: false;
104
+ default: any;
105
+ };
106
+ md: {
107
+ type: ObjectConstructor;
108
+ required: false;
109
+ default: any;
110
+ };
111
+ lg: {
112
+ type: ObjectConstructor;
113
+ required: false;
114
+ default: any;
115
+ };
116
+ xl: {
117
+ type: ObjectConstructor;
118
+ required: false;
119
+ default: any;
120
+ };
121
+ }>, {
122
+ props: any;
123
+ attrs: {
124
+ index: string;
125
+ };
126
+ isShow: import("vue").Ref<boolean, boolean>;
127
+ breakPoint: import("vue").Ref<import("./src/index.vue").BreakPoint, import("./src/index.vue").BreakPoint>;
128
+ shouldHiddenIndex: import("vue").Ref<number, number>;
129
+ gap: number;
130
+ cols: import("vue").Ref<number, number>;
131
+ style: import("vue").ComputedRef<{
132
+ gridColumnStart: number;
133
+ gridColumnEnd: string;
134
+ marginLeft: string;
135
+ gridColumn?: undefined;
136
+ } | {
137
+ gridColumn: string;
138
+ marginLeft: string;
139
+ gridColumnStart?: undefined;
140
+ gridColumnEnd?: undefined;
141
+ }>;
142
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
143
+ offset: {
144
+ type: NumberConstructor;
145
+ required: false;
146
+ default: number;
147
+ };
148
+ span: {
149
+ type: NumberConstructor;
150
+ required: false;
151
+ default: number;
152
+ };
153
+ suffix: {
154
+ type: BooleanConstructor;
155
+ required: false;
156
+ default: boolean;
157
+ };
158
+ xs: {
159
+ type: ObjectConstructor;
160
+ required: false;
161
+ default: any;
162
+ };
163
+ sm: {
164
+ type: ObjectConstructor;
165
+ required: false;
166
+ default: any;
167
+ };
168
+ md: {
169
+ type: ObjectConstructor;
170
+ required: false;
171
+ default: any;
172
+ };
173
+ lg: {
174
+ type: ObjectConstructor;
175
+ required: false;
176
+ default: any;
177
+ };
178
+ xl: {
179
+ type: ObjectConstructor;
180
+ required: false;
181
+ default: any;
182
+ };
183
+ }>> & Readonly<{}>, {
184
+ xs: Record<string, any>;
185
+ sm: Record<string, any>;
186
+ md: Record<string, any>;
187
+ lg: Record<string, any>;
188
+ xl: Record<string, any>;
189
+ offset: number;
190
+ span: number;
191
+ suffix: boolean;
192
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
193
+ export type GridInstance = InstanceType<typeof index>;
194
+ export default ZnGrid;
@@ -0,0 +1,2 @@
1
+ import{withInstall as m}from"../../utils/install.mjs";import o from"./src/index.vue.mjs";import r from"./src/components/GridItem.vue.mjs";const s=m(o),t=m(r);export{s as ZnGrid,t as ZnGridItem,s as default};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/znGrid/index.ts"],"sourcesContent":["import { withInstall } from '../../utils/install'\r\nimport index from './src/index.vue'\r\nimport gridItem from './src/components/GridItem.vue'\r\n\r\nexport { type ZnGridProps, type BreakPoint, type Responsive } from './src/index.vue'\r\nexport { type ZnGridItemProps } from './src/components/GridItem.vue'\r\nexport const ZnGrid = withInstall(index)\r\nexport const ZnGridItem = withInstall(gridItem)\r\n\r\nexport type GridInstance = InstanceType<typeof index>\r\n\r\nexport default ZnGrid\r\n"],"names":["ZnGrid","withInstall","index","ZnGridItem","gridItem"],"mappings":"0IAMa,MAAAA,EAASC,EAAYC,GACrBC,EAAaF,EAAYG"}