浏览代码

版本显示方案优化

任一存 2 年之前
父节点
当前提交
622ea00a0d
共有 4 个文件被更改,包括 19 次插入2 次删除
  1. 13 2
      package-lock.json
  2. 1 0
      package.json
  3. 1 0
      src/main.js
  4. 4 0
      vue.config.js

+ 13 - 2
package-lock.json

@@ -1,15 +1,16 @@
 {
   "name": "code",
-  "version": "0.1.0",
+  "version": "1.0.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "code",
-      "version": "0.1.0",
+      "version": "1.0.0",
       "dependencies": {
         "axios": "^0.27.2",
         "core-js": "^3.6.5",
+        "dayjs": "^1.11.7",
         "element-ui": "^2.15.6",
         "html2canvas": "^1.3.3",
         "install": "^0.13.0",
@@ -5135,6 +5136,11 @@
         "node": ">=0.10"
       }
     },
+    "node_modules/dayjs": {
+      "version": "1.11.7",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
+      "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
+    },
     "node_modules/de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
@@ -21386,6 +21392,11 @@
         "assert-plus": "^1.0.0"
       }
     },
+    "dayjs": {
+      "version": "1.11.7",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
+      "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
+    },
     "de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",

+ 1 - 0
package.json

@@ -11,6 +11,7 @@
   "dependencies": {
     "axios": "^0.27.2",
     "core-js": "^3.6.5",
+    "dayjs": "^1.11.7",
     "element-ui": "^2.15.6",
     "html2canvas": "^1.3.3",
     "install": "^0.13.0",

+ 1 - 0
src/main.js

@@ -9,6 +9,7 @@ import Viewer from 'v-viewer'
 import "@/assets/style/my-reset.css";
 
 console.log(`version: ${process.env.VUE_APP_VERSION}`)
+console.log(`Build time: ${process.env.VUE_APP_UPDATE_TIME}`)
 
 Vue.use(Viewer,{
   defaultOptions: {

+ 4 - 0
vue.config.js

@@ -3,6 +3,10 @@ const path = require('path');
 
 process.env.VUE_APP_VERSION = require('./package.json').version
 
+const dayjs = require('dayjs')
+const time = dayjs().format('YYYY-M-D HH:mm:ss')
+process.env.VUE_APP_UPDATE_TIME = time
+
 module.exports = {
   publicPath: "./",
   lintOnSave: false,