refactor: 注释修改和删除无用文件
Former-commit-id: bc4c1add7c69a236b6d1feaebe64ea115c34c5a4
This commit is contained in:
@@ -53,7 +53,7 @@ export const usePermissionStore = defineStore('permission', () => {
|
||||
const routes = ref<RouteRecordRaw[]>([]);
|
||||
const addRoutes = ref<RouteRecordRaw[]>([]);
|
||||
|
||||
// auctions
|
||||
// actions
|
||||
function setRoutes(newRoutes: RouteRecordRaw[]) {
|
||||
addRoutes.value = newRoutes;
|
||||
routes.value = constantRoutes.concat(newRoutes);
|
||||
|
||||
@@ -19,7 +19,7 @@ export const useSettingsStore = defineStore('setting', () => {
|
||||
const fixedHeader = ref<boolean>(defaultSettings.fixedHeader);
|
||||
const sidebarLogo = ref<boolean>(defaultSettings.sidebarLogo);
|
||||
|
||||
// auction
|
||||
// actions
|
||||
function changeSetting(param: { key: string; value: any }) {
|
||||
const { key, value } = param;
|
||||
switch (key) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export const useTagsViewStore = defineStore('tagsView', () => {
|
||||
const visitedViews = ref<TagView[]>([]);
|
||||
const cachedViews = ref<string[]>([]);
|
||||
|
||||
// auctions
|
||||
// actions
|
||||
function addVisitedView(view: TagView) {
|
||||
if (visitedViews.value.some(v => v.path === view.path)) return;
|
||||
if (view.meta && view.meta.affix) {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import { RouteLocationNormalized, RouteRecordRaw } from 'vue-router';
|
||||
|
||||
export interface AppState {
|
||||
device: string;
|
||||
sidebar: {
|
||||
opened: boolean;
|
||||
withoutAnimation: boolean;
|
||||
};
|
||||
language: string;
|
||||
size: string;
|
||||
}
|
||||
|
||||
export interface PermissionState {
|
||||
routes: RouteRecordRaw[];
|
||||
addRoutes: RouteRecordRaw[];
|
||||
}
|
||||
|
||||
export interface SettingState {
|
||||
theme: string;
|
||||
tagsView: boolean;
|
||||
fixedHeader: boolean;
|
||||
showSettings: boolean;
|
||||
sidebarLogo: boolean;
|
||||
}
|
||||
|
||||
export interface UserState {
|
||||
token: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
roles: string[];
|
||||
perms: string[];
|
||||
}
|
||||
|
||||
export interface TagView extends Partial<RouteLocationNormalized> {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface TagsViewState {
|
||||
visitedViews: TagView[];
|
||||
cachedViews: string[];
|
||||
}
|
||||
@@ -17,7 +17,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
const roles = ref<Array<string>>([]); // 用户角色编码集合 → 判断路由权限
|
||||
const perms = ref<Array<string>>([]); // 用户权限编码集合 → 判断按钮权限
|
||||
|
||||
// auctions
|
||||
// actions
|
||||
|
||||
// 登录
|
||||
function login(loginData: LoginData) {
|
||||
|
||||
Reference in New Issue
Block a user