From 922b39c02cd3f5a533f4a7c763b9d7f8ef9c2589 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 17 Oct 2022 13:02:23 +0800 Subject: [PATCH] docs: update --- README.md | 6 ++-- yudao-ui-admin-vue3/README.md | 8 ++--- yudao-ui-admin-vue3/package.json | 22 ++++++------- .../src/views/Login/components/LoginForm.vue | 33 ++++++++++--------- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 5f65867b9..03bb45912 100644 --- a/README.md +++ b/README.md @@ -209,9 +209,9 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | |----------------------------------------------------------------------|-----------------|--------| -| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.40 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 3.1.7 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.17 | +| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.41 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 3.1.8 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.18 | | [TypeScript](https://www.typescriptlang.org/docs/) | TypeScript | 4.8.4 | | [pinia](https://pinia.vuejs.org/) | vuex5 | 2.0.23 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | diff --git a/yudao-ui-admin-vue3/README.md b/yudao-ui-admin-vue3/README.md index 77b589ee4..b9032638e 100644 --- a/yudao-ui-admin-vue3/README.md +++ b/yudao-ui-admin-vue3/README.md @@ -27,12 +27,12 @@ | 框架 | 说明 | 版本 | | --- | --- |--------| -| [Vue](https://staging-cn.vuejs.org/) | vue 框架 | 3.2.40 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 3.1.7 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.17 | +| [Vue](https://staging-cn.vuejs.org/) | vue 框架 | 3.2.41 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 3.1.8 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.18 | | [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.8.4 | | [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.23 | -| [vueuse](https://vueuse.org//) | 常用工具集 | 9.3.0 | +| [vueuse](https://vueuse.org//) | 常用工具集 | 9.3.1 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-router](https://router.vuejs.org/) | vue 路由 | 4.1.5 | | [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 | diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index b6c1c184d..ab056d30b 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@iconify/iconify": "^3.0.0", - "@vueuse/core": "^9.3.0", + "@vueuse/core": "^9.3.1", "@wangeditor/editor": "^5.1.21", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.0.5", @@ -36,7 +36,7 @@ "dayjs": "^1.11.5", "echarts": "^5.4.0", "echarts-wordcloud": "^2.0.0", - "element-plus": "2.2.17", + "element-plus": "2.2.18", "intro.js": "^6.0.0", "jsencrypt": "^3.2.1", "lodash-es": "^4.17.21", @@ -46,7 +46,7 @@ "qrcode": "^1.5.1", "qs": "^6.11.0", "url": "^0.11.0", - "vue": "3.2.40", + "vue": "3.2.41", "vue-cropper": "^1.0.3", "vue-i18n": "9.2.2", "vue-router": "^4.1.5", @@ -56,12 +56,12 @@ "devDependencies": { "@commitlint/cli": "^17.1.2", "@commitlint/config-conventional": "^17.1.0", - "@iconify/json": "^2.1.120", + "@iconify/json": "^2.1.122", "@intlify/vite-plugin-vue-i18n": "^6.0.3", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.0", "@types/lodash-es": "^4.17.6", - "@types/node": "^18.8.4", + "@types/node": "^18.11.0", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", @@ -78,21 +78,21 @@ "less": "^4.1.3", "lint-staged": "^13.0.3", "plop": "^3.1.1", - "postcss": "^8.4.17", + "postcss": "^8.4.18", "postcss-html": "^1.5.0", "postcss-less": "^6.0.0", "prettier": "^2.7.1", "rimraf": "^3.0.2", "rollup": "^2.79.1", - "stylelint": "^14.13.0", + "stylelint": "^14.14.0", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.3", "stylelint-config-recommended": "^9.0.0", - "stylelint-config-standard": "^28.0.0", + "stylelint-config-standard": "^29.0.0", "stylelint-order": "^5.0.0", "typescript": "4.8.4", - "unplugin-vue-macros": "^0.12.0", - "vite": "3.1.7", + "unplugin-vue-macros": "^0.13.2", + "vite": "3.1.8", "vite-plugin-compression": "^0.5.1", "vite-plugin-eslint": "^1.8.1", "vite-plugin-html": "^3.2.0", @@ -100,7 +100,7 @@ "vite-plugin-style-import": "2.0.0", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-windicss": "^1.8.8", - "vue-tsc": "^1.0.3", + "vue-tsc": "^1.0.8", "windicss": "^3.5.6", "windicss-analysis": "^0.3.5" }, diff --git a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue index a9e53a01a..04a4eb8c8 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue @@ -103,24 +103,25 @@ const getCookie = () => { // 登录 const handleLogin = async (params) => { loginLoading.value = true - await getTenantId() - const data = await validForm() - if (!data) { + try { + await getTenantId() + const data = await validForm() + if (!data) { + return + } + loginData.loginForm.captchaVerification = params.captchaVerification + const res = await LoginApi.loginApi(loginData.loginForm) + if (!res) { + return + } + setToken(res) + if (!redirect.value) { + redirect.value = '/' + } + push({ path: redirect.value || permissionStore.addRouters[0].path }) + } finally { loginLoading.value = false - return } - loginData.loginForm.captchaVerification = params.captchaVerification - const res = await LoginApi.loginApi(loginData.loginForm) - if (!res) { - loginLoading.value = false - return - } - setToken(res) - if (!redirect.value) { - redirect.value = '/' - } - push({ path: redirect.value || permissionStore.addRouters[0].path }) - loginLoading.value = false } // 社交登录