mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
fix(components): [result] rename slot's name from 'subTitle' to 'sub-title' (#6636)
* fix(components): [result] rename slot's name * docs(components): [result] update doc
This commit is contained in:
parent
52e389a058
commit
458e301a52
@ -34,8 +34,8 @@ result/customized-content
|
||||
## Result Slots
|
||||
|
||||
| Name | Description |
|
||||
| -------- | ----------------- |
|
||||
| --------- | ----------------- |
|
||||
| icon | custom icon |
|
||||
| title | custom title |
|
||||
| subTitle | custom sub title |
|
||||
| sub-title | custom sub title |
|
||||
| extra | custom extra area |
|
||||
|
@ -85,7 +85,7 @@ describe('Result.vue', () => {
|
||||
test('should render sub-title slots', () => {
|
||||
const wrapper = mount({
|
||||
slots: {
|
||||
subTitle: AXIOM,
|
||||
'sub-title': AXIOM,
|
||||
},
|
||||
})
|
||||
expect(wrapper.find('.el-result__subtitle').exists()).toBe(true)
|
||||
|
@ -14,8 +14,8 @@
|
||||
<p>{{ title }}</p>
|
||||
</slot>
|
||||
</div>
|
||||
<div v-if="subTitle || $slots.subTitle" :class="ns.e('subtitle')">
|
||||
<slot name="subTitle">
|
||||
<div v-if="subTitle || $slots['sub-title']" :class="ns.e('subtitle')">
|
||||
<slot name="sub-title">
|
||||
<p>{{ subTitle }}</p>
|
||||
</slot>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user