From 0a967445e61688368eb29b3585614e772e67f35c Mon Sep 17 00:00:00 2001 From: MoYi <1545929126@qq.com> Date: Mon, 4 Dec 2023 22:18:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DElementPlus=E4=B8=AD`ElMessag?= =?UTF-8?q?e`=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- package.json | 2 +- src/main.ts | 1 + tsconfig.json | 8 +++++++- vite.config.ts | 8 +++++--- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0493e26..44b739f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "axios": "^1.6.2", "crypto-js": "^4.2.0", "echarts": "^5.4.3", - "element-plus": "^2.4.2", + "element-plus": "^2.4.3", "vant": "^4.7.3", "vue": "^3.3.4", "vue-router": "^4.2.5" diff --git a/package.json b/package.json index a6c5bab..e6932fa 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "axios": "^1.6.2", "crypto-js": "^4.2.0", "echarts": "^5.4.3", - "element-plus": "^2.4.2", + "element-plus": "^2.4.3", "vant": "^4.7.3", "vue": "^3.3.4", "vue-router": "^4.2.5" diff --git a/src/main.ts b/src/main.ts index d7866df..38085fe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ import './style.css' import App from './App.vue' import Mobile from './views/AppMobile.vue' import PC from './views/AppPC.vue' +import 'element-plus/dist/index.css'; import {createRouter, createWebHashHistory} from "vue-router"; const router = createRouter({ diff --git a/tsconfig.json b/tsconfig.json index f82888f..b593cdc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,12 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], + "include": [ + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.tsx", + "src/**/*.vue", + "auto-imports.d.ts" + ], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/vite.config.ts b/vite.config.ts index 56b2d05..6ac975e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,10 +11,10 @@ export default defineConfig({ server: { host: "0.0.0.0", port: 5173, -/* https: { + https: { key: readFileSync("keys/agent2-key.pem"), cert: readFileSync("keys/agent2-cert.pem"), - }*/ + } }, plugins: [ AutoImport({ @@ -24,7 +24,9 @@ export default defineConfig({ }), Components({ resolvers: [ - ElementPlusResolver(), + ElementPlusResolver({ + importStyle: "css", // 确保样式也被自动导入 + }), VantResolver(), ], }),