Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jekip/naive-ui-admin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: jekip/naive-ui-admin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 7 commits
  • 8 files changed
  • 2 contributors

Commits on Oct 17, 2024

  1. Fix Type Error

    jekip committed Oct 17, 2024
    Copy the full SHA
    f729a5b View commit details

Commits on Oct 18, 2024

  1. Copy the full SHA
    01f9ba1 View commit details
  2. Copy the full SHA
    b88c047 View commit details

Commits on Oct 21, 2024

  1. Merge pull request #298 from Mr-BeanSir/main

    修复封装state时忘记修改html导致的报错
    jekip authored Oct 21, 2024
    Copy the full SHA
    cc2a911 View commit details

Commits on Nov 1, 2024

  1. README.md-新增交流qq群2

    jekip committed Nov 1, 2024
    Copy the full SHA
    7eb081a View commit details

Commits on Nov 11, 2024

  1. README update

    jekip committed Nov 11, 2024
    Copy the full SHA
    79c3cb5 View commit details

Commits on Feb 11, 2025

  1. Copy the full SHA
    f68ec16 View commit details
Showing with 73 additions and 67 deletions.
  1. +11 −4 README.md
  2. +1 −11 mock/system/menu.ts
  3. +10 −1 src/api/system/menu.ts
  4. +1 −1 src/router/base.ts
  5. +43 −41 src/views/setting/account/account.vue
  6. +5 −5 src/views/setting/system/system.vue
  7. +1 −1 src/views/system/menu/menu.vue
  8. +1 −3 src/views/system/role/role.vue
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -30,10 +30,16 @@

### Plus

基于 `NaiveUi` 全新设计版本,增加了众多特性,值得一试
全新设计版本,增加了众多特性,值得一试

基于 `NaiveUi` 组件库

[NaiveAdmin Plus 预览](https://plus.naiveadmin.com)

基于 `Antd` 组件库

[NaiveAdmin Antd Plus 预览](https://plus-full.naiveadmin.com)

### Arco vue

智能设计体系,提供轻盈体验
@@ -46,14 +52,14 @@

[Element Plus Admin 预览](https://element.naiveadmin.com)

以上版本同时具备 `NaiveAdmin` 功能/组件/页面,一如既往、开箱即用,欢迎前往查看。

### Antd vue

新产品,如果您选的技术栈是 `Antd` 的话,不妨看看

[NaiveAdmin Antd 预览](https://antd.naiveadmin.com)

以上版本同时具备 `NaiveAdmin` 功能/组件/页面,一如既往、开箱即用,欢迎前往查看。

## 📚 文档

[文档地址](https://docs.naiveadmin.com)
@@ -151,7 +157,8 @@ pnpm build

有关 `Naive Ui Admin` 的使用或其他问题,欢迎加入我们的讨论群组或提出问题。

![160335146-c28dd205-4600-4d62-b2c6-6456034ab7b1](https://user-images.githubusercontent.com/19426584/217689718-407e6cb9-dd3b-4a11-a025-3c58834b52ff.jpg)
QQ1群:328347666 (已满)
QQ2群:741353560

## 💖 赞助
#### 如果您觉得这个项目对您有帮助,可以通过下面的链接为作者买一杯果汁,表示感谢!。
12 changes: 1 addition & 11 deletions mock/system/menu.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import { defineMock } from '@alova/mock';
import { resultSuccess } from '../_util';

export interface ListDate {
label: string;
key: string;
type: number;
subtitle: string;
openType: number;
auth: string;
path: string;
children?: ListDate[];
}
import type { ListDate } from '@/api/system/menu';

const menuList = () => {
const result: ListDate[] = [
11 changes: 10 additions & 1 deletion src/api/system/menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { Alova } from '@/utils/http/alova/index';
import { ListDate } from 'mock/system/menu';
export interface ListDate {
label: string;
key: string;
type: number;
subtitle: string;
openType: number;
auth: string;
path: string;
children?: ListDate[];
}

/**
* @description: 根据用户id获取用户菜单
2 changes: 1 addition & 1 deletion src/router/base.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ export const RedirectRoute: RouteRecordRaw = {
children: [
{
path: '/redirect/:path(.*)',
name: RedirectName,
name: `${RedirectName}Son`,
component: () => import('@/views/redirect/index.vue'),
meta: {
title: RedirectName,
84 changes: 43 additions & 41 deletions src/views/setting/account/account.vue
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
class="thing-cell"
v-for="item in typeTabList"
:key="item.key"
:class="{ 'thing-cell-on': type === item.key }"
:class="{ 'thing-cell-on': state.type === item.key }"
@click="switchType(item)"
>
<template #header>{{ item.name }}</template>
@@ -16,61 +16,63 @@
</n-card>
</n-grid-item>
<n-grid-item span="18">
<n-card :bordered="false" size="small" :title="typeTitle" class="proCard">
<BasicSetting v-if="type === 1" />
<SafetySetting v-if="type === 2" />
<n-card :bordered="false" size="small" :title="state.typeTitle" class="proCard">
<BasicSetting v-if="state.type === 1" />
<SafetySetting v-if="state.type === 2" />
</n-card>
</n-grid-item>
</n-grid>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import BasicSetting from './BasicSetting.vue';
import SafetySetting from './SafetySetting.vue';
import { reactive, ref } from 'vue';
import BasicSetting from './BasicSetting.vue';
import SafetySetting from './SafetySetting.vue';
const typeTabList = [
{
name: '基本设置',
desc: '个人账户信息设置',
key: 1,
},
{
name: '安全设置',
desc: '密码,邮箱等设置',
key: 2,
},
];
const typeTabList = [
{
name: '基本设置',
desc: '个人账户信息设置',
key: 1,
},
{
name: '安全设置',
desc: '密码,邮箱等设置',
key: 2,
},
];
const type = ref(1);
const typeTitle = ref('基本设置');
const state = reactive({
type: 1,
typeTitle: '基本设置',
});
function switchType(e) {
type.value = e.key;
typeTitle.value = e.name;
}
function switchType(e) {
state.type = e.key;
state.typeTitle = e.name;
}
</script>
<style lang="less" scoped>
.thing-cell {
margin: 0 -16px 10px;
padding: 5px 16px;
.thing-cell {
margin: 0 -16px 10px;
padding: 5px 16px;
&:hover {
background: #f3f3f3;
cursor: pointer;
}
&:hover {
background: #f3f3f3;
cursor: pointer;
}
}
.thing-cell-on {
background: #f0faff;
color: #2d8cf0;
.thing-cell-on {
background: #f0faff;
color: #2d8cf0;
::v-deep(.n-thing-main .n-thing-header .n-thing-header__title) {
color: #2d8cf0;
}
::v-deep(.n-thing-main .n-thing-header .n-thing-header__title) {
color: #2d8cf0;
}
&:hover {
background: #f0faff;
}
&:hover {
background: #f0faff;
}
}
</style>
10 changes: 5 additions & 5 deletions src/views/setting/system/system.vue
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
class="thing-cell"
v-for="item in typeTabList"
:key="item.key"
:class="{ 'thing-cell-on': type === item.key }"
:class="{ 'thing-cell-on': state.type === item.key }"
@click="switchType(item)"
>
<template #header>{{ item.name }}</template>
@@ -16,10 +16,10 @@
</n-card>
</n-grid-item>
<n-grid-item span="18">
<n-card :bordered="false" size="small" :title="typeTitle" class="proCard">
<BasicSetting v-if="type === 1" />
<RevealSetting v-if="type === 2" />
<EmailSetting v-if="type === 3" />
<n-card :bordered="false" size="small" :title="state.typeTitle" class="proCard">
<BasicSetting v-if="state.type === 1" />
<RevealSetting v-if="state.type === 2" />
<EmailSetting v-if="state.type === 3" />
</n-card>
</n-grid-item>
</n-grid>
2 changes: 1 addition & 1 deletion src/views/system/menu/menu.vue
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@
import { getMenuList } from '@/api/system/menu';
import { getTreeItem } from '@/utils';
import CreateDrawer from './CreateDrawer.vue';
import { ListDate } from 'mock/system/menu';
import type { ListDate } from '@/api/system/menu';
const rules = {
label: {
4 changes: 1 addition & 3 deletions src/views/system/role/role.vue
Original file line number Diff line number Diff line change
@@ -75,10 +75,8 @@
import { getTreeAll } from '@/utils';
import CreateModal from './CreateModal.vue';
import EditModal from './EditModal.vue';
import { useRouter } from 'vue-router';
import { ListDate } from 'mock/system/menu';
import type { ListDate } from '@/api/system/menu';
const router = useRouter();
const message = useMessage();
const actionRef = ref();
const createModalRef = ref();