diff --git a/config/vite.config.base.ts b/config/vite.config.base.ts index 2434326..eb62972 100644 --- a/config/vite.config.base.ts +++ b/config/vite.config.base.ts @@ -10,6 +10,8 @@ import Components from 'unplugin-vue-components/vite'; import { TDesignResolver } from 'unplugin-vue-components/resolvers'; import { ArcoResolver } from 'unplugin-vue-components/resolvers'; +import htmlPlugin from "vite-plugin-html-config"; + export default defineConfig({ base: './', plugins: [ @@ -27,6 +29,14 @@ export default defineConfig({ library: 'vue-next' }), ArcoResolver()], }), + htmlPlugin({ + metas: [ + { + name: "builtTime", + content: Math.ceil(parseInt(new Date().toISOString().replace(/[.:TZ-]/g, '')) / 1000).toString() + }, + ] + }) ], resolve: { alias: [ diff --git a/package.json b/package.json index 8c8da4a..6c4493e 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "unplugin-vue-components": "^0.26.0", "vite": "^3.2.5", "vite-plugin-compression": "^0.5.1", + "vite-plugin-html-config": "^1.0.11", "vite-plugin-imagemin": "^0.6.1", "vite-svg-loader": "^3.6.0", "vue-tsc": "^1.0.14" diff --git a/src/components/footer/index.vue b/src/components/footer/index.vue index cfdeed1..8758b4d 100644 --- a/src/components/footer/index.vue +++ b/src/components/footer/index.vue @@ -1,7 +1,7 @@