fix(nimbus-service-layout): support new api of icon

This commit is contained in:
07akioni 2019-11-09 22:52:20 +08:00
parent 8565cd9691
commit 15f81fa337
3 changed files with 14 additions and 7 deletions

View File

@ -15,11 +15,13 @@
</div>
<div class="n-doc-section__view">
<n-nimbus-service-layout
icon="md-musical-notes"
name="Oasis"
:items="items"
:disable-menu="disableMenu"
>
<template v-slot:drawer-header-icon>
<md-musical-notes />
</template>
Take me to the place where you go<br>
Where nobody knows if it's night or day<br>
But please don't put your life in the hands<br>
@ -37,7 +39,6 @@
</div>
<div class="n-doc-section__source">
<textarea><n-nimbus-service-layout
icon="md-musical-notes"
name="Oasis"
:items="[
{
@ -76,6 +77,9 @@
]"
:disable-menu="disableMenu"
>
<template v-slot:drawer-header-icon>
<md-musical-notes />
</template>
Take me to the place where you go<br>
Where nobody knows if it's night or day<br>
But please don't put your life in the hands<br>
@ -91,7 +95,11 @@
<script>
import docCodeEditorMixin from './docCodeEditorMixin'
import mdMusicalNotes from 'naive-ui/lib/icons/md-musical-notes'
export default {
components: {
mdMusicalNotes
},
mixins: [docCodeEditorMixin],
data () {
return {

View File

@ -42,9 +42,10 @@
<div class="n-nimbus-service-layout-drawer-header__content">
<div class="n-nimbus-service-layout-drawer-header__icon">
<n-icon
:type="icon"
:size="22"
/>
>
<slot name="drawer-header-icon" />
</n-icon>
</div>
{{ name }}
</div>

View File

@ -96,9 +96,7 @@ $layout-nav-height: 64px;
@include e(icon) {
position: absolute;
left: 22px;
i::before {
color: #626778FF;
}
fill: $--n-text-color;
}
}
@include b(nimbus-service-layout-drawer-item) {