general-basic-form 2.0.21 → 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.
- package/README.md +9 -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<
|
|
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>
|
|
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
|
{
|