mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 09:21:25 +08:00
71 lines
1.6 KiB
Vue
71 lines
1.6 KiB
Vue
|
<docs>
|
||
|
---
|
||
|
order: 0
|
||
|
title:
|
||
|
zh-CN: 顶部导航
|
||
|
en-US: Top Navigation
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
水平的顶部导航菜单。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
Horizontal top navigation menu.
|
||
|
|
||
|
</docs>
|
||
|
|
||
|
<template>
|
||
|
<a-menu v-model:selectedKeys="current" mode="horizontal">
|
||
|
<a-menu-item key="mail">
|
||
|
<template #icon>
|
||
|
<mail-outlined />
|
||
|
</template>
|
||
|
Navigation One
|
||
|
</a-menu-item>
|
||
|
<a-menu-item key="app" disabled>
|
||
|
<template #icon>
|
||
|
<appstore-outlined />
|
||
|
</template>
|
||
|
Navigation Two
|
||
|
</a-menu-item>
|
||
|
<a-sub-menu>
|
||
|
<template #icon>
|
||
|
<setting-outlined />
|
||
|
</template>
|
||
|
<template #title>Navigation Three - Submenu</template>
|
||
|
<a-menu-item-group title="Item 1">
|
||
|
<a-menu-item key="setting:1">Option 1</a-menu-item>
|
||
|
<a-menu-item key="setting:2">Option 2</a-menu-item>
|
||
|
</a-menu-item-group>
|
||
|
<a-menu-item-group title="Item 2">
|
||
|
<a-menu-item key="setting:3">Option 3</a-menu-item>
|
||
|
<a-menu-item key="setting:4">Option 4</a-menu-item>
|
||
|
</a-menu-item-group>
|
||
|
</a-sub-menu>
|
||
|
<a-menu-item key="alipay">
|
||
|
<a href="https://antdv.com" target="_blank" rel="noopener noreferrer">
|
||
|
Navigation Four - Link
|
||
|
</a>
|
||
|
</a-menu-item>
|
||
|
</a-menu>
|
||
|
</template>
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, ref } from 'vue';
|
||
|
import { MailOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons-vue';
|
||
|
export default defineComponent({
|
||
|
components: {
|
||
|
MailOutlined,
|
||
|
AppstoreOutlined,
|
||
|
SettingOutlined,
|
||
|
},
|
||
|
setup() {
|
||
|
const current = ref<string[]>(['mail']);
|
||
|
return {
|
||
|
current,
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
</script>
|