mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-04 13:42:27 +08:00
fix bug
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
||||
# 1.5.3 (2021-08-09)
|
||||
### 🐛 Bug Fixes
|
||||
- 修复顶部菜单,选中联动
|
||||
- 修复混合菜单模式,切换其他模式菜单未重置
|
||||
- 实例基础列表,和表格组件实例,开启横向滚动特性
|
||||
- `naiveui` 升级成最新版
|
||||
|
||||
- ### ✨ Features
|
||||
- table组件,默认开启 `ellipsis` 特性
|
||||
|
||||
|
||||
|
||||
# 1.5.2 (2021-08-06)
|
||||
### 🐛 Bug Fixes
|
||||
- 修复已知bug
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui-admin",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"author": {
|
||||
"name": "Ahjung",
|
||||
"email": "735878602@qq.com",
|
||||
@@ -38,7 +38,7 @@
|
||||
"makeit-captcha": "^1.2.5",
|
||||
"mitt": "^2.1.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"naive-ui": "^2.16.1",
|
||||
"naive-ui": "^2.16.2",
|
||||
"pinia": "^2.0.0-beta.3",
|
||||
"qs": "^6.10.1",
|
||||
"vfonts": "^0.1.0",
|
||||
|
||||
@@ -278,11 +278,7 @@
|
||||
|
||||
function togNavMode(mode) {
|
||||
settingStore.navMode = mode;
|
||||
// if (mode === 'header-dark') {
|
||||
// settingStore.setNavTheme('dark');
|
||||
// } else {
|
||||
// settingStore.setNavTheme('light');
|
||||
// }
|
||||
settingStore.menuSetting.mixMenu = false;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
import { useAsyncRouteStore } from '@/store/modules/asyncRoute';
|
||||
import { generatorMenu, generatorMenuMix } from '@/utils';
|
||||
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
||||
import { useProjectSetting } from '@/hooks/setting/useProjectSetting';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Menu',
|
||||
@@ -51,6 +52,10 @@
|
||||
const selectedKeys = ref<string>(currentRoute.name as string);
|
||||
const headerMenuSelectKey = ref<string>('');
|
||||
|
||||
const { getNavMode } = useProjectSetting();
|
||||
|
||||
const navMode = getNavMode;
|
||||
|
||||
// 获取当前打开的子菜单
|
||||
const matched = currentRoute.matched;
|
||||
|
||||
@@ -65,7 +70,10 @@
|
||||
});
|
||||
|
||||
const getSelectedKeys = computed(() => {
|
||||
return props.location === 'left' ? unref(selectedKeys) : unref(headerMenuSelectKey);
|
||||
let location = props.location;
|
||||
return location === 'left' || (location === 'header' && unref(navMode) === 'horizontal')
|
||||
? unref(selectedKeys)
|
||||
: unref(headerMenuSelectKey);
|
||||
});
|
||||
|
||||
// 监听分割菜单
|
||||
@@ -96,6 +104,7 @@
|
||||
const matched = currentRoute.matched;
|
||||
state.openKeys = matched.map((item) => item.name);
|
||||
const activeMenu: string = (currentRoute.meta?.activeMenu as string) || '';
|
||||
console.log(currentRoute);
|
||||
selectedKeys.value = activeMenu ? (activeMenu as string) : (currentRoute.name as string);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -81,7 +81,7 @@ export function generatorMenuMix(routerMap: Array<any>, routerName: string, loca
|
||||
* 递归组装子菜单
|
||||
* */
|
||||
export function getChildrenRouter(routerMap: Array<any>) {
|
||||
return routerMap.map((item) => {
|
||||
return filterRouter(routerMap).map((item) => {
|
||||
const isRoot = isRootRouter(item);
|
||||
const info = isRoot ? item.children[0] : item;
|
||||
const currentMenu = {
|
||||
|
||||
@@ -77,6 +77,6 @@ export const columns = [
|
||||
{
|
||||
title: '停留时间',
|
||||
key: 'time',
|
||||
width: 160,
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -67,6 +67,6 @@ export const columns = [
|
||||
{
|
||||
title: '停留时间',
|
||||
key: 'time',
|
||||
width: 160,
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
@edit-end="editEnd"
|
||||
@edit-change="onEditChange"
|
||||
@update:checked-row-keys="onCheckedRow"
|
||||
:scroll-x="1300"
|
||||
:scroll-x="1360"
|
||||
>
|
||||
<template #toolbar>
|
||||
<n-button type="primary" @click="reloadTable">刷新数据</n-button>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@edit-end="editEnd"
|
||||
@edit-change="onEditChange"
|
||||
@update:checked-row-keys="onCheckedRow"
|
||||
:scroll-x="1530"
|
||||
:scroll-x="1510"
|
||||
>
|
||||
<template #toolbar>
|
||||
<n-button type="primary" @click="reloadTable">刷新数据</n-button>
|
||||
|
||||
@@ -91,6 +91,6 @@ export const columns = [
|
||||
{
|
||||
title: '停留时间',
|
||||
key: 'time',
|
||||
width: 160,
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -33,14 +33,7 @@
|
||||
</n-grid>
|
||||
</n-card>
|
||||
</div>
|
||||
<n-grid
|
||||
class="mt-4"
|
||||
cols="2 s:1 m:1 l:2 xl:2 2xl:2"
|
||||
responsive="screen"
|
||||
:x-gap="12"
|
||||
:y-gap="9"
|
||||
:cols="2"
|
||||
>
|
||||
<n-grid class="mt-4" cols="2 s:1 m:1 l:2 xl:2 2xl:2" responsive="screen" :x-gap="12" :y-gap="9">
|
||||
<n-gi>
|
||||
<n-card
|
||||
:segmented="{ content: 'hard' }"
|
||||
@@ -75,7 +68,7 @@
|
||||
>
|
||||
<div class="flex">
|
||||
<span>
|
||||
<n-icon size="30" style="color: #42b983">
|
||||
<n-icon size="30" color="#42b983">
|
||||
<LogoVue />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -91,7 +84,7 @@
|
||||
>
|
||||
<div class="flex">
|
||||
<span>
|
||||
<n-icon size="30" style="color: #e44c27">
|
||||
<n-icon size="30" color="#e44c27">
|
||||
<Html5Outlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -107,7 +100,7 @@
|
||||
>
|
||||
<div class="flex">
|
||||
<span>
|
||||
<n-icon size="30" style="color: #dd0031">
|
||||
<n-icon size="30" color="#dd0031">
|
||||
<LogoAngular />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -123,7 +116,7 @@
|
||||
>
|
||||
<div class="flex">
|
||||
<span>
|
||||
<n-icon size="30" style="color: #61dafb">
|
||||
<n-icon size="30" color="#61dafb">
|
||||
<LogoReact />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -238,7 +231,7 @@
|
||||
<n-card size="small" class="cursor-pointer project-card-item" hoverable>
|
||||
<div class="flex flex-col justify-center text-gray-500">
|
||||
<span class="text-center">
|
||||
<n-icon size="30" style="color: #68c755">
|
||||
<n-icon size="30" color="#68c755">
|
||||
<DashboardOutlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -248,7 +241,7 @@
|
||||
<n-card size="small" class="cursor-pointer project-card-item" hoverable>
|
||||
<div class="flex flex-col justify-center text-gray-500">
|
||||
<span class="text-center">
|
||||
<n-icon size="30" style="color: #fab251">
|
||||
<n-icon size="30" color="#fab251">
|
||||
<ProfileOutlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -258,7 +251,7 @@
|
||||
<n-card size="small" class="cursor-pointer project-card-item" hoverable>
|
||||
<div class="flex flex-col justify-center text-gray-500">
|
||||
<span class="text-center">
|
||||
<n-icon size="30" style="color: #1890ff">
|
||||
<n-icon size="30" color="#1890ff">
|
||||
<FileProtectOutlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -268,7 +261,7 @@
|
||||
<n-card size="small" class="cursor-pointer project-card-item" hoverable>
|
||||
<div class="flex flex-col justify-center text-gray-500">
|
||||
<span class="text-center">
|
||||
<n-icon size="30" style="color: #f06b96">
|
||||
<n-icon size="30" color="#f06b96">
|
||||
<ApartmentOutlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
@@ -278,7 +271,7 @@
|
||||
<n-card size="small" class="cursor-pointer project-card-item" hoverable>
|
||||
<div class="flex flex-col justify-center text-gray-500">
|
||||
<span class="text-center">
|
||||
<n-icon size="30" style="color: #7238d1">
|
||||
<n-icon size="30" color="#7238d1">
|
||||
<SettingOutlined />
|
||||
</n-icon>
|
||||
</span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
ref="actionRef"
|
||||
:actionColumn="actionColumn"
|
||||
@update:checked-row-keys="onCheckedRow"
|
||||
:scroll-x="1090"
|
||||
:scroll-x="1010"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<n-button type="primary" @click="addTable">
|
||||
@@ -231,7 +231,7 @@
|
||||
name: 'xiaoMa',
|
||||
},
|
||||
actionColumn: {
|
||||
width: 220,
|
||||
width: 140,
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
fixed: 'right',
|
||||
|
||||
@@ -4999,10 +4999,10 @@ mute-stream@0.0.7:
|
||||
resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
||||
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
|
||||
|
||||
naive-ui@^2.16.1:
|
||||
version "2.16.1"
|
||||
resolved "https://registry.yarnpkg.com/naive-ui/-/naive-ui-2.16.1.tgz#0599e6748f498ad8f4f2f4c6c0637c1f1d860827"
|
||||
integrity sha512-ku7ZxxBMp2fHD2eKV1gUDO6LmvMPUKYx0JzgtiCHRC8B88t4Ch5Momf+CfuYIM5NeVexzcmlahadslB74Bgbfw==
|
||||
naive-ui@^2.16.2:
|
||||
version "2.16.2"
|
||||
resolved "https://registry.nlark.com/naive-ui/download/naive-ui-2.16.2.tgz#f7d4b84f15529bc8f367644edcdb2c14c7912372"
|
||||
integrity sha1-99S4TxVSm8jzZ2RO3NssFMeRI3I=
|
||||
dependencies:
|
||||
"@css-render/plugin-bem" "^0.15.4"
|
||||
"@css-render/vue3-ssr" "^0.15.4"
|
||||
|
||||
Reference in New Issue
Block a user