|
|
@@ -9,11 +9,10 @@ Provide navigation function, often used at the top of the page.
|
|
|
```javascript
|
|
|
|
|
|
import { createApp } from 'vue';
|
|
|
-import { Navbar,Icon,Tabs, TabPane } from '@nutui/nutui';
|
|
|
+import { Navbar, Tabs, TabPane } from '@nutui/nutui';
|
|
|
|
|
|
const app = createApp();
|
|
|
app.use(Navbar);
|
|
|
-app.use(Icon);
|
|
|
app.use(Tabs);
|
|
|
app.use(TabPane);
|
|
|
```
|
|
|
@@ -28,7 +27,7 @@ app.use(TabPane);
|
|
|
<div>Back</div>
|
|
|
</template>
|
|
|
<template #right>
|
|
|
- <nut-icon class="right" name="share-n"></nut-icon>
|
|
|
+ <ShareN width="16px"></ShareN>
|
|
|
</template>
|
|
|
</nut-navbar>
|
|
|
|
|
|
@@ -47,18 +46,23 @@ app.use(TabPane);
|
|
|
@on-click-icon="icon"
|
|
|
@on-click-right="rightClick"
|
|
|
title="Cart"
|
|
|
- titIcon="cart2"
|
|
|
+ :titleIcon="true"
|
|
|
desc="Edit"
|
|
|
>
|
|
|
+ <template #titleIcon>
|
|
|
+ <Cart2 width="16px"></Cart2>
|
|
|
+ </template>
|
|
|
<template #right>
|
|
|
- <nut-icon class="right" name="more-x"></nut-icon>
|
|
|
+ <MoreX class="right" width="16px"></MoreX>
|
|
|
</template>
|
|
|
</nut-navbar>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { ref } from 'vue';
|
|
|
+ import { ShareN, Cart2, MoreX } from '@nutui/icons-vue';
|
|
|
export default {
|
|
|
+ components: { ShareN, Cart2, MoreX },
|
|
|
setup() {
|
|
|
const methods = {
|
|
|
back() {
|
|
|
@@ -101,14 +105,16 @@ app.use(TabPane);
|
|
|
</template>
|
|
|
|
|
|
<template #right>
|
|
|
- <nut-icon class="right" name="more-x"></nut-icon>
|
|
|
+ <MoreX class="right" width="16px"></MoreX>
|
|
|
</template>
|
|
|
</nut-navbar>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { ref } from 'vue';
|
|
|
+import { MoreX } from '@nutui/icons-vue';
|
|
|
export default {
|
|
|
+ components: { MoreX },
|
|
|
setup() {
|
|
|
const tab1value = ref(0);
|
|
|
const methods = {
|
|
|
@@ -150,18 +156,20 @@ export default {
|
|
|
</nut-tabs>
|
|
|
</template>
|
|
|
<template #icons>
|
|
|
- <nut-icon class="icon" name="share"></nut-icon>
|
|
|
- </template>
|
|
|
+ <nut-icon class="icon" name="share"></nut-icon>
|
|
|
+ </template>
|
|
|
|
|
|
<template #right>
|
|
|
- <nut-icon class="right" name="horizontal-n"></nut-icon>
|
|
|
+ <HorizontalN class="right" width="16px"></HorizontalN>
|
|
|
</template>
|
|
|
</nut-navbar>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { ref } from 'vue';
|
|
|
+ import { HorizontalN } from '@nutui/icons-vue';
|
|
|
export default {
|
|
|
+ components: { HorizontalN },
|
|
|
setup() {
|
|
|
const tab2value = ref(0);
|
|
|
const methods = {
|
|
|
@@ -191,7 +199,7 @@ export default {
|
|
|
| left-text `v3.1.21` | Left Text | String | - |
|
|
|
| desc | Desc | String | - |
|
|
|
| left-show | Whether to show the left arrow | Boolean | false |
|
|
|
-| tit-icon | Insert icon in title | String | - |
|
|
|
+| title-icon | Whether to show icon in title | Boolean | false |
|
|
|
| border `v3.1.21` | Whether to show bottom border | Boolean | false |
|
|
|
| fixed | Is it pinned to the top | Boolean | false |
|
|
|
| placeholder `v3.1.21` | Whether to generate a placeholder element when fixed | Boolean | false |
|
|
|
@@ -209,6 +217,8 @@ export default {
|
|
|
### Slots
|
|
|
| Name | Description |
|
|
|
|-------|----------|
|
|
|
-| left | 自定义左侧内容 |
|
|
|
-| right | 自定义右侧内容 |
|
|
|
-| content | 自定义导航栏中间内容 |
|
|
|
+| left | Customize left content |
|
|
|
+| right | Customize the content on the right |
|
|
|
+| content | Customize the middle content of the navigation bar |
|
|
|
+| leftShow | Custom icon of left arrow |
|
|
|
+| titleIcon | Custom icon in header |
|