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 # 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) ## 1.5.3 (2020-07-23)
### Fixes ### Fixes
- Fix the problem that `n-select` display with mistakes when `placeholder` is empty. - Fix the problem that `n-select` display with mistakes when `placeholder` is empty.

View File

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

View File

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

View File

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

View File

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