mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-13 13:59:04 +08:00
fix(popconfirm): icon slot not working
This commit is contained in:
parent
ed51570bd2
commit
c179c3a665
@ -7,6 +7,7 @@
|
||||
- Fix `n-button` causes crash when it's imported in script inside head tag. [#68](https://github.com/TuSimple/naive-ui/pull/68)
|
||||
- Fix `n-spin` animation shifts.
|
||||
- Fix `n-menu` lack `on-update-value` and `on-update-expanded-keys` props.
|
||||
- Fix `n-popconfirm` icon slot not working.
|
||||
|
||||
## 2.11.5 (2021-06-10)
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
- 修正 `n-button` 在 head 内部的 script 被引入造成崩溃 [#68](https://github.com/TuSimple/naive-ui/pull/68)
|
||||
- 修正 `n-spin` 动画闪烁
|
||||
- 修正 `n-menu` 缺少 `on-update-value` 和 `on-update-expanded-keys` 属性
|
||||
- 修正 `n-popconfirm` icon slot 不生效
|
||||
|
||||
## 2.11.5 (2021-06-10)
|
||||
|
||||
|
@ -72,32 +72,32 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
render () {
|
||||
const { mergedClsPrefix } = this
|
||||
const { mergedClsPrefix, $slots } = this
|
||||
return (
|
||||
<div style={this.cssVars as CSSProperties}>
|
||||
<div class={`${mergedClsPrefix}-popconfirm__body`}>
|
||||
{this.showIcon ? (
|
||||
<div class={`${mergedClsPrefix}-popconfirm__icon`}>
|
||||
<slot name="icon">
|
||||
{renderSlot($slots, 'icon', undefined, () => [
|
||||
<NBaseIcon clsPrefix={mergedClsPrefix}>
|
||||
{{ default: () => <WarningIcon /> }}
|
||||
</NBaseIcon>
|
||||
</slot>
|
||||
])}
|
||||
</div>
|
||||
) : null}
|
||||
{renderSlot(this.$slots, 'default')}
|
||||
{renderSlot($slots, 'default')}
|
||||
</div>
|
||||
<div class={`${mergedClsPrefix}-popconfirm__action`}>
|
||||
{renderSlot(this.$slots, 'action', undefined, () => [
|
||||
{renderSlot($slots, 'action', undefined, () => [
|
||||
<NButton size="small" onClick={this.handleNegativeClick}>
|
||||
{this.localizedNegativeText}
|
||||
{{ default: () => this.localizedNegativeText }}
|
||||
</NButton>,
|
||||
<NButton
|
||||
size="small"
|
||||
type="primary"
|
||||
onClick={this.handlePositiveClick}
|
||||
>
|
||||
{this.localizedPositiveText}
|
||||
{{ default: () => this.localizedPositiveText }}
|
||||
</NButton>
|
||||
])}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user