refactor: 更新配置文件和图标资源

- 精简prod.ts配置,移除不必要的注释和代码
- 更新app.config.ts中的tabBar样式和图标路径
- 删除不再使用的图标文件,优化项目资源结构
This commit is contained in:
iHeyTang 2025-09-11 12:47:31 +08:00
parent b3c7c09e13
commit a38a0847eb
8 changed files with 19 additions and 46 deletions

View File

@ -1,35 +1,9 @@
import type { UserConfigExport } from "@tarojs/cli"
import type { UserConfigExport } from '@tarojs/cli';
export default {
mini: {},
h5: {
// 确保产物为 es5
legacy: true,
/**
* WebpackChain
* @docs https://github.com/neutrinojs/webpack-chain
*/
// webpackChain (chain) {
// /**
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
// */
// chain.plugin('analyzer')
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
// /**
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin
// */
// const path = require('path')
// const Prerender = require('prerender-spa-plugin')
// const staticDir = path.join(__dirname, '..', 'dist')
// chain
// .plugin('prerender')
// .use(new Prerender({
// staticDir,
// routes: [ '/pages/index/index' ],
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
// }))
// }
}
} satisfies UserConfigExport<'vite'>
},
} satisfies UserConfigExport<'vite'>;

View File

@ -1,40 +1,39 @@
export default defineAppConfig({
pages: [
'pages/home/index', // 新的模板卡片首页
'pages/history/index', // 历史记录页面
'pages/generate/index', // 生成处理页面
'pages/result/index'
'pages/home/index', // 新的模板卡片首页
'pages/history/index', // 历史记录页面
'pages/generate/index', // 生成处理页面
'pages/result/index',
],
tabBar: {
color: '#999999',
selectedColor: '#FFD67A',
color: '#8E9BAE',
selectedColor: '#1D1F22',
backgroundColor: '#FFFFFF',
borderStyle: 'black',
list: [
{
pagePath: 'pages/home/index',
text: '首页',
iconPath: 'assets/icons/default/shouye-weixuanzhong.png',
selectedIconPath: 'assets/icons/activate/shouye.png'
iconPath: 'assets/icons/playground.png',
selectedIconPath: 'assets/icons/playground-selected.png',
},
{
pagePath: 'pages/history/index',
text: '历史记录',
iconPath: 'assets/icons/default/fuwuzixun-weixuanzhong.png',
selectedIconPath: 'assets/icons/activate/shoulijindu.png'
}
]
iconPath: 'assets/icons/user.png',
selectedIconPath: 'assets/icons/user-selected.png',
},
],
},
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: '图生视频',
navigationBarTextStyle: 'black'
navigationBarTextStyle: 'black',
},
permission: {
'scope.album': {
desc: '用于保存生成的图片和视频到相册'
}
desc: '用于保存生成的图片和视频到相册',
},
},
})
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/icons/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB