mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
This commit is contained in:
parent
d0ba4ff456
commit
56d516108b
@ -24,6 +24,7 @@
|
|||||||
- Fix `n-select` focus input when closing tag with `filterable` , closes [#1170](https://github.com/TuSimple/naive-ui/issues/1170).
|
- Fix `n-select` focus input when closing tag with `filterable` , closes [#1170](https://github.com/TuSimple/naive-ui/issues/1170).
|
||||||
- Fix `n-button` border on hover conflicts with `n-badge`, closes [#1195](https://github.com/TuSimple/naive-ui/issues/1195).
|
- Fix `n-button` border on hover conflicts with `n-badge`, closes [#1195](https://github.com/TuSimple/naive-ui/issues/1195).
|
||||||
- Fix `n-upload` prop `v-model:file-list` dosen't work well when prop `multiple` is `true`, closes [#418](https://github.com/TuSimple/naive-ui/issues/418).
|
- Fix `n-upload` prop `v-model:file-list` dosen't work well when prop `multiple` is `true`, closes [#418](https://github.com/TuSimple/naive-ui/issues/418).
|
||||||
|
- Fix `useThemeVars` doesn't apply theme overrides, closes [#1194](https://github.com/TuSimple/naive-ui/issues/1194), [#1176](https://github.com/TuSimple/naive-ui/issues/1176).
|
||||||
|
|
||||||
## 2.18.2 (2021-09-14)
|
## 2.18.2 (2021-09-14)
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
- 修复 `n-select` `filterable` 下关闭标签 input 光标聚焦问题,关闭 [#1170](https://github.com/TuSimple/naive-ui/issues/1170)
|
- 修复 `n-select` `filterable` 下关闭标签 input 光标聚焦问题,关闭 [#1170](https://github.com/TuSimple/naive-ui/issues/1170)
|
||||||
- 修复 `n-button` 在 hover 状态下边框与 `n-badge` 冲突,关闭 [#1195](https://github.com/TuSimple/naive-ui/issues/1195)
|
- 修复 `n-button` 在 hover 状态下边框与 `n-badge` 冲突,关闭 [#1195](https://github.com/TuSimple/naive-ui/issues/1195)
|
||||||
- 修复 `n-upload` 的 `v-model:file-list` 属性在 `multiple` 属性设为 `true` 的时候没有正确更新,关闭 [#418](https://github.com/TuSimple/naive-ui/issues/418)
|
- 修复 `n-upload` 的 `v-model:file-list` 属性在 `multiple` 属性设为 `true` 的时候没有正确更新,关闭 [#418](https://github.com/TuSimple/naive-ui/issues/418)
|
||||||
|
- 修复 `useThemeVars` 未应用覆盖的变量值,关闭 [#1194](https://github.com/TuSimple/naive-ui/issues/1194), [#1176](https://github.com/TuSimple/naive-ui/issues/1176)
|
||||||
|
|
||||||
## 2.18.2 (2021-09-14)
|
## 2.18.2 (2021-09-14)
|
||||||
|
|
||||||
|
@ -8,13 +8,14 @@ export function useThemeVars (): ComputedRef<ThemeCommonVars> {
|
|||||||
const configProviderInjection = inject(configProviderInjectionKey, null)
|
const configProviderInjection = inject(configProviderInjectionKey, null)
|
||||||
if (configProviderInjection === null) return commonLight
|
if (configProviderInjection === null) return commonLight
|
||||||
const {
|
const {
|
||||||
mergedThemeRef: { value: mergedTheme }
|
mergedThemeRef: { value: mergedTheme },
|
||||||
|
mergedThemeOverridesRef: { value: mergedThemeOverrides }
|
||||||
} = configProviderInjection
|
} = configProviderInjection
|
||||||
if (mergedTheme) {
|
const currentThemeVars = mergedTheme?.common || commonLight
|
||||||
const { common } = mergedTheme
|
if (mergedThemeOverrides?.common) {
|
||||||
return common || commonLight
|
return Object.assign({}, currentThemeVars, mergedThemeOverrides.common)
|
||||||
} else {
|
} else {
|
||||||
return commonLight
|
return currentThemeVars
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user