From f6d405dab2428a1596f8624b3f94b28adbb799ec Mon Sep 17 00:00:00 2001 From: fangyunong Date: Mon, 30 Jun 2025 15:13:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=99=BB=E5=BD=95=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 25 +++++++++++++++++++++++++ src/App.vue | 12 ++++++------ src/main.ts | 3 ++- src/views/login/index.vue | 9 ++++++--- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 41b8aab..460c6ee 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "@auth0/auth0-vue": "^2.4.0", "axios": "^1.7.2", "ftp-deploy": "^2.4.7", "js-cookie": "^3.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 370e4ee..0cc0218 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@auth0/auth0-vue': + specifier: ^2.4.0 + version: 2.4.0(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3))) axios: specifier: ^1.7.2 version: 1.10.0 @@ -79,6 +82,17 @@ packages: '@antfu/utils@0.7.10': resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@auth0/auth0-spa-js@2.2.0': + resolution: {integrity: sha512-YaHHCxiSQxDb+Ju9gXOqcqgXWq8EkUSpZC4g24D3MoEBUaADKwOosrAnmjDZcslBZpnSFFdrl4dLYedAer3xlQ==} + + '@auth0/auth0-vue@2.4.0': + resolution: {integrity: sha512-12iLvojP8Pvxqu2Abxzksp0HqlSovGiAUhWrppnOaJP02MZEBQo+c/IwM6VbM0edNk+eqqjX5u96iw5peaCPSg==} + peerDependencies: + vue-router: ^4.0.12 + peerDependenciesMeta: + vue-router: + optional: true + '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -1257,6 +1271,17 @@ snapshots: '@antfu/utils@0.7.10': {} + '@auth0/auth0-spa-js@2.2.0': {} + + '@auth0/auth0-vue@2.4.0(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3)))': + dependencies: + '@auth0/auth0-spa-js': 2.2.0 + vue: 3.5.17(typescript@5.8.3) + optionalDependencies: + vue-router: 4.5.1(vue@3.5.17(typescript@5.8.3)) + transitivePeerDependencies: + - typescript + '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.27.1 diff --git a/src/App.vue b/src/App.vue index 5c6032d..9a73251 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,12 +12,12 @@ import { type GlobalThemeOverrides, dateZhCN, zhCN } from "naive-ui"; const themeOverrides: GlobalThemeOverrides = { // 待配置主题色 - common: { - primaryColor: "#9CC9E5", - primaryColorHover: "#c0dff1", - primaryColorPressed: "#74a6c3", - primaryColorSuppl: "#CAE5D3", - } + 'common': { + 'primaryColor': '#3D8EFF', // 主色保持不变的蓝色 + 'primaryColorHover': '#6AA1FF', // 比主色亮20%的浅蓝色 + 'primaryColorPressed': '#2B7AEB',// 比主色深10%的深蓝色 + 'primaryColorSuppl': '#5A95FF' // 介于主色和hover之间的蓝色 + }, }; diff --git a/src/main.ts b/src/main.ts index c3ccccc..c4730a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,9 +7,10 @@ import pinia from '@/store'; //引入路由 import router from "@/router"; // 引入UI组件库相关 -import naive from 'naive-ui' +import naive from 'naive-ui'; import 'vfonts/Lato.css'// 通用字体 import 'vfonts/FiraCode.css'// 等宽字体 +// 登录授权相关 import { createApp } from 'vue' import App from './App.vue'; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index da0e9f1..d90d417 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,8 +1,11 @@ - - \ No newline at end of file