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

View File

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

View File

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