refactor: 注释修改和删除无用文件

Former-commit-id: bc4c1add7c69a236b6d1feaebe64ea115c34c5a4
This commit is contained in:
haoxr
2022-12-19 09:57:44 +08:00
parent ef223b6c05
commit 4bcbccf7e6
5 changed files with 4 additions and 45 deletions

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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[];
}

View File

@@ -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) {