general-basic-form 2.0.20 → 2.0.22

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 (2) hide show
  1. package/README.md +26 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
99
99
 
100
100
  setup写法:
101
101
  const VGeneralBasicFormRef = ref()
102
- const params = await new Promise<boolean>((resolve, reject) => {
102
+ const params = await new Promise<any>((resolve, reject) => {
103
103
  VGeneralBasicFormRef.value.$refs['queryFormRef']?.validate(
104
104
  async (valid: boolean, props?: FormItemProp[] | undefined) => {
105
105
  if (valid) {
@@ -123,6 +123,8 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
123
123
  formOnly:true // 只展示表单不展示按钮
124
124
  noUrlParameters:true // 不接受和不改变url的参数
125
125
  loading:false // 加载动画
126
+ formData:{} // 注意,因为可能出现的性能问题在组件watch formData的变化时没有使用deep,所以有时候深度的修改会不生效,导致表单数据不完整
127
+ //例子:formData.value.x=y ✘ | formData.value={...formData.value,x:y} ✔
126
128
  formItem: [
127
129
  {
128
130
  label: '',
@@ -255,7 +257,12 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
255
257
  name: "contactors"
256
258
  // 插槽组件使用:
257
259
  // <VGeneralBasicForm ...>
258
- // <template #contactors> <div>一些组件</div></template>
260
+ // <template #contactors>
261
+ // <div>一些组件
262
+ // 一些组件
263
+ // <el-form-item prop="contactors">...</el-form-item>
264
+ // </div>
265
+ // </template>
259
266
  // </VGeneralBasicForm>
260
267
  },
261
268
  {
@@ -338,7 +345,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
338
345
 
339
346
  //divider支持template:
340
347
  //default
341
- 支持组件:
348
+ 支持组件type:
342
349
 
343
350
  /**
344
351
 
@@ -404,6 +411,22 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
404
411
 
405
412
  'input-number' = 'input-number',
406
413
 
414
+ /**
415
+
416
+ \* @description: 单选框
417
+
418
+ */
419
+
420
+ 'radio' = 'radio',
421
+
422
+ /**
423
+
424
+ \* @description: 自定义元素,插槽组件
425
+
426
+ */
427
+
428
+ 'form-item-slot'='form-item-slot',
429
+
407
430
 
408
431
 
409
432
  ## 对虚拟滚动列表+接口的封装
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "general-basic-form",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
4
4
  "description": "",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "type": "module",