浏览代码

部署后提示用户更新02

tyler 2 年之前
父节点
当前提交
e20e6cf177
共有 1 个文件被更改,包括 17 次插入1 次删除
  1. 17 1
      vue.config.js

+ 17 - 1
vue.config.js

@@ -59,7 +59,23 @@ module.exports = {
     },
     plugins: [
       new WebUpdateNotificationPlugin({
-        logVersion: true
+        logVersion: true,
+        // plugin preset: zh_CN | zh_TW | en_US
+        locale: 'en_US',
+        localeData: {
+          en_US: {
+            title: '📢 system update',
+            description: 'System update, please refresh the page',
+            buttonText: 'refresh',
+            dismissButtonText: 'dismiss'
+          },
+          zh_CN: {
+            title: '📢 系统更新',
+            description: '系统更新,请刷新页面',
+            buttonText: '刷新',
+            dismissButtonText: '取消'
+          }
+        }
       })
     ]
   },