chore: 同步完整版代码
This commit is contained in:
parent
e25f4bcf39
commit
e29340422a
@ -67,7 +67,7 @@
|
||||
"qs": "^6.12.1",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.2",
|
||||
"vue": "^3.4.23",
|
||||
"vue": "^3.4.24",
|
||||
"vue-router": "^4.3.2",
|
||||
"vue-tippy": "^6.4.1",
|
||||
"vue-types": "^5.1.1"
|
||||
@ -88,14 +88,14 @@
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/qs": "^6.9.15",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||
"@typescript-eslint/parser": "^7.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
"@typescript-eslint/parser": "^7.7.1",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"boxen": "^7.1.1",
|
||||
"cssnano": "^6.1.2",
|
||||
"eslint": "^9.1.0",
|
||||
"eslint": "^9.1.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-define-config": "^2.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
|
462
pnpm-lock.yaml
generated
462
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type appType,
|
||||
store,
|
||||
getConfig,
|
||||
defineStore,
|
||||
storageLocal,
|
||||
deviceDetection,
|
||||
responsiveStorageNameSpace
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
store,
|
||||
getConfig,
|
||||
defineStore,
|
||||
storageLocal,
|
||||
responsiveStorageNameSpace
|
||||
} from "../utils";
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type multiType,
|
||||
type positionType,
|
||||
@ -7,7 +8,6 @@ import {
|
||||
isNumber,
|
||||
isBoolean,
|
||||
getConfig,
|
||||
defineStore,
|
||||
routerArrays,
|
||||
storageLocal,
|
||||
responsiveStorageNameSpace
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type cacheType,
|
||||
store,
|
||||
@ -5,7 +6,6 @@ import {
|
||||
ascending,
|
||||
getKeyList,
|
||||
filterTree,
|
||||
defineStore,
|
||||
constantMenus,
|
||||
filterNoPermissionTree,
|
||||
formatFlatteningRoutes
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { type setType, store, defineStore, getConfig } from "../utils";
|
||||
import { defineStore } from "pinia";
|
||||
import { type setType, store, getConfig } from "../utils";
|
||||
|
||||
export const useSettingStore = defineStore({
|
||||
id: "pure-setting",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type userType,
|
||||
store,
|
||||
router,
|
||||
defineStore,
|
||||
resetRouter,
|
||||
routerArrays,
|
||||
storageLocal
|
||||
|
@ -1,5 +1,4 @@
|
||||
export { store } from "@/store";
|
||||
export { defineStore } from "pinia";
|
||||
export { routerArrays } from "@/layout/types";
|
||||
export { router, resetRouter, constantMenus } from "@/router";
|
||||
export { getConfig, responsiveStorageNameSpace } from "@/config";
|
||||
|
@ -38,23 +38,26 @@ const ruleForm = reactive({
|
||||
});
|
||||
|
||||
const onLogin = async (formEl: FormInstance | undefined) => {
|
||||
loading.value = true;
|
||||
if (!formEl) return;
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
loading.value = true;
|
||||
useUserStoreHook()
|
||||
.loginByUsername({ username: ruleForm.username, password: "admin123" })
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
// 获取后端路由
|
||||
initRouter().then(() => {
|
||||
router.push(getTopMenu(true).path);
|
||||
message("登录成功", { type: "success" });
|
||||
return initRouter().then(() => {
|
||||
router.push(getTopMenu(true).path).then(() => {
|
||||
message("登录成功", { type: "success" });
|
||||
});
|
||||
});
|
||||
} else {
|
||||
message("登录失败", { type: "error" });
|
||||
}
|
||||
});
|
||||
})
|
||||
.finally(() => (loading.value = false));
|
||||
} else {
|
||||
loading.value = false;
|
||||
return fields;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user