From 40339b8542aa767beda55d1ff1bc06443a651f1a Mon Sep 17 00:00:00 2001 From: wuyiping0628 <42107997+wuyiping0628@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:13:41 -0800 Subject: [PATCH] feat(nav-menu): [nav-menu] Simplify the demo data (#2728) * feat(nav-menu): [nav-menu] Simplify the demo data * feat(nav-menu): [nav-menu] Simplify the demo data --- .../allow-full-url-composition-api.vue | 260 +++---------- .../demos/pc/app/nav-menu/allow-full-url.vue | 260 +++---------- .../nav-menu/basic-usage-composition-api.vue | 258 +++---------- .../demos/pc/app/nav-menu/basic-usage.spec.ts | 3 - .../demos/pc/app/nav-menu/basic-usage.vue | 258 +++---------- .../nav-menu/before-skip-composition-api.vue | 258 +++---------- .../before-skip-prevent-composition-api.vue | 260 +++---------- .../app/nav-menu/before-skip-prevent.spec.ts | 4 +- .../pc/app/nav-menu/before-skip-prevent.vue | 260 +++---------- .../demos/pc/app/nav-menu/before-skip.spec.ts | 10 +- .../demos/pc/app/nav-menu/before-skip.vue | 258 +++---------- .../app/nav-menu/crm-demo-composition-api.vue | 333 ----------------- .../sites/demos/pc/app/nav-menu/crm-demo.vue | 342 ------------------ .../custom-service-composition-api.vue | 246 +++---------- .../demos/pc/app/nav-menu/custom-service.vue | 246 +++---------- .../app/nav-menu/overflow-composition-api.vue | 264 ++++---------- .../sites/demos/pc/app/nav-menu/overflow.vue | 264 ++++---------- .../nav-menu/parent-key-composition-api.vue | 55 +-- .../demos/pc/app/nav-menu/parent-key.vue | 55 +-- .../app/nav-menu/selecte-composition-api.vue | 280 ++------------ .../demos/pc/app/nav-menu/selecte.spec.ts | 2 +- .../sites/demos/pc/app/nav-menu/selecte.vue | 281 ++------------ .../nav-menu/slot-logo-composition-api.vue | 258 +++---------- .../sites/demos/pc/app/nav-menu/slot-logo.vue | 258 +++---------- .../nav-menu/slot-toolbar-composition-api.vue | 258 +++---------- .../demos/pc/app/nav-menu/slot-toolbar.vue | 258 +++---------- .../demos/pc/app/nav-menu/webdoc/nav-menu.js | 12 - packages/theme/src/nav-menu/index.less | 1 - 28 files changed, 855 insertions(+), 4647 deletions(-) delete mode 100644 examples/sites/demos/pc/app/nav-menu/crm-demo-composition-api.vue delete mode 100644 examples/sites/demos/pc/app/nav-menu/crm-demo.vue diff --git a/examples/sites/demos/pc/app/nav-menu/allow-full-url-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/allow-full-url-composition-api.vue index 07fe3e5aa0..7db9e08db7 100644 --- a/examples/sites/demos/pc/app/nav-menu/allow-full-url-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/allow-full-url-composition-api.vue @@ -11,293 +11,125 @@ import { TinyNavMenu } from '@opentiny/vue' const menuData = ref([ { title: '首页', - url: 'https://www.baidu.com/' + url: 'https://www.baidu.com/', + id: '1' }, { title: '指南', - url: '#/zh-CN/component/button', + url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: '#/zh-CN/component/button' - }, { title: 'Datepicker 日期', - url: '#/zh-CN/component/datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: '#/zh-CN/component/dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: '#/zh-CN/component/droptimes' - }, - { - title: 'Input 输入框', - url: '#/zh-CN/component/input' - }, - { - title: 'Textarea 文本域', - url: '#/zh-CN/component/textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: '#/zh-CN/component/chart' - }, - { - title: 'Grid 数据表格', - url: '#/zh-CN/component/grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: '#/zh-CN/component/pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: '#/zh-CN/component/tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: '#/zh-CN/component/toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: '#/zh-CN/component/treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: '#/zh-CN/component/amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: '#/zh-CN/component/area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: '#/zh-CN/component/company' - }, - { - title: 'Dept 部门', - url: '#/zh-CN/component/dept' - }, - { - title: 'eDoc 企业文档', - url: '#/zh-CN/component/Edoc' - }, - { - title: 'User 用户', - url: '#/zh-CN/component/user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/allow-full-url.vue b/examples/sites/demos/pc/app/nav-menu/allow-full-url.vue index 4299247af5..b7b8dda846 100644 --- a/examples/sites/demos/pc/app/nav-menu/allow-full-url.vue +++ b/examples/sites/demos/pc/app/nav-menu/allow-full-url.vue @@ -16,293 +16,125 @@ export default { menuData: [ { title: '首页', - url: 'https://www.baidu.com/' + url: 'https://www.baidu.com/', + id: '1' }, { title: '指南', - url: '#/zh-CN/component/button', + url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: '#/zh-CN/component/button' - }, { title: 'Datepicker 日期', - url: '#/zh-CN/component/datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: '#/zh-CN/component/dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: '#/zh-CN/component/droptimes' - }, - { - title: 'Input 输入框', - url: '#/zh-CN/component/input' - }, - { - title: 'Textarea 文本域', - url: '#/zh-CN/component/textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: '#/zh-CN/component/chart' - }, - { - title: 'Grid 数据表格', - url: '#/zh-CN/component/grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: '#/zh-CN/component/pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: '#/zh-CN/component/tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: '#/zh-CN/component/toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: '#/zh-CN/component/treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: '#/zh-CN/component/amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: '#/zh-CN/component/area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: '#/zh-CN/component/company' - }, - { - title: 'Dept 部门', - url: '#/zh-CN/component/dept' - }, - { - title: 'eDoc 企业文档', - url: '#/zh-CN/component/Edoc' - }, - { - title: 'User 用户', - url: '#/zh-CN/component/user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/basic-usage-composition-api.vue index b2ffdc9d55..2ad6702b28 100644 --- a/examples/sites/demos/pc/app/nav-menu/basic-usage-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/basic-usage-composition-api.vue @@ -11,293 +11,125 @@ import { TinyNavMenu } from '@opentiny/vue' const menuData = ref([ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/basic-usage.spec.ts b/examples/sites/demos/pc/app/nav-menu/basic-usage.spec.ts index 2de7c80dcb..3e1cb8945d 100644 --- a/examples/sites/demos/pc/app/nav-menu/basic-usage.spec.ts +++ b/examples/sites/demos/pc/app/nav-menu/basic-usage.spec.ts @@ -11,7 +11,4 @@ test('基础用法', async ({ page }) => { const components = preview.getByText('组件') await components.hover() await expect(popMenu).toBeVisible() - const showMore = preview.getByText('更多') - await showMore.hover() - await expect(popMenu).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/nav-menu/basic-usage.vue b/examples/sites/demos/pc/app/nav-menu/basic-usage.vue index 9c69265f83..2e815f9c0d 100644 --- a/examples/sites/demos/pc/app/nav-menu/basic-usage.vue +++ b/examples/sites/demos/pc/app/nav-menu/basic-usage.vue @@ -16,293 +16,125 @@ export default { menuData: [ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/before-skip-composition-api.vue index a3ef2adc3e..5f1267e585 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/before-skip-composition-api.vue @@ -11,293 +11,125 @@ import { TinyNavMenu, TinyModal } from '@opentiny/vue' const menuData = ref([ { title: '首页', - url: '' + url: '/overview', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager' - }, - { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent-composition-api.vue index 63cd69d604..e0de26064a 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent-composition-api.vue @@ -16,293 +16,125 @@ import { iconTotal } from '@opentiny/vue-icon' const menuData = ref([ { title: '首页', - url: '#/zh-CN/index' + url: '/overview', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', - url: '#/zh-CN/components', + url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '#/zh-CN/guides', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.spec.ts b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.spec.ts index e9928eb796..aa0d51f962 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.spec.ts +++ b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.spec.ts @@ -11,9 +11,9 @@ test('使用组件默认服务时,菜单跳转处理', async ({ page }) => { .first() await preview.getByText('首页').click() await expect(modal).toBeVisible() - const components = preview.locator('a').filter({ hasText: '组件' }) + const components = preview.getByText('组件') await components.hover() await expect(popMenu).toBeVisible() - await components.click() + await components.nth(0).click() await expect(modal).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.vue b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.vue index ec2744e3c4..de78731f34 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.vue +++ b/examples/sites/demos/pc/app/nav-menu/before-skip-prevent.vue @@ -31,293 +31,125 @@ export default { menuData: [ { title: '首页', - url: '#/zh-CN/index' + url: '/overview', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', - url: '#/zh-CN/components', + url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '#/zh-CN/guides', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip.spec.ts b/examples/sites/demos/pc/app/nav-menu/before-skip.spec.ts index 4cdca3fdd9..a4628e05e1 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip.spec.ts +++ b/examples/sites/demos/pc/app/nav-menu/before-skip.spec.ts @@ -1,11 +1,11 @@ import { test, expect } from '@playwright/test' -test('菜单跳转处理', async ({ page }) => { +test('跳转前处理', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('nav-menu#before-skip') const preview = page.locator('#before-skip') - await preview.getByText('规范').click() - await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:规范' }).first()).toBeVisible() - await preview.getByText('案例').click() - await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:案例' }).first()).toBeVisible() + await preview.getByText('首页').click() + await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:首页' }).first()).toBeVisible() + await preview.getByText('其他').click() + await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:其他' }).first()).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/nav-menu/before-skip.vue b/examples/sites/demos/pc/app/nav-menu/before-skip.vue index 4ae374dc44..fcac341170 100644 --- a/examples/sites/demos/pc/app/nav-menu/before-skip.vue +++ b/examples/sites/demos/pc/app/nav-menu/before-skip.vue @@ -16,293 +16,125 @@ export default { menuData: [ { title: '首页', - url: '' + url: '/overview', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager' - }, - { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/crm-demo-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/crm-demo-composition-api.vue deleted file mode 100644 index 323e0970a8..0000000000 --- a/examples/sites/demos/pc/app/nav-menu/crm-demo-composition-api.vue +++ /dev/null @@ -1,333 +0,0 @@ - - - - - diff --git a/examples/sites/demos/pc/app/nav-menu/crm-demo.vue b/examples/sites/demos/pc/app/nav-menu/crm-demo.vue deleted file mode 100644 index c2ba3f6a2d..0000000000 --- a/examples/sites/demos/pc/app/nav-menu/crm-demo.vue +++ /dev/null @@ -1,342 +0,0 @@ - - - - - diff --git a/examples/sites/demos/pc/app/nav-menu/custom-service-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/custom-service-composition-api.vue index 37ed8b3938..5b26b9e17d 100644 --- a/examples/sites/demos/pc/app/nav-menu/custom-service-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/custom-service-composition-api.vue @@ -16,281 +16,125 @@ function getMenuData() { let menuData = [ { label: '首页', - urlField: '' + urlField: '', + id: '1' }, { label: '指南', urlField: '', + id: '2', children: [ { label: '引入组件', urlField: '', - children: [ - { - label: '按需引入', - urlField: '' - }, - { - label: '完整引入', - urlField: '' - } - ] + id: '2-1' }, { label: '后端适配器', urlField: '', - children: [ - { - label: 'Gateway 适配器', - urlField: '' - }, - { - label: 'Jalor 适配器', - urlField: '' - }, - { - label: 'Standalone 适配器', - urlField: '' - } - ] - }, - { - label: '服务代理', - urlField: '', - children: [ - { - label: '本地代理', - urlField: '' - }, - { - label: '远程代理', - urlField: '' - } - ] - }, - { - label: '构建部署', - urlField: '', - children: [ - { - label: '本地构建', - urlField: '' - }, - { - label: '查看构建报告', - urlField: '' - }, - { - label: '静态资源构建', - urlField: '' - }, - { - label: '多环境部署', - urlField: '' - }, - { - label: '静态资源部署', - urlField: '' - }, - { - label: 'CI 部署', - urlField: '' - }, - { - label: '引入静态资源', - urlField: '' - } - ] + id: '2-2' } ] }, { label: '组件', urlField: '', + id: '3', children: [ { label: '表单组件', urlField: '', + id: '3-1', children: [ - { - label: 'Button 按钮', - urlField: 'button' - }, { label: 'Datepicker 日期', - urlField: 'datepicker' + urlField: 'datepicker', + id: '3-1-1' }, { - label: 'Dropdown 下拉框', - urlField: 'dropdown' + label: 'Cascader 级联选择器', + urlField: 'cascader', + id: '3-1-2' }, { label: 'DropTimes 下拉时间', - urlField: 'droptimes' - }, - { - label: 'Input 输入框', - urlField: 'input' - }, - { - label: 'Textarea 文本域', - urlField: 'textarea' + urlField: 'droptimes', + id: '3-1-3' } ] }, { - label: '数据组件', + label: '数据展示', urlField: '', + id: '3-2', children: [ { - label: 'Chart 图表', - urlField: 'chart' + label: 'Card 卡片', + urlField: 'card', + id: '3-2-1' }, { - label: 'Grid 数据表格', - urlField: 'grid' + label: 'Collapse 折叠面板', + urlField: 'collapse', + id: '3-2-2' }, { - label: 'Pager 分页', - urlField: 'pager' - }, - { - label: 'Tree 树形控件', - urlField: 'tree' + label: 'Guide 引导', + urlField: 'guide', + id: '3-2-3' } ] }, { label: '导航组件', urlField: '', + id: '3-3', children: [ { label: 'ToggleMenu 收缩菜单', - urlField: 'toggleMenu' + urlField: 'toggleMenu', + id: '3-3-1' }, { label: 'TreeMenu 树型菜单', - urlField: 'treemenu' + urlField: 'treemenu', + id: '3-3-2' + }, + { + label: 'Breadcrumb 面包屑', + urlField: 'breadcrumb', + id: '3-3-3' } ] }, { label: '业务组件', urlField: '', + id: '3-4', children: [ { label: 'Amount 金额', - urlField: 'amount' + urlField: 'amount', + id: '3-4-1' }, { label: 'Area 片区', - urlField: 'area' + urlField: 'area', + id: '3-4-2' }, { label: 'Company 公司', - urlField: 'company' - }, - { - label: 'Dept 部门', - urlField: 'dept' - }, - { - label: 'eDoc 企业文档', - urlField: 'Edoc' - }, - { - label: 'User 用户', - urlField: 'user' + urlField: 'company', + id: '3-4-3' } ] } ] }, { - label: '教程', - urlField: '', - children: [ - { - label: '页面布局', - urlField: '', - children: [ - { - label: '添加标签页', - urlField: '#/zh-CN/tutorial/addtabs' - }, - { - label: '标签页配置', - urlField: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - label: '查询功能', - urlField: '', - children: [ - { - label: '添加查询页面', - urlField: '#/zh-CN/tutorial/addlist' - }, - { - label: '列表属性配置', - urlField: '#/zh-CN/tutorial/listattr' - }, - { - label: '通讯录查询', - urlField: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - label: '新增功能', - urlField: '', - children: [ - { - label: '表单新增功能', - urlField: '#/zh-CN/tutorial/addservice' - }, - { - label: '表单数据验证', - urlField: '#/zh-CN/tutorial/valid' - } - ] - }, - { - label: '编辑功能', - urlField: '', - children: [ - { - label: '开启编辑功能', - urlField: '#/zh-CN/tutorial/editattr' - }, - { - label: '保存表格数据', - urlField: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - label: '规范', - urlField: '' - }, - { - label: '性能', - urlField: '' - }, - { - label: '案例', - urlField: '' - }, - { - label: '更新日志', - urlField: '' - }, - { - label: '测试', - urlField: '' + label: '其他', + urlField: 'crop', + id: '4' } ] diff --git a/examples/sites/demos/pc/app/nav-menu/custom-service.vue b/examples/sites/demos/pc/app/nav-menu/custom-service.vue index 5142c7a237..0b5e6f9d7e 100644 --- a/examples/sites/demos/pc/app/nav-menu/custom-service.vue +++ b/examples/sites/demos/pc/app/nav-menu/custom-service.vue @@ -24,281 +24,125 @@ export default { let menuData = [ { label: '首页', - urlField: '' + urlField: '', + id: '1' }, { label: '指南', urlField: '', + id: '2', children: [ { label: '引入组件', urlField: '', - children: [ - { - label: '按需引入', - urlField: '' - }, - { - label: '完整引入', - urlField: '' - } - ] + id: '2-1' }, { label: '后端适配器', urlField: '', - children: [ - { - label: 'Gateway 适配器', - urlField: '' - }, - { - label: 'Jalor 适配器', - urlField: '' - }, - { - label: 'Standalone 适配器', - urlField: '' - } - ] - }, - { - label: '服务代理', - urlField: '', - children: [ - { - label: '本地代理', - urlField: '' - }, - { - label: '远程代理', - urlField: '' - } - ] - }, - { - label: '构建部署', - urlField: '', - children: [ - { - label: '本地构建', - urlField: '' - }, - { - label: '查看构建报告', - urlField: '' - }, - { - label: '静态资源构建', - urlField: '' - }, - { - label: '多环境部署', - urlField: '' - }, - { - label: '静态资源部署', - urlField: '' - }, - { - label: 'CI 部署', - urlField: '' - }, - { - label: '引入静态资源', - urlField: '' - } - ] + id: '2-2' } ] }, { label: '组件', urlField: '', + id: '3', children: [ { label: '表单组件', urlField: '', + id: '3-1', children: [ - { - label: 'Button 按钮', - urlField: 'button' - }, { label: 'Datepicker 日期', - urlField: 'datepicker' + urlField: 'datepicker', + id: '3-1-1' }, { - label: 'Dropdown 下拉框', - urlField: 'dropdown' + label: 'Cascader 级联选择器', + urlField: 'cascader', + id: '3-1-2' }, { label: 'DropTimes 下拉时间', - urlField: 'droptimes' - }, - { - label: 'Input 输入框', - urlField: 'input' - }, - { - label: 'Textarea 文本域', - urlField: 'textarea' + urlField: 'droptimes', + id: '3-1-3' } ] }, { - label: '数据组件', + label: '数据展示', urlField: '', + id: '3-2', children: [ { - label: 'Chart 图表', - urlField: 'chart' + label: 'Card 卡片', + urlField: 'card', + id: '3-2-1' }, { - label: 'Grid 数据表格', - urlField: 'grid' + label: 'Collapse 折叠面板', + urlField: 'collapse', + id: '3-2-2' }, { - label: 'Pager 分页', - urlField: 'pager' - }, - { - label: 'Tree 树形控件', - urlField: 'tree' + label: 'Guide 引导', + urlField: 'guide', + id: '3-2-3' } ] }, { label: '导航组件', urlField: '', + id: '3-3', children: [ { label: 'ToggleMenu 收缩菜单', - urlField: 'toggleMenu' + urlField: 'toggleMenu', + id: '3-3-1' }, { label: 'TreeMenu 树型菜单', - urlField: 'treemenu' + urlField: 'treemenu', + id: '3-3-2' + }, + { + label: 'Breadcrumb 面包屑', + urlField: 'breadcrumb', + id: '3-3-3' } ] }, { label: '业务组件', urlField: '', + id: '3-4', children: [ { label: 'Amount 金额', - urlField: 'amount' + urlField: 'amount', + id: '3-4-1' }, { label: 'Area 片区', - urlField: 'area' + urlField: 'area', + id: '3-4-2' }, { label: 'Company 公司', - urlField: 'company' - }, - { - label: 'Dept 部门', - urlField: 'dept' - }, - { - label: 'eDoc 企业文档', - urlField: 'Edoc' - }, - { - label: 'User 用户', - urlField: 'user' + urlField: 'company', + id: '3-4-3' } ] } ] }, { - label: '教程', - urlField: '', - children: [ - { - label: '页面布局', - urlField: '', - children: [ - { - label: '添加标签页', - urlField: '#/zh-CN/tutorial/addtabs' - }, - { - label: '标签页配置', - urlField: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - label: '查询功能', - urlField: '', - children: [ - { - label: '添加查询页面', - urlField: '#/zh-CN/tutorial/addlist' - }, - { - label: '列表属性配置', - urlField: '#/zh-CN/tutorial/listattr' - }, - { - label: '通讯录查询', - urlField: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - label: '新增功能', - urlField: '', - children: [ - { - label: '表单新增功能', - urlField: '#/zh-CN/tutorial/addservice' - }, - { - label: '表单数据验证', - urlField: '#/zh-CN/tutorial/valid' - } - ] - }, - { - label: '编辑功能', - urlField: '', - children: [ - { - label: '开启编辑功能', - urlField: '#/zh-CN/tutorial/editattr' - }, - { - label: '保存表格数据', - urlField: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - label: '规范', - urlField: '' - }, - { - label: '性能', - urlField: '' - }, - { - label: '案例', - urlField: '' - }, - { - label: '更新日志', - urlField: '' - }, - { - label: '测试', - urlField: '' + label: '其他', + urlField: 'crop', + id: '4' } ] diff --git a/examples/sites/demos/pc/app/nav-menu/overflow-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/overflow-composition-api.vue index a27aaf62e2..592d027a53 100644 --- a/examples/sites/demos/pc/app/nav-menu/overflow-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/overflow-composition-api.vue @@ -11,293 +11,155 @@ import { TinyNavMenu } from '@opentiny/vue' const menuData = ref([ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager' - }, - { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' + title: '其他', + url: 'crop', + id: '4' }, { - title: '案例', - url: '#/zh-CN/example' + title: '表格', + url: '', + id: '5' }, { - title: '更新日志', - url: '#/zh-CN/guide/changelog' + title: '数据展示', + url: '', + id: '6' }, { - title: '测试', - url: '#/zh-CN/guide/aaa' + title: '反馈', + url: '', + id: '7' }, { - title: '资源', - url: '' + title: '图表', + url: '', + id: '8' }, { - title: 'SDK', - url: '' + title: '数据展示', + url: '', + id: '9' }, { - title: 'TINY 学院', - url: '' + title: '业务组件', + url: '', + id: '10' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/overflow.vue b/examples/sites/demos/pc/app/nav-menu/overflow.vue index ef74bd09ad..14b6bd218e 100644 --- a/examples/sites/demos/pc/app/nav-menu/overflow.vue +++ b/examples/sites/demos/pc/app/nav-menu/overflow.vue @@ -16,293 +16,155 @@ export default { menuData: [ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager' - }, - { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' + title: '其他', + url: 'crop', + id: '4' }, { - title: '案例', - url: '#/zh-CN/example' + title: '表格', + url: '', + id: '5' }, { - title: '更新日志', - url: '#/zh-CN/guide/changelog' + title: '数据展示', + url: '', + id: '6' }, { - title: '测试', - url: '#/zh-CN/guide/aaa' + title: '反馈', + url: '', + id: '7' }, { - title: '资源', - url: '' + title: '图表', + url: '', + id: '8' }, { - title: 'SDK', - url: '' + title: '数据展示', + url: '', + id: '9' }, { - title: 'TINY 学院', - url: '' + title: '业务组件', + url: '', + id: '10' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/parent-key-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/parent-key-composition-api.vue index ec07b83a03..41d75a0d03 100644 --- a/examples/sites/demos/pc/app/nav-menu/parent-key-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/parent-key-composition-api.vue @@ -12,15 +12,7 @@ const menuData = ref([ { id: 1, pid: 0, title: '首页', url: '' }, { id: 2, pid: 0, title: '指南', url: '' }, { id: 3, pid: 0, title: '组件', url: '' }, - { id: 4, pid: 0, title: '教程', url: '' }, - { id: 5, pid: 0, title: '规范', url: '#/zh-CN/regular/rulelevel' }, - { id: 6, pid: 0, title: '性能', url: '#/zh-CN/speed' }, - { id: 7, pid: 0, title: '案例', url: '#/zh-CN/example' }, - { id: 8, pid: 0, title: '更新日志', url: '#/zh-CN/guide/changelog' }, - { id: 9, pid: 0, title: '测试', url: '#/zh-CN/guide/aaa' }, - { id: 10, pid: 0, title: '资源', url: '' }, - { id: 11, pid: 0, title: 'SDK', url: '' }, - { id: 12, pid: 0, title: 'TINY 学院', url: '' }, + { id: 9, pid: 0, title: '其他', url: 'crop' }, { id: 13, pid: 2, title: '引入组件', url: '' }, { id: 14, pid: 2, title: '后端适配器', url: '' }, { id: 15, pid: 2, title: '服务代理', url: '' }, @@ -47,33 +39,24 @@ const menuData = ref([ { id: 36, pid: 16, title: '静态资源部署', url: '' }, { id: 37, pid: 16, title: 'CI 部署', url: '' }, { id: 38, pid: 16, title: '引入静态资源', url: '' }, - { id: 39, pid: 17, title: 'Button 按钮', url: '#/zh-CN/component/button' }, - { id: 40, pid: 17, title: 'Datepicker 日期', url: '#/zh-CN/component/datepicker' }, - { id: 41, pid: 17, title: 'Dropdown 下拉框', url: '#/zh-CN/component/dropdown' }, - { id: 42, pid: 17, title: 'DropTimes 下拉时间', url: '#/zh-CN/component/droptimes' }, - { id: 43, pid: 17, title: 'Input 输入框', url: '#/zh-CN/component/input' }, - { id: 44, pid: 17, title: 'Textarea 文本域', url: '#/zh-CN/component/textarea' }, - { id: 45, pid: 18, title: 'Chart 图表', url: '#/zh-CN/component/chart' }, - { id: 46, pid: 18, title: 'Grid 数据表格', url: '#/zh-CN/component/grid' }, - { id: 47, pid: 18, title: 'Pager 分页', url: '#/zh-CN/component/pager' }, - { id: 48, pid: 18, title: 'Tree 树形控件', url: '#/zh-CN/component/tree' }, - { id: 49, pid: 19, title: 'ToggleMenu 收缩菜单', url: '#/zh-CN/component/toggleMenu' }, - { id: 50, pid: 19, title: 'TreeMenu 树型菜单', url: '#/zh-CN/component/treemenu' }, - { id: 51, pid: 20, title: 'Amount 金额', url: '#/zh-CN/component/amount' }, - { id: 52, pid: 20, title: 'Area 片区', url: '#/zh-CN/component/area' }, - { id: 53, pid: 20, title: 'Company 公司', url: '#/zh-CN/component/company' }, - { id: 54, pid: 20, title: 'Dept 部门', url: '#/zh-CN/component/dept' }, - { id: 55, pid: 20, title: 'eDoc 企业文档', url: '#/zh-CN/component/Edoc' }, - { id: 56, pid: 20, title: 'User 用户', url: '#/zh-CN/component/user' }, - { id: 57, pid: 21, title: '添加标签页', url: '#/zh-CN/tutorial/addtabs' }, - { id: 58, pid: 21, title: '标签页配置', url: '#/zh-CN/tutorial/tabsattr' }, - { id: 59, pid: 22, title: '添加查询页面', url: '#/zh-CN/tutorial/addlist' }, - { id: 60, pid: 22, title: '列表属性配置', url: '#/zh-CN/tutorial/listattr' }, - { id: 61, pid: 22, title: '通讯录查询', url: '#/zh-CN/tutorial/searchfunc' }, - { id: 62, pid: 23, title: '表单新增功能', url: '#/zh-CN/tutorial/addservice' }, - { id: 63, pid: 23, title: '表单数据验证', url: '#/zh-CN/tutorial/valid' }, - { id: 64, pid: 24, title: '开启编辑功能', url: '#/zh-CN/tutorial/editattr' }, - { id: 65, pid: 24, title: '保存表格数据', url: '#/zh-CN/tutorial/savefunc' } + { id: 39, pid: 17, title: 'Button 按钮', url: 'button' }, + { id: 40, pid: 17, title: 'Datepicker 日期', url: 'datepicker' }, + { id: 41, pid: 17, title: 'Dropdown 下拉框', url: 'dropdown' }, + { id: 42, pid: 17, title: 'DropTimes 下拉时间', url: 'droptimes' }, + { id: 43, pid: 17, title: 'Input 输入框', url: 'input' }, + { id: 44, pid: 17, title: 'Textarea 文本域', url: 'textarea' }, + { id: 45, pid: 18, title: 'Chart 图表', url: 'chart' }, + { id: 46, pid: 18, title: 'Grid 数据表格', url: 'grid' }, + { id: 47, pid: 18, title: 'Guide 引导', url: 'guide' }, + { id: 48, pid: 18, title: 'Tree 树形控件', url: 'tree' }, + { id: 49, pid: 19, title: 'ToggleMenu 收缩菜单', url: 'toggleMenu' }, + { id: 50, pid: 19, title: 'TreeMenu 树型菜单', url: 'treemenu' }, + { id: 51, pid: 20, title: 'Amount 金额', url: 'amount' }, + { id: 52, pid: 20, title: 'Area 片区', url: 'area' }, + { id: 53, pid: 20, title: 'Company 公司', url: 'company' }, + { id: 54, pid: 20, title: 'Dept 部门', url: 'dept' }, + { id: 55, pid: 20, title: 'eDoc 企业文档', url: 'Edoc' }, + { id: 56, pid: 20, title: 'User 用户', url: 'user' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/parent-key.vue b/examples/sites/demos/pc/app/nav-menu/parent-key.vue index 4669179dcd..d6f21fa877 100644 --- a/examples/sites/demos/pc/app/nav-menu/parent-key.vue +++ b/examples/sites/demos/pc/app/nav-menu/parent-key.vue @@ -17,15 +17,7 @@ export default { { id: 1, pid: 0, title: '首页', url: '' }, { id: 2, pid: 0, title: '指南', url: '' }, { id: 3, pid: 0, title: '组件', url: '' }, - { id: 4, pid: 0, title: '教程', url: '' }, - { id: 5, pid: 0, title: '规范', url: '#/zh-CN/regular/rulelevel' }, - { id: 6, pid: 0, title: '性能', url: '#/zh-CN/speed' }, - { id: 7, pid: 0, title: '案例', url: '#/zh-CN/example' }, - { id: 8, pid: 0, title: '更新日志', url: '#/zh-CN/guide/changelog' }, - { id: 9, pid: 0, title: '测试', url: '#/zh-CN/guide/aaa' }, - { id: 10, pid: 0, title: '资源', url: '' }, - { id: 11, pid: 0, title: 'SDK', url: '' }, - { id: 12, pid: 0, title: 'TINY 学院', url: '' }, + { id: 9, pid: 0, title: '其他', url: 'crop' }, { id: 13, pid: 2, title: '引入组件', url: '' }, { id: 14, pid: 2, title: '后端适配器', url: '' }, { id: 15, pid: 2, title: '服务代理', url: '' }, @@ -52,33 +44,24 @@ export default { { id: 36, pid: 16, title: '静态资源部署', url: '' }, { id: 37, pid: 16, title: 'CI 部署', url: '' }, { id: 38, pid: 16, title: '引入静态资源', url: '' }, - { id: 39, pid: 17, title: 'Button 按钮', url: '#/zh-CN/component/button' }, - { id: 40, pid: 17, title: 'Datepicker 日期', url: '#/zh-CN/component/datepicker' }, - { id: 41, pid: 17, title: 'Dropdown 下拉框', url: '#/zh-CN/component/dropdown' }, - { id: 42, pid: 17, title: 'DropTimes 下拉时间', url: '#/zh-CN/component/droptimes' }, - { id: 43, pid: 17, title: 'Input 输入框', url: '#/zh-CN/component/input' }, - { id: 44, pid: 17, title: 'Textarea 文本域', url: '#/zh-CN/component/textarea' }, - { id: 45, pid: 18, title: 'Chart 图表', url: '#/zh-CN/component/chart' }, - { id: 46, pid: 18, title: 'Grid 数据表格', url: '#/zh-CN/component/grid' }, - { id: 47, pid: 18, title: 'Pager 分页', url: '#/zh-CN/component/pager' }, - { id: 48, pid: 18, title: 'Tree 树形控件', url: '#/zh-CN/component/tree' }, - { id: 49, pid: 19, title: 'ToggleMenu 收缩菜单', url: '#/zh-CN/component/toggleMenu' }, - { id: 50, pid: 19, title: 'TreeMenu 树型菜单', url: '#/zh-CN/component/treemenu' }, - { id: 51, pid: 20, title: 'Amount 金额', url: '#/zh-CN/component/amount' }, - { id: 52, pid: 20, title: 'Area 片区', url: '#/zh-CN/component/area' }, - { id: 53, pid: 20, title: 'Company 公司', url: '#/zh-CN/component/company' }, - { id: 54, pid: 20, title: 'Dept 部门', url: '#/zh-CN/component/dept' }, - { id: 55, pid: 20, title: 'eDoc 企业文档', url: '#/zh-CN/component/Edoc' }, - { id: 56, pid: 20, title: 'User 用户', url: '#/zh-CN/component/user' }, - { id: 57, pid: 21, title: '添加标签页', url: '#/zh-CN/tutorial/addtabs' }, - { id: 58, pid: 21, title: '标签页配置', url: '#/zh-CN/tutorial/tabsattr' }, - { id: 59, pid: 22, title: '添加查询页面', url: '#/zh-CN/tutorial/addlist' }, - { id: 60, pid: 22, title: '列表属性配置', url: '#/zh-CN/tutorial/listattr' }, - { id: 61, pid: 22, title: '通讯录查询', url: '#/zh-CN/tutorial/searchfunc' }, - { id: 62, pid: 23, title: '表单新增功能', url: '#/zh-CN/tutorial/addservice' }, - { id: 63, pid: 23, title: '表单数据验证', url: '#/zh-CN/tutorial/valid' }, - { id: 64, pid: 24, title: '开启编辑功能', url: '#/zh-CN/tutorial/editattr' }, - { id: 65, pid: 24, title: '保存表格数据', url: '#/zh-CN/tutorial/savefunc' } + { id: 39, pid: 17, title: 'Button 按钮', url: 'button' }, + { id: 40, pid: 17, title: 'Datepicker 日期', url: 'datepicker' }, + { id: 41, pid: 17, title: 'Dropdown 下拉框', url: 'dropdown' }, + { id: 42, pid: 17, title: 'DropTimes 下拉时间', url: 'droptimes' }, + { id: 43, pid: 17, title: 'Input 输入框', url: 'input' }, + { id: 44, pid: 17, title: 'Textarea 文本域', url: 'textarea' }, + { id: 45, pid: 18, title: 'Chart 图表', url: 'chart' }, + { id: 46, pid: 18, title: 'Grid 数据表格', url: 'grid' }, + { id: 47, pid: 18, title: 'Guide 引导', url: 'guide' }, + { id: 48, pid: 18, title: 'Tree 树形控件', url: 'tree' }, + { id: 49, pid: 19, title: 'ToggleMenu 收缩菜单', url: 'toggleMenu' }, + { id: 50, pid: 19, title: 'TreeMenu 树型菜单', url: 'treemenu' }, + { id: 51, pid: 20, title: 'Amount 金额', url: 'amount' }, + { id: 52, pid: 20, title: 'Area 片区', url: 'area' }, + { id: 53, pid: 20, title: 'Company 公司', url: 'company' }, + { id: 54, pid: 20, title: 'Dept 部门', url: 'dept' }, + { id: 55, pid: 20, title: 'eDoc 企业文档', url: 'Edoc' }, + { id: 56, pid: 20, title: 'User 用户', url: 'user' } ] } } diff --git a/examples/sites/demos/pc/app/nav-menu/selecte-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/selecte-composition-api.vue index 2747a1dea2..60e4b51ce1 100644 --- a/examples/sites/demos/pc/app/nav-menu/selecte-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/selecte-composition-api.vue @@ -8,7 +8,7 @@ import { ref } from 'vue' import { TinyNavMenu } from '@opentiny/vue' -const defaultActive = ref('2-1-1') +const defaultActive = ref('3-1-1') const menuData = ref([ { @@ -24,283 +24,61 @@ const menuData = ref([ { title: '引入组件', url: '', - id: '2-1', - children: [ - { - title: '按需引入', - url: '', - id: '2-1-1' - }, - { - title: '完整引入', - url: '', - id: '2-1-2' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - id: '2-2', - children: [ - { - title: 'Gateway 适配器', - url: '', - id: '2-2-1' - }, - { - title: 'Jalor 适配器', - url: '', - id: '2-2-2' - }, - { - title: 'Standalone 适配器', - url: '', - id: '2-2-3' - } - ] - }, - { - title: '服务代理', - url: '', - id: '2-3', - children: [ - { - title: '本地代理', - url: '', - id: '2-3-1' - }, - { - title: '远程代理', - url: '', - id: '2-3-2' - } - ] - }, - { - title: '构建部署', - url: '', - id: '2-4', - children: [ - { - title: '本地构建', - url: '', - id: '2-4-1' - }, - { - title: '查看构建报告', - url: '', - id: '2-4-2' - }, - { - title: '静态资源构建', - url: '', - id: '2-4-4' - }, - { - title: '多环境部署', - url: '', - id: '2-4-5' - }, - { - title: '静态资源部署', - url: '', - id: '2-4-6' - }, - { - title: 'CI 部署', - url: '', - id: '2-4-7' - }, - { - title: '引入静态资源', - url: '', - id: '2-4-8' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', - id: '3' - }, - { - title: '教程', - url: '', - id: '4', - children: [ - { - title: '页面布局', - url: '', - id: '4-1', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs', - id: '4-1-1' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr', - id: '4-1-2' - } - ] - }, - { - title: '查询功能', - url: '', - id: '4-2', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist', - id: '4-2-1' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr', - id: '4-2-2' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc', - id: '4-2-3' - } - ] - }, - { - title: '新增功能', - url: '', - id: '4-3', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice', - id: '4-3-1' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid', - id: '4-3-2' - } - ] - }, - { - title: '编辑功能', - url: '', - id: '4-4', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr', - id: '4-4-1' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc', - id: '4-4-2' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel', - id: '5' - }, - { - title: '性能', - url: '#/zh-CN/speed', - id: '6' - }, - { - title: '案例', - url: '#/zh-CN/example', - id: '7' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog', - id: '8' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa', - id: '9' - }, - { - title: '资源', - url: '10' - }, - { - title: 'SDK', - url: '', - id: '11', + id: '3', children: [ { title: '表单组件', url: '', id: '3-1', children: [ - { - title: 'Button 按钮', - url: '', - id: '3-1-1' - }, { title: 'Datepicker 日期', url: 'datepicker', - id: '3-1-2' + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown', - id: '3-1-3' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', url: 'droptimes', - id: '3-1-4' - }, - { - title: 'Input 输入框', - url: 'input', - id: '3-1-5' - }, - { - title: 'Textarea 文本域', - url: 'textarea', - id: '3-1-6' + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart', + title: 'Card 卡片', + url: 'card', id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid', + title: 'Collapse 折叠面板', + url: 'collapse', id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager', + title: 'Guide 引导', + url: 'guide', id: '3-2-3' - }, - { - title: 'Tree 树形控件', - url: 'tree', - id: '3-2-4' } ] }, @@ -318,6 +96,11 @@ const menuData = ref([ title: 'TreeMenu 树型菜单', url: 'treemenu', id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, @@ -340,30 +123,15 @@ const menuData = ref([ title: 'Company 公司', url: 'company', id: '3-4-3' - }, - { - title: 'Dept 部门', - url: 'dept', - id: '3-4-4' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc', - id: '3-4-5' - }, - { - title: 'User 用户', - url: 'user', - id: '3-4-6' } ] } ] }, { - title: 'TINY 学院', - url: '', - id: '12' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/selecte.spec.ts b/examples/sites/demos/pc/app/nav-menu/selecte.spec.ts index b87645a963..c7264d0f6e 100644 --- a/examples/sites/demos/pc/app/nav-menu/selecte.spec.ts +++ b/examples/sites/demos/pc/app/nav-menu/selecte.spec.ts @@ -5,7 +5,7 @@ test('基础用法', async ({ page }) => { await page.goto('nav-menu#selecte') const preview = page.locator('#selecte') const popMenu = preview.locator('.popmenu') - const components = preview.getByText('指南') + const components = preview.getByText('组件') await expect(components).toHaveClass(/selected/) await components.hover() await expect(popMenu).toBeVisible() diff --git a/examples/sites/demos/pc/app/nav-menu/selecte.vue b/examples/sites/demos/pc/app/nav-menu/selecte.vue index 99c8554f6d..2a4b84d646 100644 --- a/examples/sites/demos/pc/app/nav-menu/selecte.vue +++ b/examples/sites/demos/pc/app/nav-menu/selecte.vue @@ -1,6 +1,6 @@ @@ -27,100 +27,12 @@ export default { { title: '引入组件', url: '', - id: '2-1', - children: [ - { - title: '按需引入', - url: '', - id: '2-1-1' - }, - { - title: '完整引入', - url: '', - id: '2-1-2' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - id: '2-2', - children: [ - { - title: 'Gateway 适配器', - url: '', - id: '2-2-1' - }, - { - title: 'Jalor 适配器', - url: '', - id: '2-2-2' - }, - { - title: 'Standalone 适配器', - url: '', - id: '2-2-3' - } - ] - }, - { - title: '服务代理', - url: '', - id: '2-3', - children: [ - { - title: '本地代理', - url: '', - id: '2-3-1' - }, - { - title: '远程代理', - url: '', - id: '2-3-2' - } - ] - }, - { - title: '构建部署', - url: '', - id: '2-4', - children: [ - { - title: '本地构建', - url: '', - id: '2-4-1' - }, - { - title: '查看构建报告', - url: '', - id: '2-4-2' - }, - { - title: '静态资源构建', - url: '', - id: '2-4-4' - }, - { - title: '多环境部署', - url: '', - id: '2-4-5' - }, - { - title: '静态资源部署', - url: '', - id: '2-4-6' - }, - { - title: 'CI 部署', - url: '', - id: '2-4-7' - }, - { - title: '引入静态资源', - url: '', - id: '2-4-8' - } - ] + id: '2-2' } ] }, @@ -134,62 +46,42 @@ export default { url: '', id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button', - id: '3-1-1' - }, { title: 'Datepicker 日期', url: 'datepicker', - id: '3-1-2' + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown', - id: '3-1-3' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', url: 'droptimes', - id: '3-1-4' - }, - { - title: 'Input 输入框', - url: 'input', - id: '3-1-5' - }, - { - title: 'Textarea 文本域', - url: 'textarea', - id: '3-1-6' + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart', + title: 'Card 卡片', + url: 'card', id: '3-2-1' }, { - title: 'Grid 数据表格', - url: 'grid', + title: 'Collapse 折叠面板', + url: 'collapse', id: '3-2-2' }, { - title: 'Pager 分页', - url: 'pager', + title: 'Guide 引导', + url: 'guide', id: '3-2-3' - }, - { - title: 'Tree 树形控件', - url: 'tree', - id: '3-2-4' } ] }, @@ -207,6 +99,11 @@ export default { title: 'TreeMenu 树型菜单', url: 'treemenu', id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, @@ -229,146 +126,18 @@ export default { title: 'Company 公司', url: 'company', id: '3-4-3' - }, - { - title: 'Dept 部门', - url: 'dept', - id: '3-4-4' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc', - id: '3-4-5' - }, - { - title: 'User 用户', - url: 'user', - id: '3-4-6' } ] } ] }, { - title: '教程', - url: '', - id: '4', - children: [ - { - title: '页面布局', - url: '', - id: '4-1', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs', - id: '4-1-1' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr', - id: '4-1-2' - } - ] - }, - { - title: '查询功能', - url: '', - id: '4-2', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist', - id: '4-2-1' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr', - id: '4-2-2' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc', - id: '4-2-3' - } - ] - }, - { - title: '新增功能', - url: '', - id: '4-3', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice', - id: '4-3-1' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid', - id: '4-3-2' - } - ] - }, - { - title: '编辑功能', - url: '', - id: '4-4', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr', - id: '4-4-1' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc', - id: '4-4-2' - } - ] - } - ] - }, - { - title: '规范', - url: '#/zh-CN/regular/rulelevel', - id: '5' - }, - { - title: '性能', - url: '#/zh-CN/speed', - id: '6' - }, - { - title: '案例', - url: '#/zh-CN/example', - id: '7' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog', - id: '8' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa', - id: '9' - }, - { - title: '资源', - url: '10' - }, - { - title: 'SDK', - url: '', - id: '11' - }, - { - title: 'TINY 学院', - url: '', - id: '12' + title: '其他', + url: 'crop', + id: '4' } - ] + ], + defaultActive: '3-1-1' } } } diff --git a/examples/sites/demos/pc/app/nav-menu/slot-logo-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/slot-logo-composition-api.vue index 40957a3469..4327c44d4f 100644 --- a/examples/sites/demos/pc/app/nav-menu/slot-logo-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/slot-logo-composition-api.vue @@ -16,293 +16,125 @@ import { iconTotal } from '@opentiny/vue-icon' const menuData = ref([ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/slot-logo.vue b/examples/sites/demos/pc/app/nav-menu/slot-logo.vue index aa5cf691c9..274fa5f5ac 100644 --- a/examples/sites/demos/pc/app/nav-menu/slot-logo.vue +++ b/examples/sites/demos/pc/app/nav-menu/slot-logo.vue @@ -22,293 +22,125 @@ export default { menuData: [ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/slot-toolbar-composition-api.vue b/examples/sites/demos/pc/app/nav-menu/slot-toolbar-composition-api.vue index f3f3c6d09e..1f431308c5 100644 --- a/examples/sites/demos/pc/app/nav-menu/slot-toolbar-composition-api.vue +++ b/examples/sites/demos/pc/app/nav-menu/slot-toolbar-composition-api.vue @@ -17,293 +17,125 @@ import { iconSetting, iconAdministrator } from '@opentiny/vue-icon' const menuData = ref([ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ]) diff --git a/examples/sites/demos/pc/app/nav-menu/slot-toolbar.vue b/examples/sites/demos/pc/app/nav-menu/slot-toolbar.vue index 00ab7f5056..70628f8532 100644 --- a/examples/sites/demos/pc/app/nav-menu/slot-toolbar.vue +++ b/examples/sites/demos/pc/app/nav-menu/slot-toolbar.vue @@ -24,293 +24,125 @@ export default { menuData: [ { title: '首页', - url: '' + url: '', + id: '1' }, { title: '指南', url: '', + id: '2', children: [ { title: '引入组件', url: '', - children: [ - { - title: '按需引入', - url: '' - }, - { - title: '完整引入', - url: '' - } - ] + id: '2-1' }, { title: '后端适配器', url: '', - children: [ - { - title: 'Gateway 适配器', - url: '' - }, - { - title: 'Jalor 适配器', - url: '' - }, - { - title: 'Standalone 适配器', - url: '' - } - ] - }, - { - title: '服务代理', - url: '', - children: [ - { - title: '本地代理', - url: '' - }, - { - title: '远程代理', - url: '' - } - ] - }, - { - title: '构建部署', - url: '', - children: [ - { - title: '本地构建', - url: '' - }, - { - title: '查看构建报告', - url: '' - }, - { - title: '静态资源构建', - url: '' - }, - { - title: '多环境部署', - url: '' - }, - { - title: '静态资源部署', - url: '' - }, - { - title: 'CI 部署', - url: '' - }, - { - title: '引入静态资源', - url: '' - } - ] + id: '2-2' } ] }, { title: '组件', url: '', + id: '3', children: [ { title: '表单组件', url: '', + id: '3-1', children: [ - { - title: 'Button 按钮', - url: 'button' - }, { title: 'Datepicker 日期', - url: 'datepicker' + url: 'datepicker', + id: '3-1-1' }, { - title: 'Dropdown 下拉框', - url: 'dropdown' + title: 'Cascader 级联选择器', + url: 'cascader', + id: '3-1-2' }, { title: 'DropTimes 下拉时间', - url: 'droptimes' - }, - { - title: 'Input 输入框', - url: 'input' - }, - { - title: 'Textarea 文本域', - url: 'textarea' + url: 'droptimes', + id: '3-1-3' } ] }, { - title: '数据组件', + title: '数据展示', url: '', + id: '3-2', children: [ { - title: 'Chart 图表', - url: 'chart' - }, - { - title: 'Grid 数据表格', - url: 'grid' + title: 'Card 卡片', + url: 'card', + id: '3-2-1' }, { - title: 'Pager 分页', - url: 'pager' + title: 'Collapse 折叠面板', + url: 'collapse', + id: '3-2-2' }, { - title: 'Tree 树形控件', - url: 'tree' + title: 'Guide 引导', + url: 'guide', + id: '3-2-3' } ] }, { title: '导航组件', url: '', + id: '3-3', children: [ { title: 'ToggleMenu 收缩菜单', - url: 'toggleMenu' + url: 'toggleMenu', + id: '3-3-1' }, { title: 'TreeMenu 树型菜单', - url: 'treemenu' + url: 'treemenu', + id: '3-3-2' + }, + { + title: 'Breadcrumb 面包屑', + url: 'breadcrumb', + id: '3-3-3' } ] }, { title: '业务组件', url: '', + id: '3-4', children: [ { title: 'Amount 金额', - url: 'amount' + url: 'amount', + id: '3-4-1' }, { title: 'Area 片区', - url: 'area' + url: 'area', + id: '3-4-2' }, { title: 'Company 公司', - url: 'company' - }, - { - title: 'Dept 部门', - url: 'dept' - }, - { - title: 'eDoc 企业文档', - url: 'Edoc' - }, - { - title: 'User 用户', - url: 'user' - } - ] - } - ] - }, - { - title: '教程', - url: '', - children: [ - { - title: '页面布局', - url: '', - children: [ - { - title: '添加标签页', - url: '#/zh-CN/tutorial/addtabs' - }, - { - title: '标签页配置', - url: '#/zh-CN/tutorial/tabsattr' - } - ] - }, - { - title: '查询功能', - url: '', - children: [ - { - title: '添加查询页面', - url: '#/zh-CN/tutorial/addlist' - }, - { - title: '列表属性配置', - url: '#/zh-CN/tutorial/listattr' - }, - { - title: '通讯录查询', - url: '#/zh-CN/tutorial/searchfunc' - } - ] - }, - { - title: '新增功能', - url: '', - children: [ - { - title: '表单新增功能', - url: '#/zh-CN/tutorial/addservice' - }, - { - title: '表单数据验证', - url: '#/zh-CN/tutorial/valid' - } - ] - }, - { - title: '编辑功能', - url: '', - children: [ - { - title: '开启编辑功能', - url: '#/zh-CN/tutorial/editattr' - }, - { - title: '保存表格数据', - url: '#/zh-CN/tutorial/savefunc' + url: 'company', + id: '3-4-3' } ] } ] }, { - title: '规范', - url: '#/zh-CN/regular/rulelevel' - }, - { - title: '性能', - url: '#/zh-CN/speed' - }, - { - title: '案例', - url: '#/zh-CN/example' - }, - { - title: '更新日志', - url: '#/zh-CN/guide/changelog' - }, - { - title: '测试', - url: '#/zh-CN/guide/aaa' - }, - { - title: '资源', - url: '' - }, - { - title: 'SDK', - url: '' - }, - { - title: 'TINY 学院', - url: '' + title: '其他', + url: 'crop', + id: '4' } ] } diff --git a/examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js b/examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js index 0be49acb4a..a3bfac0d2c 100644 --- a/examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js +++ b/examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js @@ -129,18 +129,6 @@ export default { 'en-US': 'Use allow-full-url to support the inclusion of a complete URL in the data.' }, codeFiles: ['allow-full-url.vue'] - }, - { - demoId: 'crm-demo', - name: { - 'zh-CN': '自定义样式', - 'en-US': 'Custom Style' - }, - desc: { - 'zh-CN': '通过修改 css 变量名自定义导航菜单样式。', - 'en-US': 'Customizing the NavMenu style by changing the CSS variable name. ' - }, - codeFiles: ['crm-demo.vue'] } ] } diff --git a/packages/theme/src/nav-menu/index.less b/packages/theme/src/nav-menu/index.less index 679bcf268d..1f64ac3ac3 100644 --- a/packages/theme/src/nav-menu/index.less +++ b/packages/theme/src/nav-menu/index.less @@ -332,7 +332,6 @@ > a { color: var(--tv-NavMenu-popmenu-text-color); font-size: var(--tv-NavMenu-popmenu-node-title-font-size); - font-weight: bold; } } }