vue-form-craft 4.0.10 → 4.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.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  使用了最新的前端技术栈,可以让你免去vue项目中表单的烦恼。
6
6
 
7
- - [在线预览](https://xinnian999.github.io/vue-form-craft/form-design)
8
- - [官方文档](https://xinnian999.github.io/vue-form-craft/)
7
+ - [在线预览](https://xinnian999.github.io/vue-form-craft/zh/form-design)
8
+ - [官方文档](https://xinnian999.github.io/vue-form-craft/zh/)
9
9
  - 作者:Elin
10
10
  - 联系方式:17803000829
11
11
 
@@ -27,7 +27,7 @@
27
27
 
28
28
  - vuedraggable
29
29
  - element-plus
30
- - json-editor-vue3
30
+ - vue-form-craft
31
31
  - lodash
32
32
 
33
33
  ## 使用
@@ -122,3 +122,12 @@ const handleSubmit = async () => {
122
122
  }
123
123
  </script>
124
124
  ```
125
+
126
+ ## 捐赠 vue-form-craft 的开发
127
+
128
+ `vue-form-craft` 的文档和代码完全开源,如果该项目有帮助到你的开发工作,你可以捐赠`vue-form-craft`的研发工作,捐赠无门槛,哪怕是一杯可乐也好。
129
+
130
+ <div style="display:flex;gap:15px">
131
+ <img src="./docs/assets/wechat.png" style="height:400px" />
132
+ <img src="./docs/assets/zhifubao.png" style="height:400px" />
133
+ </div>
package/dist/index.d.ts CHANGED
@@ -51,6 +51,7 @@ export declare const FormDesign: DefineComponent<ExtractPropTypes< {
51
51
  modelValue: PropType<FormSchema>;
52
52
  schemaContext: {
53
53
  type: PropType<Record<string, any>>;
54
+ default: () => {};
54
55
  };
55
56
  templates: {
56
57
  type: PropType<TemplateData>;
@@ -66,6 +67,7 @@ save: () => void;
66
67
  modelValue: PropType<FormSchema>;
67
68
  schemaContext: {
68
69
  type: PropType<Record<string, any>>;
70
+ default: () => {};
69
71
  };
70
72
  templates: {
71
73
  type: PropType<TemplateData>;
@@ -77,7 +79,9 @@ type: PropType<string[]>;
77
79
  onAdd?: ((element: FormElement) => any) | undefined;
78
80
  onOnSave?: (() => any) | undefined;
79
81
  onSave?: (() => any) | undefined;
80
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
82
+ }>, {
83
+ schemaContext: Record<string, any>;
84
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
81
85
 
82
86
  export declare type FormElement = {
83
87
  name: string;
@@ -116,12 +120,14 @@ schema: FormSchema;
116
120
  schemaContext?: Record<string, any> | undefined;
117
121
  design?: boolean | undefined;
118
122
  footer?: boolean | undefined;
123
+ read?: boolean | undefined;
119
124
  }>>>, {
120
125
  validate: () => FormValidationResult | undefined;
121
126
  context: ComputedRef< {
122
127
  $values: {};
123
128
  $selectData: Record<string, Record<string, any>>;
124
129
  $initialValues: Record<string, any>;
130
+ $locale: Locale;
125
131
  }>;
126
132
  resetFields: (names?: string[] | undefined) => void;
127
133
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -133,6 +139,7 @@ schema: FormSchema;
133
139
  schemaContext?: Record<string, any> | undefined;
134
140
  design?: boolean | undefined;
135
141
  footer?: boolean | undefined;
142
+ read?: boolean | undefined;
136
143
  }>>>> & Readonly<{
137
144
  "onUpdate:modelValue"?: ((values: Record<string, any>) => any) | undefined;
138
145
  onOnFinish?: ((values: Record<string, any>) => any) | undefined;
@@ -152,6 +159,7 @@ declare type FormRule = {
152
159
  export declare type FormSchema = {
153
160
  labelWidth?: number;
154
161
  labelAlign?: 'top' | 'left' | 'right';
162
+ labelSuffix?: string;
155
163
  size?: 'default' | 'small' | 'large';
156
164
  disabled?: boolean;
157
165
  hideRequiredAsterisk?: boolean;
@@ -159,6 +167,41 @@ export declare type FormSchema = {
159
167
  items: FormItemType[];
160
168
  };
161
169
 
170
+ declare type Locale = {
171
+ menus: {
172
+ basicTitle: string;
173
+ highBasicTitle: string;
174
+ layoutTitle: string;
175
+ assistTitle: string;
176
+ useTemplateBtn: string;
177
+ };
178
+ actions: {
179
+ previewJson: string;
180
+ previewVueCode: string;
181
+ previewForm: string;
182
+ clear: string;
183
+ save: string;
184
+ };
185
+ canvas: {
186
+ emptyTip: string;
187
+ wrapperEmptyTip: string;
188
+ };
189
+ attr: {
190
+ tab1: {
191
+ title: string;
192
+ emptyTip: string;
193
+ linkage: {
194
+ text: string;
195
+ action1: string;
196
+ action2: string;
197
+ };
198
+ };
199
+ tab2: {
200
+ title: string;
201
+ };
202
+ };
203
+ };
204
+
162
205
  export declare type TemplateData = {
163
206
  name: string;
164
207
  schema: FormSchema;