diff --git a/.env.netlify b/.env.netlify
deleted file mode 100644
index 7e99b84..0000000
--- a/.env.netlify
+++ /dev/null
@@ -1,10 +0,0 @@
-# travis
-
-# 指定构建模式
-NODE_ENV=production
-
-# 标记当前构建方式
-VUE_APP_BUILD_MODE=NETLIFY
-
-# 显示源码按钮
-VUE_APP_SCOURCE_LINK=TRUE
diff --git a/.env.travis b/.env.preview
similarity index 79%
rename from .env.travis
rename to .env.preview
index 71e1223..0733d5b 100644
--- a/.env.travis
+++ b/.env.preview
@@ -1,10 +1,10 @@
-# travis
+# 构建预览页面
# 指定构建模式
NODE_ENV=production
# 标记当前构建方式
-VUE_APP_BUILD_MODE=TRAVIS
+VUE_APP_BUILD_MODE=PREVIEW
# 显示源码按钮
VUE_APP_SCOURCE_LINK=TRUE
diff --git a/README.md b/README.md
index fbb9ef5..3078297 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,3 @@
-[](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
-
[D2Admin](https://github.com/d2-projects/d2-admin) simplified version of the start template, delete all the sample code in the full version, retain all core functions.
[Gitee](https://gitee.com/fairyever/d2-admin-start-kit)
\ No newline at end of file
diff --git a/README.zh.md b/README.zh.md
index f7228b3..4010a93 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -1,5 +1,3 @@
-[](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
-
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)
\ No newline at end of file
diff --git a/package.json b/package.json
index 3c77a2c..e8ab13a 100644
--- a/package.json
+++ b/package.json
@@ -7,8 +7,7 @@
"dev": "npm run serve",
"build": "vue-cli-service build",
"build:nomock": "vue-cli-service build --mode nomock",
- "build:travis": "vue-cli-service build --mode travis",
- "build:github": "NODE_OPTIONS=--max_old_space_size=4096 npm run build:travis",
+ "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
"lint": "vue-cli-service lint --fix",
"test:unit": "vue-cli-service test:unit"
},
diff --git a/src/components/d2-container/components/d2-source.vue b/src/components/d2-container/components/d2-source.vue
index a9c1dea..2c85d5a 100644
--- a/src/components/d2-container/components/d2-source.vue
+++ b/src/components/d2-container/components/d2-source.vue
@@ -19,7 +19,7 @@ export default {
},
computed: {
show () {
- return process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.NODE_ENV === 'development'
+ return process.env.VUE_APP_SCOURCE_LINK === 'TRUE'
}
},
watch: {
diff --git a/src/locales/mixin.js b/src/locales/mixin.js
index 269a118..c7323ff 100644
--- a/src/locales/mixin.js
+++ b/src/locales/mixin.js
@@ -3,7 +3,7 @@ export default {
onChangeLocale (command) {
this.$i18n.locale = command
let message = `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`
- if (['TRAVIS', 'NETLIFY'].includes(process.env.VUE_APP_BUILD_MODE)) {
+ if (process.env.VUE_APP_BUILD_MODE === 'PREVIEW') {
message = [
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
`仅提供切换功能,没有配置具体的语言数据 `,
diff --git a/src/views/system/index/components/d2-badge/index.vue b/src/views/system/index/components/d2-badge/index.vue
index 62b15be..ed34800 100644
--- a/src/views/system/index/components/d2-badge/index.vue
+++ b/src/views/system/index/components/d2-badge/index.vue
@@ -10,7 +10,6 @@
-
diff --git a/vue.config.js b/vue.config.js
index 8c4d0f7..9b70d35 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -58,7 +58,7 @@ module.exports = {
// sourcemap不包含列信息
config => config.devtool('cheap-source-map')
)
- // TRAVIS 构建 vue-loader 添加 filename
+ // 预览环境构建 vue-loader 添加 filename
.when(process.env.VUE_APP_SCOURCE_LINK === 'TRUE',
VueFilenameInjector(config, {
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME