From a49a725950cf7667e2d9c07dc6a5e4b1d45ba639 Mon Sep 17 00:00:00 2001 From: zikai <1621362626@qq.com> Date: Thu, 23 Jul 2026 02:48:58 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20App.vue=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=9A=94=E7=A6=BB=EF=BC=8C=E4=BD=BF=E5=85=B6=E5=8F=AF=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E7=BB=84=E4=BB=B6=E8=A2=AB=E5=B5=8C=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 全局重置(* / body)抽到 src/styles/global.css,仅独立 app 的 main.js 加载 - App.vue diff --git a/src/main.js b/src/main.js index 01433bc..a014071 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,5 @@ import { createApp } from 'vue' import App from './App.vue' +import './styles/global.css' createApp(App).mount('#app') diff --git a/src/styles/global.css b/src/styles/global.css new file mode 100644 index 0000000..7db76db --- /dev/null +++ b/src/styles/global.css @@ -0,0 +1,9 @@ +/* 全局重置 -- 仅独立 app(main.js)加载。 + 作为组件被嵌入时由宿主提供重置,本文件不参与,避免污染宿主。 */ +* { box-sizing: border-box; margin: 0; padding: 0; } +body { + font-family: -apple-system, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif; + background: #f5f6f8; + color: #222; + line-height: 1.5; +}