Commit fa33c6b0d7f3da5ac224bcd28c970432fe2388ae
Committed by
GitHub
1 parent
a2b594c9
fix: collapse canExpand (#1501)
* fix(type): fix ant-design-vue -> * fix: fix base64 blob * fix: fix CollapseContainer canExpan
Showing
2 changed files
with
7 additions
and
2 deletions
src/components/Container/src/collapse/CollapseContainer.vue
1 | <template> | 1 | <template> |
2 | <div :class="prefixCls"> | 2 | <div :class="prefixCls"> |
3 | - <CollapseHeader v-bind="$props" :prefixCls="prefixCls" :show="show" @expand="handleExpand"> | 3 | + <CollapseHeader |
4 | + v-bind="$props" | ||
5 | + :prefixCls="prefixCls" | ||
6 | + :show="show" | ||
7 | + @expand="canExpan ? handleExpand : undefined" | ||
8 | + > | ||
4 | <template #title> | 9 | <template #title> |
5 | <slot name="title"></slot> | 10 | <slot name="title"></slot> |
6 | </template> | 11 | </template> |
src/components/Container/src/collapse/CollapseHeader.vue
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <slot name="title"></slot> | 8 | <slot name="title"></slot> |
9 | </template> | 9 | </template> |
10 | </BasicTitle> | 10 | </BasicTitle> |
11 | - <div :class="`${prefixCls}__action`"> | 11 | + <div :class="`${prefixCls}__action`" v-if="canExpan"> |
12 | <slot name="action"></slot> | 12 | <slot name="action"></slot> |
13 | <BasicArrow v-if="canExpan" up :expand="show" @click="$emit('expand')" /> | 13 | <BasicArrow v-if="canExpan" up :expand="show" @click="$emit('expand')" /> |
14 | </div> | 14 | </div> |