diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 5eba7eb3..26a5584a 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -58,8 +58,10 @@ const devWebpackConfig = merge(baseWebpackConfig, {
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
- path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory
- })
+ templateParameters: {
+ BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
+ },
+ }),
]
})
diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js
index 01f85732..946a134a 100644
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -56,7 +56,9 @@ const webpackConfig = merge(baseWebpackConfig, {
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
- path: config.build.assetsPublicPath + config.build.assetsSubDirectory,
+ templateParameters: {
+ BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
+ },
minify: {
removeComments: true,
collapseWhitespace: true,
diff --git a/index.html b/index.html
index 489d1a53..7a7ecacf 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
vue-element-admin
-
+
diff --git a/package.json b/package.json
index 273b8752..ece40d0d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-element-admin",
- "version": "3.9.0",
+ "version": "3.9.1",
"description": "A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "Pan ",
"license": "MIT",
diff --git a/src/utils/i18n.js b/src/utils/i18n.js
index 0cb5e253..76be5a4e 100644
--- a/src/utils/i18n.js
+++ b/src/utils/i18n.js
@@ -1,9 +1,11 @@
// translate router.meta.title, be used in breadcrumb sidebar tagsview
export function generateTitle(title) {
const hasKey = this.$te('route.' + title)
- const translatedTitle = this.$t('route.' + title) // $t :this method from vue-i18n, inject in @/lang/index.js
if (hasKey) {
+ // $t :this method from vue-i18n, inject in @/lang/index.js
+ const translatedTitle = this.$t('route.' + title)
+
return translatedTitle
}
return title
diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue
index c7ec1eb0..4e3dca2c 100644
--- a/src/views/example/components/ArticleDetail.vue
+++ b/src/views/example/components/ArticleDetail.vue
@@ -149,6 +149,9 @@ export default {
computed: {
contentShortLength() {
return this.postForm.content_short.length
+ },
+ lang() {
+ return this.$store.getters.language
}
},
created() {
@@ -166,10 +169,18 @@ export default {
// Just for test
this.postForm.title += ` Article Id:${this.postForm.id}`
this.postForm.content_short += ` Article Id:${this.postForm.id}`
+
+ // Set tagsview title
+ this.setTagsViewTitle()
}).catch(err => {
console.log(err)
})
},
+ setTagsViewTitle() {
+ const title = this.lang === 'zh' ? '编辑文章' : 'Edit Article'
+ const route = Object.assign({}, this.$route, { title: `${title}-${this.postForm.id}` })
+ this.$store.dispatch('updateVisitedView', route)
+ },
submitForm() {
this.postForm.display_time = parseInt(this.display_time / 1000)
console.log(this.postForm)