Comments (4)
id改成 ‘1’ 试试
from ant-design-vue.
aaa
{{ menu.id }}
{{ menu.title }}
<a class="ant-dropdown-link" @click.prevent>
Hover me
<template #overlay>
1st menu item
2nd menu item
3rd menu item
<div style="float: right;padding-right: 20px">
<a-avatar :size="32">
<template #icon>
<UserOutlined/>
</template>
</a-avatar>
</div>
</a-layout-header>
<a-layout-content style="margin: 0 16px">
<!-- <a-breadcrumb style="margin: 16px 0">-->
<!-- <a-breadcrumb-item>主页</a-breadcrumb-item>-->
<!-- <a-breadcrumb-item>Bill</a-breadcrumb-item>-->
<!-- <a-breadcrumb-item>aaa</a-breadcrumb-item>-->
<!-- </a-breadcrumb>-->
<a-breadcrumb style="margin: 16px 0">
<a-breadcrumb-item>主页</a-breadcrumb-item>
<template v-for="item in menu_list" :key="item.id">
<a-breadcrumb-item v-if="item.id === selectedKeys[0]">{{ item.title }}</a-breadcrumb-item>
</template>
</a-breadcrumb>
<div :style="{ padding: '24px', background: '#fff', minHeight: '360px' }">
<router-view></router-view>
</div>
</a-layout-content>
<a-layout-footer style="text-align: center">
Ant Design ©2024 Created by Ant UED
</a-layout-footer>
</a-layout>
import {defineComponent, ref} from 'vue';
import {
PieChartOutlined,
DesktopOutlined,
FieldTimeOutlined,
UserOutlined,
DownOutlined
} from '@ant-design/icons-vue'
const collapsed = ref(false);
const selectedKeys = ref(['1']);
const menu_list = ref([
{
id: 1, icon: 'PieChartOutlined', title: '展示中心', tube: '', 'menu_url': '/uric/show_center', children: []
},
{
id: 2, icon: 'DesktopOutlined', title: '资产管理', 'menu_url': '/uric/host', children: []
},
{
"id": 3, icon: 'bold', title: '批量任务', tube: '', menu_url: '/uric/workbench', children: [
{id: 10, icon: 'mail', title: '执行任务', 'menu_url': '/uric/multi_exec'},
{id: 11, icon: 'mail', title: '命令管理', 'menu_url': '/uric/template_manage'},
]
},
{
id: 4, icon: 'highlight', title: '代码发布', tube: '', menu_url: '/uric/workbench', children: [
{id: 12, title: '应用管理', menu_url: '/uric/release'},
{id: 13, title: '发布申请', menu_url: '/uric/release'}
]
},
{id: 5, icon: 'FieldTimeOutlined', title: '定时计划', tube: '', menu_url: '/uric/workbench', children: []},
{
id: 6, icon: 'mail', title: '配置管理', tube: '', menu_url: '/uric/workbench', children: [
{id: 14, title: '环境管理', 'menu_url': '/uric/environment'},
{id: 15, title: '服务配置', 'menu_url': '/uric/workbench'},
{id: 16, title: '应用配置', 'menu_url': '/uric/workbench'}
]
},
])
.site-layout .site-layout-background {
background: #fff;
}
[data-theme='dark'] .site-layout .site-layout-background {
background: #141414;
}
</style>这是我的脚本麻烦帮忙看看
from ant-design-vue.
@linzehai0801 我的意思是,你的id是数字,但是selectKeys里的是字符串,这两个要保持统一,把你menu_list里的id:1改成id: '1'这样
from ant-design-vue.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
from ant-design-vue.
Related Issues (20)
- 设置Tabs 的tabBarStyle样式borderBottom:'unset',无法清掉选项卡组件底部灰色细线,此设置在vue2.6.12和ant-design-vue 1.7.8上验证有效 HOT 2
- ignore this Issue
- 添加input.otp功能 HOT 2
- Select 组件多选的情况下默认值展示bug HOT 2
- 使用Vite5,配置兼容Ant3的Less变量时,报`SyntaxError: Cannot use import statement outside a module`错误
- Select组件大量数据时会报错 HOT 1
- 使用 colorLink 配置链接色后没有通过算法重新计算 colorLinkHover 和 colorLinkActive
- [Upload]组件,自定义上传onSuccess回调不生效 HOT 1
- After the width: 0, srcoll property is set for the table component, if the initial v-show is false and the v-show is changed to true, the table header is still not displayed
- Select 和 Cascader 组件在带搜索的多选模式下时,当前输入的关键字被隐藏了 HOT 1
- Select 和 Cascader 组件在带搜索的多选模式下时,当前输入的关键字被隐藏了 HOT 1
- table 组件 树形表格支持懒加载
- 4.2.0版本以后,tooltip 在低版本浏览器 chrome65 中显示位置不对
- [Feature] 支持按钮渐变色
- RangePicker官方示例报错 HOT 1
- TreeSelect组件希望同步Tree的相关api(blockNode)
- ant design vue table getCheckboxProps set indeterminate not working
- DatePicker renderExtraFooter 中的 Input 无法被选中/输入内容
- Menu 在折叠后会失去 openkeys HOT 1
- Table row-selection父子节点事件和属性优先级问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design-vue.