mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
fix(log): font-size
prop not working, closes #1416
This commit is contained in:
parent
6be0929805
commit
0cbb1730cb
@ -4,6 +4,10 @@
|
||||
|
||||
- `n-collapsed-transition`'s `collapsed` prop is deprecated, please use `show` instead, closes [#1407](https://github.com/TuSimple/naive-ui/issues/1407).
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix `n-log` `font-size` prop not working, closes [#1416](https://github.com/TuSimple/naive-ui/issues/1416).
|
||||
|
||||
## 2.19.11 (2021-10-21)
|
||||
|
||||
### Fixes
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
- `n-collapsed-transition` 的 `collapsed` 属性被废弃,请使用 `show` 属性代替,关闭 [#1407](https://github.com/TuSimple/naive-ui/issues/1407)
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-log` `font-size` 属性不生效,关闭 [#1416](https://github.com/TuSimple/naive-ui/issues/1416)
|
||||
|
||||
## 2.19.11 (2021-10-21)
|
||||
|
||||
### Fixes
|
||||
|
@ -31,6 +31,7 @@ const codeProps = {
|
||||
uri: Boolean,
|
||||
inline: Boolean,
|
||||
// In n-log, we only need to mount code's style for highlight
|
||||
internalFontSize: Number,
|
||||
internalNoHighlight: Boolean
|
||||
}
|
||||
|
||||
@ -117,8 +118,9 @@ export default defineComponent({
|
||||
'hue-6-2': $9
|
||||
}
|
||||
} = themeRef.value
|
||||
const { internalFontSize } = props
|
||||
return {
|
||||
'--font-size': fontSize,
|
||||
'--font-size': internalFontSize ? `${internalFontSize}px` : fontSize,
|
||||
'--font-family': fontFamilyMono,
|
||||
'--font-weight-strong': fontWeightStrong,
|
||||
'--bezier': cubicBezierEaseInOut,
|
||||
|
@ -271,6 +271,7 @@ export default defineComponent({
|
||||
default: () => (
|
||||
<NCode
|
||||
internalNoHighlight
|
||||
internalFontSize={this.fontSize}
|
||||
theme={mergedTheme.peers.Code}
|
||||
themeOverrides={mergedTheme.peerOverrides.Code}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user