feat: 接入版本检查并适配 vxe-table 4.7
- 非开发环境每 5 分钟轮询版本,构建时输出版本号文件 - 表格依赖升级到 vxe-table 4.21,组件与类型改用 vxe-pc-ui - 演示页按 4.7 写法重写列与表尾配置,移除旧版变量覆写
This commit is contained in:
commit
bf3e73aad2
8 files changed
+776
-405
No files matched your search
+16
-1
@@ -9,7 +9,8 @@ import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import { mockDevServerPlugin } from "vite-plugin-mock-dev-server";
|
||||
|
||||
import UnoCSS from "unocss/vite";
|
||||
import { resolve } from "path";
|
||||
import { join, resolve } from "path";
|
||||
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
||||
import { name, version } from "./package.json" with { type: "json" };
|
||||
|
||||
// 平台名称、版本信息
|
||||
@@ -83,6 +84,20 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
dts: false,
|
||||
//dts: "types/components.d.ts",
|
||||
}),
|
||||
// 生成版本号文件
|
||||
{
|
||||
name: "dist-version",
|
||||
closeBundle() {
|
||||
const distDir = resolve(__dirname, "dist");
|
||||
if (!existsSync(distDir)) {
|
||||
mkdirSync(distDir, { recursive: true });
|
||||
}
|
||||
writeFileSync(
|
||||
join(distDir, "version.json"),
|
||||
JSON.stringify({ version: __APP_INFO__.buildTimestamp })
|
||||
);
|
||||
},
|
||||
},
|
||||
] as PluginOption[],
|
||||
// 预加载项目必需的依赖
|
||||
optimizeDeps: {
|
||||
|
||||
Reference in new issue
Block a user