From bfad693bd07c817d43ac66ff7db8076711416555 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 17 Sep 2025 14:47:56 +0800
Subject: [PATCH 1/8] =?UTF-8?q?chore(styles):=20=E4=B8=BA=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE=E6=B7=BB=E5=8A=A0=E5=BC=80=E5=8F=91=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 添加Prettier、ESLint用于规范代码风格
- 添加Prettier配置文件
---
package.json | 5 +++--
pnpm-lock.yaml | 16 +++++++++++++---
prettier.config.mjs | 30 ++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 5 deletions(-)
create mode 100644 prettier.config.mjs
diff --git a/package.json b/package.json
index 065e018..3a72a44 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,6 @@
"@vueuse/nuxt": "^13.6.0",
"dompurify": "^3.2.6",
"element-plus": "^2.10.7",
- "eslint": "^9.0.0",
"markdown-it": "^14.1.0",
"meilisearch": "^0.53.0",
"nuxt": "^4.0.3",
@@ -38,6 +37,8 @@
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@element-plus/nuxt": "^1.1.4",
- "husky": "^9.1.7"
+ "eslint": "^9.35.0",
+ "husky": "^9.1.7",
+ "prettier": "^3.6.2"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b731690..e31e227 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -50,9 +50,6 @@ importers:
element-plus:
specifier: ^2.10.7
version: 2.11.2(vue@3.5.21(typescript@5.9.2))
- eslint:
- specifier: ^9.0.0
- version: 9.35.0(jiti@2.5.1)
markdown-it:
specifier: ^14.1.0
version: 14.1.0
@@ -84,9 +81,15 @@ importers:
'@element-plus/nuxt':
specifier: ^1.1.4
version: 1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.21(typescript@5.9.2)))(element-plus@2.11.2(vue@3.5.21(typescript@5.9.2)))(magicast@0.3.5)
+ eslint:
+ specifier: ^9.35.0
+ version: 9.35.0(jiti@2.5.1)
husky:
specifier: ^9.1.7
version: 9.1.7
+ prettier:
+ specifier: ^3.6.2
+ version: 3.6.2
packages:
@@ -4455,6 +4458,11 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
+ prettier@3.6.2:
+ resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
+ engines: {node: '>=14'}
+ hasBin: true
+
pretty-bytes@7.0.1:
resolution: {integrity: sha512-285/jRCYIbMGDciDdrw0KPNC4LKEEwz/bwErcYNxSJOi4CpGUuLpb9gQpg3XJP0XYj9ldSRluXxih4lX2YN8Xw==}
engines: {node: '>=20'}
@@ -10469,6 +10477,8 @@ snapshots:
prelude-ls@1.2.1: {}
+ prettier@3.6.2: {}
+
pretty-bytes@7.0.1: {}
process-nextick-args@2.0.1: {}
diff --git a/prettier.config.mjs b/prettier.config.mjs
new file mode 100644
index 0000000..1ecb88d
--- /dev/null
+++ b/prettier.config.mjs
@@ -0,0 +1,30 @@
+/**
+ * @see https://prettier.io/docs/en/configuration.html
+ * @type {import("prettier").Config}
+ */
+export default {
+ // 打印宽度
+ "printWidth": 80,
+ // 缩进空格数
+ "tabWidth": 2,
+ // 使用制表符而不是空格缩进
+ "useTabs": false,
+ // 句尾添加分号
+ "semi": true,
+ // 使用单引号
+ "singleQuote": true,
+ // 尾随逗号
+ "trailingComma": "es5",
+ // 对象大括号内的空格
+ "bracketSpacing": true,
+ // 箭头函数参数括号
+ "arrowParens": "always",
+ // 括号行位置
+ "bracketSameLine": true,
+ // 换行符使用 lf
+ "endOfLine": "lf",
+ // HTML 空格敏感度
+ "htmlWhitespaceSensitivity": "css",
+ // Vue 文件脚本和样式缩进
+ "vueIndentScriptAndStyle": true,
+}
\ No newline at end of file
--
2.49.0
From e94dbf29a3f5e472f7f0d15151c978e27818b5ed Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 17 Sep 2025 15:23:44 +0800
Subject: [PATCH 2/8] =?UTF-8?q?chore(styles):=20=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 调整prettier.config.mjs,强制css文件与scss文件使用双引号
---
prettier.config.mjs | 62 +++++++++++++++++++++++++++------------------
1 file changed, 37 insertions(+), 25 deletions(-)
diff --git a/prettier.config.mjs b/prettier.config.mjs
index 1ecb88d..f52b8fe 100644
--- a/prettier.config.mjs
+++ b/prettier.config.mjs
@@ -3,28 +3,40 @@
* @type {import("prettier").Config}
*/
export default {
- // 打印宽度
- "printWidth": 80,
- // 缩进空格数
- "tabWidth": 2,
- // 使用制表符而不是空格缩进
- "useTabs": false,
- // 句尾添加分号
- "semi": true,
- // 使用单引号
- "singleQuote": true,
- // 尾随逗号
- "trailingComma": "es5",
- // 对象大括号内的空格
- "bracketSpacing": true,
- // 箭头函数参数括号
- "arrowParens": "always",
- // 括号行位置
- "bracketSameLine": true,
- // 换行符使用 lf
- "endOfLine": "lf",
- // HTML 空格敏感度
- "htmlWhitespaceSensitivity": "css",
- // Vue 文件脚本和样式缩进
- "vueIndentScriptAndStyle": true,
-}
\ No newline at end of file
+ // 打印宽度
+ printWidth: 80,
+ // 缩进空格数
+ tabWidth: 2,
+ // 使用制表符而不是空格缩进
+ useTabs: false,
+ // 句尾添加分号
+ semi: true,
+ // 使用单引号
+ singleQuote: true,
+ // 尾随逗号
+ trailingComma: "es5",
+ // 对象大括号内的空格
+ bracketSpacing: true,
+ // 箭头函数参数括号
+ arrowParens: "always",
+ // 括号行位置
+ bracketSameLine: true,
+ // 换行符使用 lf
+ endOfLine: "lf",
+ // HTML 空格敏感度
+ htmlWhitespaceSensitivity: "css",
+ // Vue 文件脚本和样式缩进
+ vueIndentScriptAndStyle: true,
+ overrides: [
+ {
+ // 对 CSS 文件使用双引号
+ files: "*.css",
+ options: { singleQuote: false },
+ },
+ {
+ // 对 SCSS 文件使用双引号
+ files: "*.scss",
+ options: { singleQuote: false },
+ },
+ ],
+};
--
2.49.0
From bb89721f1c1dc5c65db118c6e04a054f5b5f2148 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 17 Sep 2025 15:46:39 +0800
Subject: [PATCH 3/8] =?UTF-8?q?chore(styles):=20=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改prettier.config.mjs: 标签换行
- 修改eslint.config.mjs: 允许自闭合标签(如
)
---
eslint.config.mjs | 9 +++++++++
prettier.config.mjs | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 934c3a1..03981be 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -3,4 +3,13 @@ import withNuxt from './.nuxt/eslint.config.mjs'
export default withNuxt(
// Your custom configs here
+ {
+ rules: {
+ "vue/html-self-closing": ["warn", {
+ "html": {
+ "void": "any",
+ }
+ }]
+ }
+ }
)
diff --git a/prettier.config.mjs b/prettier.config.mjs
index f52b8fe..e10251b 100644
--- a/prettier.config.mjs
+++ b/prettier.config.mjs
@@ -20,7 +20,7 @@ export default {
// 箭头函数参数括号
arrowParens: "always",
// 括号行位置
- bracketSameLine: true,
+ bracketSameLine: false,
// 换行符使用 lf
endOfLine: "lf",
// HTML 空格敏感度
@@ -37,6 +37,6 @@ export default {
// 对 SCSS 文件使用双引号
files: "*.scss",
options: { singleQuote: false },
- },
+ }
],
};
--
2.49.0
From 359aaec8a9d87867881e40e8c678cef2b8d9a249 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 17 Sep 2025 15:50:29 +0800
Subject: [PATCH 4/8] =?UTF-8?q?style:=20=E6=A0=BC=E5=BC=8F=E5=8C=96?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 根据prettier配置格式化整个项目的代码
---
README.md | 34 +-
app/app.vue | 40 +--
app/assets/css/fonts.css | 48 ++-
app/assets/scss/element/dark.scss | 6 +-
app/assets/scss/element/index.scss | 28 +-
app/assets/scss/index.scss | 5 +-
app/components/DocumentList.vue | 72 ++--
app/components/JinshenFooter.vue | 368 +++++++++----------
app/components/JinshenHeader.vue | 192 +++++-----
app/components/MarkdownRenderer.vue | 100 +++---
app/components/ProductionCard.vue | 116 +++---
app/components/QuestionList.vue | 76 ++--
app/components/SolutionCard.vue | 104 +++---
app/components/SpecTable.vue | 32 +-
app/components/SupportTabs.vue | 78 ++--
app/composables/useLocalizations.ts | 16 +-
app/composables/useMeilisearch.ts | 16 +-
app/layouts/default.vue | 36 +-
app/pages/[...all].vue | 6 +-
app/pages/about/index.vue | 146 ++++----
app/pages/index.vue | 304 ++++++++--------
app/pages/productions/[...slug].vue | 292 +++++++--------
app/pages/productions/index.vue | 194 +++++-----
app/pages/search.vue | 539 ++++++++++++++--------------
app/pages/solutions/[...slug].vue | 148 ++++----
app/pages/solutions/index.vue | 144 ++++----
app/pages/support/contact-us.vue | 98 ++---
app/pages/support/documents.vue | 92 ++---
app/pages/support/faq.vue | 84 ++---
app/pages/support/index.vue | 166 ++++-----
app/types/strapi/index.ts | 10 +-
app/types/strapi/production.ts | 8 +-
app/types/strapi/question.ts | 2 +-
app/types/strapi/solution.ts | 2 +-
app/utils/file.ts | 2 +-
app/utils/markdown.ts | 8 +-
commitlint.config.mjs | 4 +-
eslint.config.mjs | 19 +-
i18n.config.ts | 4 +-
i18n/i18n.config.ts | 9 +-
nuxt.config.ts | 97 +++--
prettier.config.mjs | 14 +-
uno.config.ts | 19 +-
43 files changed, 1900 insertions(+), 1878 deletions(-)
diff --git a/README.md b/README.md
index 7e8b174..ae7c747 100644
--- a/README.md
+++ b/README.md
@@ -5,20 +5,19 @@
## 站点内容
- 首页
- - 首页Banner
- - 推荐产品
+ - 首页Banner
+ - 推荐产品
- 产品展示
- - 产品列表分类展示
- - 产品详情页
+ - 产品列表分类展示
+ - 产品详情页
- 解决方案
- - 以Markdown形式渲染解决方案文章
+ - 以Markdown形式渲染解决方案文章
- 服务支持
- - 常见问题列表
- - 文档资料列表
- - 联系信息
+ - 常见问题列表
+ - 文档资料列表
+ - 联系信息
- 关于我们
- - 公司基本信息
-
+ - 公司基本信息
## 安装与设置
@@ -27,25 +26,25 @@
1. 克隆项目仓库:
-``` bash
+```bash
git clone http://192.168.84.125/remilia/jinshen-website.git
```
2. 进入项目目录:
-``` bash
+```bash
cd jinshen-website
```
3. 安装依赖
-``` bash
+```bash
pnpm install
```
4. 运行开发环境
-``` bash
+```bash
pnpm run dev
```
@@ -65,15 +64,18 @@ pnpm run dev
1. 构建生产版本
项目构建
-``` bash
+
+```bash
pnpm run build
```
预览构建版本
+
```bash
pnpm run preview
```
2. 部署
-部署构建后的项目并推送到文件服务器中,具体步骤视服务器配置而定
\ No newline at end of file
+部署构建后的项目并推送到文件服务器中,具体步骤视服务器配置而定
+
diff --git a/app/app.vue b/app/app.vue
index a45597f..c6553da 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -9,28 +9,28 @@
diff --git a/app/assets/css/fonts.css b/app/assets/css/fonts.css
index 029e9e3..142e7fb 100644
--- a/app/assets/css/fonts.css
+++ b/app/assets/css/fonts.css
@@ -1,26 +1,36 @@
@font-face {
- font-family: "Source Han Sans CN";
- src: url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff2") format("woff2"),
- url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff") format("woff");
- font-weight: 400;
- font-style: normal;
- font-display: swap;
+ font-family: "Source Han Sans CN";
+ src:
+ url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff2")
+ format("woff2"),
+ url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff")
+ format("woff");
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
}
@font-face {
- font-family: "Source Han Sans CN";
- src: url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff2") format("woff2"),
- url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff") format("woff");
- font-weight: 700;
- font-style: normal;
- font-display: swap;
+ font-family: "Source Han Sans CN";
+ src:
+ url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff2")
+ format("woff2"),
+ url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff")
+ format("woff");
+
+ font-weight: 700;
+ font-style: normal;
+ font-display: swap;
}
@font-face {
- font-family: "Source Han Sans CN";
- src: url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff2") format("woff2"),
- url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff") format("woff");
- font-weight: 300;
- font-style: normal;
- font-display: swap;
-}
\ No newline at end of file
+ font-family: "Source Han Sans CN";
+ src:
+ url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff2")
+ format("woff2"),
+ url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff")
+ format("woff");
+ font-weight: 300;
+ font-style: normal;
+ font-display: swap;
+}
diff --git a/app/assets/scss/element/dark.scss b/app/assets/scss/element/dark.scss
index 93bf00c..741cae4 100644
--- a/app/assets/scss/element/dark.scss
+++ b/app/assets/scss/element/dark.scss
@@ -1,6 +1,6 @@
-@forward 'element-plus/theme-chalk/src/dark/var.scss' with (
+@forward "element-plus/theme-chalk/src/dark/var.scss" with (
$bg-color: (
- 'page': #0a0a0a,
- 'overlay': #1d1e1f,
+ "page": #0a0a0a,
+ "overlay": #1d1e1f,
)
);
diff --git a/app/assets/scss/element/index.scss b/app/assets/scss/element/index.scss
index 002ec4f..4285909 100644
--- a/app/assets/scss/element/index.scss
+++ b/app/assets/scss/element/index.scss
@@ -1,26 +1,26 @@
$-colors: (
- 'primary': (
- 'base': #177ee5,
+ "primary": (
+ "base": #177ee5,
),
- 'success': (
- 'base': green,
+ "success": (
+ "base": green,
),
- 'warning': (
- 'base': #f9a23c,
+ "warning": (
+ "base": #f9a23c,
),
- 'danger': (
- 'base': #ff3300,
+ "danger": (
+ "base": #ff3300,
),
- 'error': (
- 'base': #f56c6c,
+ "error": (
+ "base": #f56c6c,
),
- 'info': (
- 'base': #909399,
+ "info": (
+ "base": #909399,
),
);
-@forward 'element-plus/theme-chalk/src/common/var.scss' with (
+@forward "element-plus/theme-chalk/src/common/var.scss" with (
$colors: $-colors
);
-@use './dark.scss';
\ No newline at end of file
+@use "./dark.scss";
diff --git a/app/assets/scss/index.scss b/app/assets/scss/index.scss
index 18852e2..4e52518 100644
--- a/app/assets/scss/index.scss
+++ b/app/assets/scss/index.scss
@@ -17,5 +17,6 @@ a {
}
:root {
- --font-main: "Source Han Sans CN", "Noto Sans CJK SC", "Noto Sans CJK", sans-serif;
-}
\ No newline at end of file
+ --font-main:
+ "Source Han Sans CN", "Noto Sans CJK SC", "Noto Sans CJK", sans-serif;
+}
diff --git a/app/components/DocumentList.vue b/app/components/DocumentList.vue
index 68f6ec6..c30953a 100644
--- a/app/components/DocumentList.vue
+++ b/app/components/DocumentList.vue
@@ -28,48 +28,48 @@
diff --git a/app/components/JinshenFooter.vue b/app/components/JinshenFooter.vue
index 39bd602..66a42e0 100644
--- a/app/components/JinshenFooter.vue
+++ b/app/components/JinshenFooter.vue
@@ -4,39 +4,39 @@