mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
fix(popselect): default placement & padding
This commit is contained in:
parent
348fb0c805
commit
ec1efe318d
@ -15,6 +15,7 @@
|
||||
- Fix `n-description`'s warning caused by `v-if` that should not appear, closes [#1083](https://github.com/TuSimple/naive-ui/issues/1083).
|
||||
- Fix `n-layout`'s `sider-placement` doesn't work after build, closes [#978](https://github.com/TuSimple/naive-ui/issues/978).
|
||||
- Fix `n-input-number`'s `step` calculate error when the value is decimal, closes [#1007](https://github.com/TuSimple/naive-ui/issues/1007).
|
||||
- Fix `n-popselect`' s default placement and padding.
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
- 修复 `n-description` 中因 `v-if` 导致的不该出现的警告,关闭 [#1083](https://github.com/TuSimple/naive-ui/issues/1083)
|
||||
- 修复 `n-layout` 的 `sider-placement` 属性在打包之后不生效,关闭 [#978](https://github.com/TuSimple/naive-ui/issues/978)
|
||||
- 修复 `n-input-number` 的 `step` 值为小数时计算错误,关闭 [#1007](https://github.com/TuSimple/naive-ui/issues/1007)
|
||||
- 修复 `n-popselect` 的默认位置和 padding
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -15,6 +15,10 @@ import { popselectInjectionKey } from './interface'
|
||||
const popselectProps = {
|
||||
...(useTheme.props as ThemeProps<PopselectTheme>),
|
||||
...popoverBaseProps,
|
||||
placement: {
|
||||
...popoverBaseProps.placement,
|
||||
default: 'bottom'
|
||||
},
|
||||
trigger: {
|
||||
type: String as PropType<PopoverTrigger>,
|
||||
default: 'hover'
|
||||
@ -58,6 +62,9 @@ export default defineComponent({
|
||||
const popoverProps: PopoverInternalProps & { ref: string } = {
|
||||
theme: mergedTheme.peers.Popover,
|
||||
themeOverrides: mergedTheme.peerOverrides.Popover,
|
||||
builtinThemeOverrides: {
|
||||
padding: '0'
|
||||
},
|
||||
ref: 'popoverInstRef',
|
||||
internalRenderBody: (
|
||||
className,
|
||||
|
Loading…
Reference in New Issue
Block a user