fix(dropdown): inner link click trigger area is not the entire option, closes #823

This commit is contained in:
07akioni 2021-08-20 02:40:10 +08:00
parent 74df68485f
commit ee83140dd4
4 changed files with 7 additions and 5 deletions

View File

@ -11,6 +11,7 @@
- Fix `n-notification`'s exported `NotificationReactive` type is not writable, closes [#876](https://github.com/TuSimple/naive-ui/issues/876).
- Fix `n-tabs` style glitches when different types tabs are nested, closes [#850](https://github.com/TuSimple/naive-ui/issues/850).
- Fix `n-dropdown`'s inner link click trigger area is not the entire option, closes [#823](https://github.com/TuSimple/naive-ui/issues/823).
## 2.16.4 (2021-08-16)

View File

@ -11,6 +11,7 @@
- 修复 `n-notification` 导出的 `NotificationReactive` 类型不可变,关闭 [#876](https://github.com/TuSimple/naive-ui/issues/876)
- 修复 `n-tabs` 不同类型嵌套样式错乱,关闭 [#850](https://github.com/TuSimple/naive-ui/issues/850)
- 修复 `n-dropdown` 内部的链接点击触发区域不是整个选项,关闭 [#823](https://github.com/TuSimple/naive-ui/issues/823)
## 2.16.4 (2021-08-16)

View File

@ -238,7 +238,7 @@ export default defineComponent({
`${clsPrefix}-dropdown-option-body__prefix--show-icon`
]}
>
{renderIcon ? renderIcon(rawNode) : render(rawNode.icon)}
{[renderIcon ? renderIcon(rawNode) : render(rawNode.icon)]}
</div>
<div
__dropdown-option

View File

@ -38,15 +38,15 @@ export default cB('dropdown-menu', `
box-shadow .3s var(--bezier);
`, [
fadeInScaleUpTransition(),
cB('dropdown-option', {
position: 'relative'
}, [
cB('dropdown-option', `
position: relative;
`, [
c('a', `
text-decoration: none;
color: inherit;
`, [
c('&::before', `
content: "",
content: "";
position: absolute;
left: 0;
right: 0;