Skip to content

Commit 80b2833

Browse files
committed
upd: change navBar fontSize
1 parent 2da42be commit 80b2833

File tree

5 files changed

+128
-16
lines changed

5 files changed

+128
-16
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@
7979
"@typescript-eslint/parser": "^5.62.0",
8080
"@vitejs/plugin-vue": "^2.3.4",
8181
"@vue/eslint-config-typescript": "^12.0.0",
82+
"autoprefixer": "^10.4.21",
8283
"concurrently": "^7.0.0",
8384
"copyfiles": "^2.4.1",
8485
"cross-env": "^7.0.3",
8586
"eslint": "^8.56.0",
8687
"eslint-config-alloy": "^4",
8788
"eslint-plugin-vue": "^9.19.2",
8889
"less": "^4.1.2",
90+
"postcss": "^8.5.6",
8991
"prettier": "^2.5.1",
9092
"rimraf": "^4",
9193
"ts-node-dev": "^1.1.8",

pnpm-lock.yaml

Lines changed: 94 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/components/home-footer.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script lang="ts">
2-
import { Vue } from 'vue-class-component';
2+
import { Vue, Options } from 'vue-class-component';
33
import DataConfig from '@client/utils/data.config';
44
5+
@Options({})
56
export default class HomeFooter extends Vue {
67
getLinks() {
78
return {

src/client/modules/home/display.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ export default class Display extends Vue {
8585
<main class="content-main">
8686
<header class="content-main-title">
8787
<h1>
88-
<!-- Born for <br v-if="isMobile" />programming <br />
89-
beginners -->
9088
为编程初学者而生
9189
</h1>
9290
<h2>一键配置现代的 C++、Python 和 VSCode 编程环境</h2>

vite.config.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const isProd = process.env.NODE_ENV === 'production';
88
module.exports = defineConfig(({ mode }) => {
99
// 加载环境变量
1010
const env = loadEnv(mode, process.cwd(), '');
11-
11+
1212
return {
1313
server: {
1414
host: '0.0.0.0', // 允许局域网访问
@@ -18,7 +18,8 @@ module.exports = defineConfig(({ mode }) => {
1818
},
1919
},
2020
// If using CDN, you can set base like 'https://yourcdn.com/dist/'
21-
base: isProd ? '/dist/' : undefined,
21+
// base: isProd ? '/dist/' : undefined,
22+
base: './',
2223
define: {
2324
'process.env': {
2425
BWCX_RUNTIME_SCOPE: JSON.stringify('client'),
@@ -31,10 +32,37 @@ module.exports = defineConfig(({ mode }) => {
3132
'@public': path.resolve(__dirname, './public'),
3233
'@client': path.resolve(__dirname, './src/client'),
3334
'@common': path.resolve(__dirname, './src/common'),
35+
'@': path.resolve(__dirname, './src'),
3436
},
3537
},
3638
build: {
3739
sourcemap: true,
40+
// 解决 @charset 警告
41+
cssCodeSplit: true,
42+
// 增加文件大小警告限制
43+
chunkSizeWarningLimit: 800,
44+
},
45+
// CSS 预处理器配置
46+
css: {
47+
preprocessorOptions: {
48+
less: {
49+
// 解决 @charset 冲突
50+
charset: false,
51+
},
52+
},
53+
// 添加 PostCSS 配置来处理 @charset
54+
postcss: {
55+
plugins: [
56+
{
57+
postcssPlugin: 'remove-charset',
58+
Once(root) {
59+
root.walkAtRules('charset', (rule) => {
60+
rule.remove();
61+
});
62+
}
63+
}
64+
]
65+
}
3866
},
3967
plugins: [
4068
viteSSR({

0 commit comments

Comments
 (0)