Commit 5138e447e74ef01309457d22f44129c8b1b2f815
1 parent
837a3658
fix: `slots` worked in `basicTable` and `basicModal`
修复basicTable和basicModal的插槽传递异常的问题
Showing
2 changed files
with
2 additions
and
2 deletions
src/components/Modal/src/BasicModal.vue
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | </ModalWrapper> | 44 | </ModalWrapper> |
45 | 45 | ||
46 | <template #[item]="data" v-for="item in Object.keys(omit($slots, 'default'))"> | 46 | <template #[item]="data" v-for="item in Object.keys(omit($slots, 'default'))"> |
47 | - <slot :name="item" v-bind="data"></slot> | 47 | + <slot :name="item" v-bind="data || {}"></slot> |
48 | </template> | 48 | </template> |
49 | </Modal> | 49 | </Modal> |
50 | </template> | 50 | </template> |
src/components/Table/src/BasicTable.vue
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | @advanced-change="redoHeight" | 10 | @advanced-change="redoHeight" |
11 | > | 11 | > |
12 | <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys"> | 12 | <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys"> |
13 | - <slot :name="item" v-bind="data"></slot> | 13 | + <slot :name="item" v-bind="data || {}"></slot> |
14 | </template> | 14 | </template> |
15 | </BasicForm> | 15 | </BasicForm> |
16 | 16 |