فهرست منبع

更新index.html文件以支持中文语言,优化meta标签以提升SEO和移动端体验;修改package.json中的项目名称为“有声合成平台”;更新rspack配置以设置页面标题和meta信息;调整开发服务器端口为8095;修复ParallaxBackground组件的标签闭合问题。

xbx 1 هفته پیش
والد
کامیت
68169747d1
5فایلهای تغییر یافته به همراه33 افزوده شده و 7 حذف شده
  1. 19 0
      config/rspack.base.config.ts
  2. 1 1
      config/rspack.dev.config.ts
  3. 10 3
      index.html
  4. 1 1
      package.json
  5. 2 2
      src/views/home/components/ParallaxBackground.vue

+ 19 - 0
config/rspack.base.config.ts

@@ -126,6 +126,25 @@ export const baseConfig = {
     }),
     new rspack.HtmlRspackPlugin({
       template: './index.html',
+      title: '声音AI平台',
+      // favicon: path.resolve(__dirname, '../public/favicon.ico'),
+      meta: {
+        description: '声音AI平台 - 专业的声音处理与分析工具',
+        keywords: '声音AI,音频处理,AI平台,语音识别',
+        author: 'Sound AI Team'
+      },
+      minify: isProd() ? {
+        removeComments: true,
+        collapseWhitespace: true,
+        removeRedundantAttributes: true,
+        useShortDoctype: true,
+        removeEmptyAttributes: true,
+        removeStyleLinkTypeAttributes: true,
+        keepClosingSlash: true,
+        minifyJS: true,
+        minifyCSS: true,
+        minifyURLs: true,
+      } : false,
     }),
 
     AutoImportPlugin({

+ 1 - 1
config/rspack.dev.config.ts

@@ -13,7 +13,7 @@ export default defineConfig(
     devtool: 'eval-cheap-module-source-map',
     devServer: {
       hot: true,
-      port: 8094,
+      port: 8095,
       open: true,
       historyApiFallback: true,
       proxy: [

+ 10 - 3
index.html

@@ -1,9 +1,16 @@
 <!doctype html>
-<html>
+<html lang="zh-CN">
 	<head>
 		<meta charset="UTF-8" />
-		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-		<title>Vue</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+		<meta name="renderer" content="webkit" />
+		<meta name="format-detection" content="telephone=no,email=no,address=no" />
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
+		<meta name="theme-color" content="#ffffff" />
+		
+		<title><%= htmlWebpackPlugin.options.title %></title>
 	</head>
 	<body>
 		<div id="app"></div>

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "rspack-project",
+  "name": "有声合成平台",
   "version": "1.0.0",
   "private": true,
   "scripts": {

+ 2 - 2
src/views/home/components/ParallaxBackground.vue

@@ -5,8 +5,8 @@
       :key="index"
       class="absolute inset-0 bg-cover bg-center bg-no-repeat"
       :style="getImageStyle(image, index)"
-    >
-    </Motion>
+    />
+    
   </div>
 </template>
 <script setup lang="ts">