Commit 65a7a5471b10fadb5ea1381d48d73b4fb48c60c9
1 parent
d321b169
Exists in
master
and in
1 other branch
修复Search表单参数默认传值
Showing
1 changed file
with
2 additions
and
7 deletions
Show diff stats
packages/search/index.vue
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | </style> | 8 | </style> |
| 9 | 9 | ||
| 10 | <template> | 10 | <template> |
| 11 | - <el-form class="eagle-search" ref="search" :model="model" v-bind="formProps"> | 11 | + <el-form class="eagle-search" ref="search" :model="model" v-bind="{ size: 'small', 'label-width': '90px', ...formProps }"> |
| 12 | <el-row :gutter="15"> | 12 | <el-row :gutter="15"> |
| 13 | <template v-for="(item, index) in list"> | 13 | <template v-for="(item, index) in list"> |
| 14 | <el-col v-if="bindItemVisible(item.visible)" v-show="!(collapse && index > visibleColNum - 2)" :key="index + 'data'" :span="!item.span ? span : item.span"> | 14 | <el-col v-if="bindItemVisible(item.visible)" v-show="!(collapse && index > visibleColNum - 2)" :key="index + 'data'" :span="!item.span ? span : item.span"> |
| @@ -57,12 +57,7 @@ export default { | @@ -57,12 +57,7 @@ export default { | ||
| 57 | // 表单参数 | 57 | // 表单参数 |
| 58 | formProps: { | 58 | formProps: { |
| 59 | type: Object, | 59 | type: Object, |
| 60 | - default() { | ||
| 61 | - return { | ||
| 62 | - size: 'small', | ||
| 63 | - 'label-width': '90px' | ||
| 64 | - } | ||
| 65 | - } | 60 | + default() { return {} } |
| 66 | }, | 61 | }, |
| 67 | // 表单项占位 | 62 | // 表单项占位 |
| 68 | span: { | 63 | span: { |