@silver-formily/element-plus 2.0.1 → 2.2.0
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/README.en-US.md +32 -0
- package/README.md +32 -35
- package/esm/__builtins__/index.mjs +15 -16
- package/esm/__builtins__/shared/index.mjs +11 -12
- package/esm/__builtins__/shared/transform-component.d.ts +2 -6
- package/esm/__builtins__/shared/transform-component.mjs +16 -33
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +10 -10
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +58 -58
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-cards/index.mjs +44 -44
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +59 -58
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-items/index.mjs +46 -43
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/index.mjs +15 -14
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-table/array-table.d.ts +28 -0
- package/esm/array-table/index.d.ts +28 -0
- package/esm/array-table/index.mjs +113 -111
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/types.d.ts +1 -0
- package/esm/cascader/index.mjs +19 -20
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts +1 -4
- package/esm/checkbox/index.d.ts +442 -379
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/editable/editable.d.ts +16 -12
- package/esm/editable/index.d.ts +8 -6
- package/esm/editable/index.mjs +110 -112
- package/esm/editable/index.mjs.map +1 -1
- package/esm/form-button-group/index.mjs +29 -28
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +42 -43
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-dialog/index.d.ts +1 -1
- package/esm/form-dialog/index.mjs +4 -4
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +6 -6
- package/esm/form-drawer/index.d.ts +1 -1
- package/esm/form-drawer/index.mjs +4 -4
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +6 -6
- package/esm/form-grid/index.d.ts +1 -183
- package/esm/form-grid/index.mjs +1 -1
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/form-item.d.ts +2 -1
- package/esm/form-item/index.d.ts +12 -6
- package/esm/form-item/index.mjs +163 -155
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -1
- package/esm/form-layout/form-layout.mjs +53 -52
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/types.d.ts +0 -2
- package/esm/form-layout/utils.d.ts +3 -3
- package/esm/form-layout/utils.mjs +48 -43
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +27 -25
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +1 -26
- package/esm/form-tab/index.mjs +30 -30
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.mjs +44 -38
- package/esm/index.mjs.map +1 -1
- package/esm/input/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +258 -147
- package/esm/pagination/pagination.mjs +109 -110
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/index.d.ts +5 -0
- package/esm/preview-text/index.mjs +165 -141
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/rate.d.ts +5 -0
- package/esm/preview-text/utils.d.ts +5 -5
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/radio/index.d.ts +344 -194
- package/esm/radio/index.mjs.map +1 -1
- package/esm/rate/index.d.ts +187 -0
- package/esm/rate/index.mjs +14 -0
- package/esm/rate/index.mjs.map +1 -0
- package/esm/reset/index.d.ts +1 -62
- package/esm/reset/index.mjs +1 -1
- package/esm/reset/index.mjs.map +1 -1
- package/esm/segmented/index.d.ts +26 -0
- package/esm/segmented/index.mjs +37 -0
- package/esm/segmented/index.mjs.map +1 -0
- package/esm/segmented/segmented.d.ts +25 -0
- package/esm/select/index.mjs +8 -8
- package/esm/select/index.mjs.map +1 -1
- package/esm/select-table/index.d.ts +28 -0
- package/esm/select-table/index.mjs +48 -47
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +56 -0
- package/esm/slider/index.d.ts +177 -0
- package/esm/slider/index.mjs +14 -0
- package/esm/slider/index.mjs.map +1 -0
- package/esm/submit/index.d.ts +1 -47
- package/esm/submit/index.mjs +1 -1
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +225 -189
- package/esm/time-select/index.d.ts +163 -103
- package/esm/transfer/index.d.ts +196 -115
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.mjs +26 -26
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/upload/index.d.ts +404 -399
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +800 -790
- package/esm/vendor/icon.mjs.map +1 -1
- package/esm/vendor/lodash.mjs +12 -20
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/runtime.mjs +29 -24
- package/esm/vendor/runtime.mjs.map +1 -1
- package/esm/vendor/shared.esm-bundler.mjs +2 -2
- package/esm/vendor/sizes.mjs.map +1 -1
- package/esm/vendor/types.mjs +5 -5
- package/esm/vendor/types.mjs.map +1 -1
- package/package.json +8 -9
package/esm/form-grid/index.d.ts
CHANGED
|
@@ -1,184 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const FormGrid: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
-
columnGap: {
|
|
5
|
-
type: NumberConstructor;
|
|
6
|
-
};
|
|
7
|
-
rowGap: {
|
|
8
|
-
type: NumberConstructor;
|
|
9
|
-
};
|
|
10
|
-
minColumns: {
|
|
11
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
12
|
-
};
|
|
13
|
-
minWidth: {
|
|
14
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
15
|
-
};
|
|
16
|
-
maxColumns: {
|
|
17
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
18
|
-
};
|
|
19
|
-
maxWidth: {
|
|
20
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
21
|
-
};
|
|
22
|
-
breakpoints: {
|
|
23
|
-
type: import('vue').PropType<number[]>;
|
|
24
|
-
};
|
|
25
|
-
colWrap: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
strictAutoFit: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
default: boolean;
|
|
32
|
-
};
|
|
33
|
-
shouldVisible: {
|
|
34
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
35
|
-
default(): () => true;
|
|
36
|
-
};
|
|
37
|
-
grid: {
|
|
38
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
39
|
-
};
|
|
40
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
41
|
-
colWrap: boolean;
|
|
42
|
-
strictAutoFit: boolean;
|
|
43
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
44
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
45
|
-
rootRef: HTMLDivElement;
|
|
46
|
-
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
47
|
-
P: {};
|
|
48
|
-
B: {};
|
|
49
|
-
D: {};
|
|
50
|
-
C: {};
|
|
51
|
-
M: {};
|
|
52
|
-
Defaults: {};
|
|
53
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
54
|
-
columnGap: {
|
|
55
|
-
type: NumberConstructor;
|
|
56
|
-
};
|
|
57
|
-
rowGap: {
|
|
58
|
-
type: NumberConstructor;
|
|
59
|
-
};
|
|
60
|
-
minColumns: {
|
|
61
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
62
|
-
};
|
|
63
|
-
minWidth: {
|
|
64
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
65
|
-
};
|
|
66
|
-
maxColumns: {
|
|
67
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
68
|
-
};
|
|
69
|
-
maxWidth: {
|
|
70
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
71
|
-
};
|
|
72
|
-
breakpoints: {
|
|
73
|
-
type: import('vue').PropType<number[]>;
|
|
74
|
-
};
|
|
75
|
-
colWrap: {
|
|
76
|
-
type: BooleanConstructor;
|
|
77
|
-
default: boolean;
|
|
78
|
-
};
|
|
79
|
-
strictAutoFit: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
default: boolean;
|
|
82
|
-
};
|
|
83
|
-
shouldVisible: {
|
|
84
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
85
|
-
default(): () => true;
|
|
86
|
-
};
|
|
87
|
-
grid: {
|
|
88
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
89
|
-
};
|
|
90
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
91
|
-
colWrap: boolean;
|
|
92
|
-
strictAutoFit: boolean;
|
|
93
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
94
|
-
}>;
|
|
95
|
-
__isFragment?: never;
|
|
96
|
-
__isTeleport?: never;
|
|
97
|
-
__isSuspense?: never;
|
|
98
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
99
|
-
columnGap: {
|
|
100
|
-
type: NumberConstructor;
|
|
101
|
-
};
|
|
102
|
-
rowGap: {
|
|
103
|
-
type: NumberConstructor;
|
|
104
|
-
};
|
|
105
|
-
minColumns: {
|
|
106
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
107
|
-
};
|
|
108
|
-
minWidth: {
|
|
109
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
110
|
-
};
|
|
111
|
-
maxColumns: {
|
|
112
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
113
|
-
};
|
|
114
|
-
maxWidth: {
|
|
115
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
116
|
-
};
|
|
117
|
-
breakpoints: {
|
|
118
|
-
type: import('vue').PropType<number[]>;
|
|
119
|
-
};
|
|
120
|
-
colWrap: {
|
|
121
|
-
type: BooleanConstructor;
|
|
122
|
-
default: boolean;
|
|
123
|
-
};
|
|
124
|
-
strictAutoFit: {
|
|
125
|
-
type: BooleanConstructor;
|
|
126
|
-
default: boolean;
|
|
127
|
-
};
|
|
128
|
-
shouldVisible: {
|
|
129
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
130
|
-
default(): () => true;
|
|
131
|
-
};
|
|
132
|
-
grid: {
|
|
133
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
134
|
-
};
|
|
135
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
136
|
-
colWrap: boolean;
|
|
137
|
-
strictAutoFit: boolean;
|
|
138
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
139
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
140
|
-
$slots: {
|
|
141
|
-
default?(_: {}): any;
|
|
142
|
-
};
|
|
143
|
-
}) & {
|
|
144
|
-
GridColumn: {
|
|
145
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
146
|
-
gridSpan: {
|
|
147
|
-
type: NumberConstructor;
|
|
148
|
-
default: number;
|
|
149
|
-
};
|
|
150
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
151
|
-
gridSpan: number;
|
|
152
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
153
|
-
P: {};
|
|
154
|
-
B: {};
|
|
155
|
-
D: {};
|
|
156
|
-
C: {};
|
|
157
|
-
M: {};
|
|
158
|
-
Defaults: {};
|
|
159
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
160
|
-
gridSpan: {
|
|
161
|
-
type: NumberConstructor;
|
|
162
|
-
default: number;
|
|
163
|
-
};
|
|
164
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
165
|
-
gridSpan: number;
|
|
166
|
-
}>;
|
|
167
|
-
__isFragment?: never;
|
|
168
|
-
__isTeleport?: never;
|
|
169
|
-
__isSuspense?: never;
|
|
170
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
171
|
-
gridSpan: {
|
|
172
|
-
type: NumberConstructor;
|
|
173
|
-
default: number;
|
|
174
|
-
};
|
|
175
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
176
|
-
gridSpan: number;
|
|
177
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
178
|
-
$slots: {
|
|
179
|
-
default?(_: {}): any;
|
|
180
|
-
};
|
|
181
|
-
});
|
|
182
|
-
createFormGrid: typeof createFormGrid;
|
|
183
|
-
};
|
|
1
|
+
export declare const FormGrid: any;
|
|
184
2
|
export default FormGrid;
|
package/esm/form-grid/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { observer as i } from "@formily/reactive-vue";
|
|
1
|
+
import { observer as i } from "@silver-formily/reactive-vue";
|
|
2
2
|
import { defineComponent as l, createElementBlock as u, openBlock as c, renderSlot as d, ref as y, computed as G, provide as b, watchEffect as _, normalizeStyle as g, normalizeClass as F } from "vue";
|
|
3
3
|
import { Grid as C } from "@formily/grid";
|
|
4
4
|
import { markRaw as v } from "@formily/reactive";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-grid/form-grid-column.vue","../../src/form-grid/form-grid.vue","../../src/form-grid/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\ndefineOptions({\r\n name: 'FFormGridColumn',\r\n})\r\n\r\nconst props = defineProps({\r\n gridSpan: {\r\n type: Number,\r\n default: 1,\r\n },\r\n})\r\n</script>\r\n\r\n<template>\r\n <!-- @formily/grid 会优先使用这个值,如果没有会自动生成 -->\r\n <div :data-grid-span=\"props.gridSpan\">\r\n <slot />\r\n </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport type { IGridOptions } from '@formily/grid'\r\nimport type { PropType } from 'vue'\r\nimport { Grid } from '@formily/grid'\r\nimport { markRaw } from '@formily/reactive'\r\nimport { computed, provide, ref, watchEffect } from 'vue'\r\nimport { stylePrefix } from '../__builtins__'\r\nimport { FormGridSymbol } from './hooks'\r\n\r\ndefineOptions({\r\n name: 'FFormGrid',\r\n})\r\n\r\nconst props = defineProps({\r\n columnGap: {\r\n type: Number,\r\n },\r\n rowGap: {\r\n type: Number,\r\n },\r\n minColumns: {\r\n type: [Number, Array],\r\n },\r\n minWidth: {\r\n type: [Number, Array],\r\n },\r\n maxColumns: {\r\n type: [Number, Array],\r\n },\r\n maxWidth: {\r\n type: [Number, Array],\r\n },\r\n breakpoints: {\r\n type: Array as PropType<number[]>,\r\n },\r\n colWrap: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n strictAutoFit: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shouldVisible: {\r\n type: Function as PropType<IGridOptions['shouldVisible']>,\r\n default() {\r\n return () => true\r\n },\r\n },\r\n grid: {\r\n type: Object as PropType<Grid<HTMLElement>>,\r\n },\r\n})\r\n\r\nconst prefixCls = `${stylePrefix}-form-grid`\r\nconst rootRef = ref<HTMLElement>()\r\n\r\nconst gridInstance = computed(() => {\r\n const { grid, ...restProps } = props\r\n const options = {\r\n columnGap: props?.columnGap ?? 8,\r\n rowGap: props.rowGap ?? 4,\r\n ...Object.fromEntries(\r\n Object.entries(restProps)\r\n .filter(([_, v]) => v !== undefined)\r\n .map(([k, v]) => [k, v]),\r\n ),\r\n }\r\n return markRaw(grid ?? new Grid(options))\r\n})\r\n\r\nprovide(FormGridSymbol, gridInstance)\r\n\r\nwatchEffect((onInvalidate) => {\r\n const dispose = gridInstance.value.connect(rootRef.value)\r\n onInvalidate(() => {\r\n dispose()\r\n })\r\n})\r\n</script>\r\n\r\n<template>\r\n <div\r\n ref=\"rootRef\"\r\n :class=\"prefixCls\"\r\n :style=\"{\r\n gridTemplateColumns: gridInstance.templateColumns,\r\n gap: gridInstance.gap,\r\n }\"\r\n >\r\n <slot />\r\n </div>\r\n</template>\r\n","import { observer } from '@formily/reactive-vue'\r\nimport { composeExport } from '../__builtins__'\r\nimport FFormGridColumn from './form-grid-column.vue'\r\nimport FFormGrid from './form-grid.vue'\r\nimport { createFormGrid } from './hooks'\r\nimport './style.scss'\r\n\r\nconst FormGridInner = observer(FFormGrid)\r\n\r\nconst FormGridColumn = observer(FFormGridColumn)\r\n\r\nexport const FormGrid = composeExport(FormGridInner, {\r\n GridColumn: FormGridColumn,\r\n createFormGrid,\r\n})\r\n\r\nexport default FormGrid\r\n"],"names":["props","__props","_createElementBlock","_renderSlot","_ctx","prefixCls","stylePrefix","rootRef","ref","gridInstance","computed","grid","restProps","options","_","v","k","markRaw","Grid","provide","FormGridSymbol","watchEffect","onInvalidate","dispose","_normalizeStyle","FormGridInner","observer","FFormGrid","FormGridColumn","FFormGridColumn","FormGrid","composeExport","createFormGrid"],"mappings":";;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC;2BAUZC,EAEM,OAAA;AAAA,MAFA,kBAAgBF,EAAM;AAAA,IAAA;MAC1BG,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHZ,UAAMJ,IAAQC,GAyCRI,IAAY,GAAGC,CAAW,cAC1BC,IAAUC,EAAA,GAEVC,IAAeC,EAAS,MAAM;AAClC,YAAM,EAAE,MAAAC,GAAM,GAAGC,EAAA,IAAcZ,GACzBa,IAAU;AAAA,QACd,WAAWb,GAAO,aAAa;AAAA,QAC/B,QAAQA,EAAM,UAAU;AAAA,QACxB,GAAG,OAAO;AAAA,UACR,OAAO,QAAQY,CAAS,EACrB,OAAO,CAAC,CAACE,GAAGC,CAAC,MAAMA,MAAM,MAAS,EAClC,IAAI,CAAC,CAACC,GAAGD,CAAC,MAAM,CAACC,GAAGD,CAAC,CAAC;AAAA,QAAA;AAAA,MAC3B;AAEF,aAAOE,EAAQN,KAAQ,IAAIO,EAAKL,CAAO,CAAC;AAAA,IAC1C,CAAC;AAED,WAAAM,EAAQC,GAAgBX,CAAY,GAEpCY,EAAY,CAACC,MAAiB;AAC5B,YAAMC,IAAUd,EAAa,MAAM,QAAQF,EAAQ,KAAK;AACxD,MAAAe,EAAa,MAAM;AACjB,QAAAC,EAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,mBAICrB,EASM,OAAA;AAAA,eARA;AAAA,MAAJ,KAAIK;AAAA,MACH,SAAOF,CAAS;AAAA,MAChB,OAAKmB,EAAA;AAAA,QAAgC,qBAAAf,EAAA,MAAa;AAAA,QAA6B,KAAAA,EAAA,MAAa;AAAA,MAAA;;MAK7FN,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;ICnFNqB,IAAgBC,EAASC,CAAS,GAElCC,IAAiBF,EAASG,CAAe,GAElCC,IAAWC,EAAcN,GAAe;AAAA,EACnD,YAAYG;AAAA,EACZ,gBAAAI;AACF,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/form-grid/form-grid-column.vue","../../src/form-grid/form-grid.vue","../../src/form-grid/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\ndefineOptions({\r\n name: 'FFormGridColumn',\r\n})\r\n\r\nconst props = defineProps({\r\n gridSpan: {\r\n type: Number,\r\n default: 1,\r\n },\r\n})\r\n</script>\r\n\r\n<template>\r\n <!-- @formily/grid 会优先使用这个值,如果没有会自动生成 -->\r\n <div :data-grid-span=\"props.gridSpan\">\r\n <slot />\r\n </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport type { IGridOptions } from '@formily/grid'\r\nimport type { PropType } from 'vue'\r\nimport { Grid } from '@formily/grid'\r\nimport { markRaw } from '@formily/reactive'\r\nimport { computed, provide, ref, watchEffect } from 'vue'\r\nimport { stylePrefix } from '../__builtins__'\r\nimport { FormGridSymbol } from './hooks'\r\n\r\ndefineOptions({\r\n name: 'FFormGrid',\r\n})\r\n\r\nconst props = defineProps({\r\n columnGap: {\r\n type: Number,\r\n },\r\n rowGap: {\r\n type: Number,\r\n },\r\n minColumns: {\r\n type: [Number, Array],\r\n },\r\n minWidth: {\r\n type: [Number, Array],\r\n },\r\n maxColumns: {\r\n type: [Number, Array],\r\n },\r\n maxWidth: {\r\n type: [Number, Array],\r\n },\r\n breakpoints: {\r\n type: Array as PropType<number[]>,\r\n },\r\n colWrap: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n strictAutoFit: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shouldVisible: {\r\n type: Function as PropType<IGridOptions['shouldVisible']>,\r\n default() {\r\n return () => true\r\n },\r\n },\r\n grid: {\r\n type: Object as PropType<Grid<HTMLElement>>,\r\n },\r\n})\r\n\r\nconst prefixCls = `${stylePrefix}-form-grid`\r\nconst rootRef = ref<HTMLElement>()\r\n\r\nconst gridInstance = computed(() => {\r\n const { grid, ...restProps } = props\r\n const options = {\r\n columnGap: props?.columnGap ?? 8,\r\n rowGap: props.rowGap ?? 4,\r\n ...Object.fromEntries(\r\n Object.entries(restProps)\r\n .filter(([_, v]) => v !== undefined)\r\n .map(([k, v]) => [k, v]),\r\n ),\r\n }\r\n return markRaw(grid ?? new Grid(options))\r\n})\r\n\r\nprovide(FormGridSymbol, gridInstance)\r\n\r\nwatchEffect((onInvalidate) => {\r\n const dispose = gridInstance.value.connect(rootRef.value)\r\n onInvalidate(() => {\r\n dispose()\r\n })\r\n})\r\n</script>\r\n\r\n<template>\r\n <div\r\n ref=\"rootRef\"\r\n :class=\"prefixCls\"\r\n :style=\"{\r\n gridTemplateColumns: gridInstance.templateColumns,\r\n gap: gridInstance.gap,\r\n }\"\r\n >\r\n <slot />\r\n </div>\r\n</template>\r\n","import { observer } from '@silver-formily/reactive-vue'\r\nimport { composeExport } from '../__builtins__'\r\nimport FFormGridColumn from './form-grid-column.vue'\r\nimport FFormGrid from './form-grid.vue'\r\nimport { createFormGrid } from './hooks'\r\nimport './style.scss'\r\n\r\nconst FormGridInner = observer(FFormGrid)\r\n\r\nconst FormGridColumn = observer(FFormGridColumn)\r\n\r\nexport const FormGrid = composeExport(FormGridInner, {\r\n GridColumn: FormGridColumn,\r\n createFormGrid,\r\n})\r\n\r\nexport default FormGrid\r\n"],"names":["props","__props","_createElementBlock","_renderSlot","_ctx","prefixCls","stylePrefix","rootRef","ref","gridInstance","computed","grid","restProps","options","_","v","k","markRaw","Grid","provide","FormGridSymbol","watchEffect","onInvalidate","dispose","_normalizeStyle","FormGridInner","observer","FFormGrid","FormGridColumn","FFormGridColumn","FormGrid","composeExport","createFormGrid"],"mappings":";;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC;2BAUZC,EAEM,OAAA;AAAA,MAFA,kBAAgBF,EAAM;AAAA,IAAA;MAC1BG,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHZ,UAAMJ,IAAQC,GAyCRI,IAAY,GAAGC,CAAW,cAC1BC,IAAUC,EAAA,GAEVC,IAAeC,EAAS,MAAM;AAClC,YAAM,EAAE,MAAAC,GAAM,GAAGC,EAAA,IAAcZ,GACzBa,IAAU;AAAA,QACd,WAAWb,GAAO,aAAa;AAAA,QAC/B,QAAQA,EAAM,UAAU;AAAA,QACxB,GAAG,OAAO;AAAA,UACR,OAAO,QAAQY,CAAS,EACrB,OAAO,CAAC,CAACE,GAAGC,CAAC,MAAMA,MAAM,MAAS,EAClC,IAAI,CAAC,CAACC,GAAGD,CAAC,MAAM,CAACC,GAAGD,CAAC,CAAC;AAAA,QAAA;AAAA,MAC3B;AAEF,aAAOE,EAAQN,KAAQ,IAAIO,EAAKL,CAAO,CAAC;AAAA,IAC1C,CAAC;AAED,WAAAM,EAAQC,GAAgBX,CAAY,GAEpCY,EAAY,CAACC,MAAiB;AAC5B,YAAMC,IAAUd,EAAa,MAAM,QAAQF,EAAQ,KAAK;AACxD,MAAAe,EAAa,MAAM;AACjB,QAAAC,EAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,mBAICrB,EASM,OAAA;AAAA,eARA;AAAA,MAAJ,KAAIK;AAAA,MACH,SAAOF,CAAS;AAAA,MAChB,OAAKmB,EAAA;AAAA,QAAgC,qBAAAf,EAAA,MAAa;AAAA,QAA6B,KAAAA,EAAA,MAAa;AAAA,MAAA;;MAK7FN,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;ICnFNqB,IAAgBC,EAASC,CAAS,GAElCC,IAAiBF,EAASG,CAAe,GAElCC,IAAWC,EAAcN,GAAe;AAAA,EACnD,YAAYG;AAAA,EACZ,gBAAAI;AACF,CAAC;"}
|
|
@@ -5,9 +5,10 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
5
5
|
declare const __VLS_component: import('vue').DefineComponent<IFormItemProps, {
|
|
6
6
|
feedbackTooltipRef: import('vue').Ref<TooltipInstance, TooltipInstance>;
|
|
7
7
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IFormItemProps> & Readonly<{}>, {
|
|
8
|
+
asterisk: boolean;
|
|
8
9
|
colon: boolean;
|
|
10
|
+
labelWrap: boolean;
|
|
9
11
|
fullness: boolean;
|
|
10
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
11
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, any, any>;
|
|
12
13
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
14
|
export default _default;
|
package/esm/form-item/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ export declare const FormItem: {
|
|
|
3
3
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
4
4
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
5
5
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
6
|
+
asterisk: boolean;
|
|
6
7
|
colon: boolean;
|
|
8
|
+
labelWrap: boolean;
|
|
7
9
|
fullness: boolean;
|
|
8
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
9
10
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, any, any, import('vue').ComponentProvideOptions, {
|
|
10
11
|
P: {};
|
|
11
12
|
B: {};
|
|
@@ -16,9 +17,10 @@ export declare const FormItem: {
|
|
|
16
17
|
}, Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
17
18
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
18
19
|
}, {}, {}, {}, {
|
|
20
|
+
asterisk: boolean;
|
|
19
21
|
colon: boolean;
|
|
22
|
+
labelWrap: boolean;
|
|
20
23
|
fullness: boolean;
|
|
21
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
22
24
|
}>;
|
|
23
25
|
__isFragment?: never;
|
|
24
26
|
__isTeleport?: never;
|
|
@@ -26,9 +28,10 @@ export declare const FormItem: {
|
|
|
26
28
|
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
27
29
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
28
30
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
31
|
+
asterisk: boolean;
|
|
29
32
|
colon: boolean;
|
|
33
|
+
labelWrap: boolean;
|
|
30
34
|
fullness: boolean;
|
|
31
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
32
35
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
33
36
|
$slots: any;
|
|
34
37
|
}) & {
|
|
@@ -36,9 +39,10 @@ export declare const FormItem: {
|
|
|
36
39
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
37
40
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
38
41
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
42
|
+
asterisk: boolean;
|
|
39
43
|
colon: boolean;
|
|
44
|
+
labelWrap: boolean;
|
|
40
45
|
fullness: boolean;
|
|
41
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
42
46
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, any, any, import('vue').ComponentProvideOptions, {
|
|
43
47
|
P: {};
|
|
44
48
|
B: {};
|
|
@@ -49,9 +53,10 @@ export declare const FormItem: {
|
|
|
49
53
|
}, Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
50
54
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
51
55
|
}, {}, {}, {}, {
|
|
56
|
+
asterisk: boolean;
|
|
52
57
|
colon: boolean;
|
|
58
|
+
labelWrap: boolean;
|
|
53
59
|
fullness: boolean;
|
|
54
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
55
60
|
}>;
|
|
56
61
|
__isFragment?: never;
|
|
57
62
|
__isTeleport?: never;
|
|
@@ -59,9 +64,10 @@ export declare const FormItem: {
|
|
|
59
64
|
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
60
65
|
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
61
66
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
67
|
+
asterisk: boolean;
|
|
62
68
|
colon: boolean;
|
|
69
|
+
labelWrap: boolean;
|
|
63
70
|
fullness: boolean;
|
|
64
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
65
71
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
66
72
|
$slots: any;
|
|
67
73
|
});
|