docs(changelog): 1.5.4

This commit is contained in:
07akioni 2020-08-08 13:39:31 +08:00
parent 05e19f586e
commit 4c191090f3
5 changed files with 20 additions and 11 deletions

View File

@ -1,4 +1,8 @@
# CHANGELOG
## 1.5.4 (2020-08-08)
### Fixes
- Fix the problem that Message, Notification, Confirm doesn't follow theme change.
## 1.5.3 (2020-07-23)
### Fixes
- Fix the problem that `n-select` display with mistakes when `placeholder` is empty.

View File

@ -1,4 +1,8 @@
# CHANGELOG
## 1.5.4 (2020-08-08)
### Fixes
- 修正了 Message、Notification、Confirm 不随主题切换的问题
## 1.5.3 (2020-07-23)
### Fixes
- 修正了 `n-select``placeholder` 为空的时候显示出错的问题

View File

@ -34,7 +34,7 @@ function createRenderer (wrapCodeWithCard = true) {
const highlighted = hljs.highlight(language, code).value
return `${wrapCodeWithCard ? '<n-card size="small">' : ''}<n-config-consumer abstract>
<template v-slot="{ theme }">
<pre class="n-code" :class="'n-' + theme + '-theme'"><code v-pre>${highlighted}</code></pre>
<pre class="n-code" :class="'n-' + theme + '-theme'"><code v-pre>${highlighted}</code><n-code style="display: none;" /></pre>
</template>
</n-config-consumer>${wrapCodeWithCard ? '</n-card>' : ''}`
},

View File

@ -275,7 +275,6 @@
}
}
}
@include m(child-selected) {
@include b(menu-item-content-header) {
color: map-get($--menu-item-content-text-color, 'child-selected');

View File

@ -14,7 +14,7 @@ export default {
props: {
language: {
type: String,
required: true
default: null
},
code: {
type: String,
@ -58,15 +58,17 @@ export default {
}
},
setCode () {
const {
valid,
content
} = this.generateCodeHTML(this.language, this.code, this.trim)
if (valid) {
this.$refs.code.innerHTML = content
} else {
this.$refs.code.textContent = content
if (this.language) {
const {
valid,
content
} = this.generateCodeHTML(this.language, this.code, this.trim)
if (valid) {
this.$refs.code.innerHTML = content
return
}
}
this.$refs.code.textContent = this.code
}
},
render (h) {