Merge branch 'master' into deploy
This commit is contained in:
commit
1166017676
|
@ -58,8 +58,10 @@ const devWebpackConfig = merge(baseWebpackConfig, {
|
||||||
inject: true,
|
inject: true,
|
||||||
favicon: resolve('favicon.ico'),
|
favicon: resolve('favicon.ico'),
|
||||||
title: 'vue-element-admin',
|
title: 'vue-element-admin',
|
||||||
path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory
|
templateParameters: {
|
||||||
})
|
BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
|
||||||
|
},
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,9 @@ const webpackConfig = merge(baseWebpackConfig, {
|
||||||
inject: true,
|
inject: true,
|
||||||
favicon: resolve('favicon.ico'),
|
favicon: resolve('favicon.ico'),
|
||||||
title: 'vue-element-admin',
|
title: 'vue-element-admin',
|
||||||
path: config.build.assetsPublicPath + config.build.assetsSubDirectory,
|
templateParameters: {
|
||||||
|
BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
|
||||||
|
},
|
||||||
minify: {
|
minify: {
|
||||||
removeComments: true,
|
removeComments: true,
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<title>vue-element-admin</title>
|
<title>vue-element-admin</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src=<%= htmlWebpackPlugin.options.path %>/tinymce4.7.5/tinymce.min.js></script>
|
<script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vue-element-admin",
|
"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",
|
"description": "A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features",
|
||||||
"author": "Pan <panfree23@gmail.com>",
|
"author": "Pan <panfree23@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
// translate router.meta.title, be used in breadcrumb sidebar tagsview
|
// translate router.meta.title, be used in breadcrumb sidebar tagsview
|
||||||
export function generateTitle(title) {
|
export function generateTitle(title) {
|
||||||
const hasKey = this.$te('route.' + 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) {
|
if (hasKey) {
|
||||||
|
// $t :this method from vue-i18n, inject in @/lang/index.js
|
||||||
|
const translatedTitle = this.$t('route.' + title)
|
||||||
|
|
||||||
return translatedTitle
|
return translatedTitle
|
||||||
}
|
}
|
||||||
return title
|
return title
|
||||||
|
|
|
@ -149,6 +149,9 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
contentShortLength() {
|
contentShortLength() {
|
||||||
return this.postForm.content_short.length
|
return this.postForm.content_short.length
|
||||||
|
},
|
||||||
|
lang() {
|
||||||
|
return this.$store.getters.language
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -166,10 +169,18 @@ export default {
|
||||||
// Just for test
|
// Just for test
|
||||||
this.postForm.title += ` Article Id:${this.postForm.id}`
|
this.postForm.title += ` Article Id:${this.postForm.id}`
|
||||||
this.postForm.content_short += ` Article Id:${this.postForm.id}`
|
this.postForm.content_short += ` Article Id:${this.postForm.id}`
|
||||||
|
|
||||||
|
// Set tagsview title
|
||||||
|
this.setTagsViewTitle()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(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() {
|
submitForm() {
|
||||||
this.postForm.display_time = parseInt(this.display_time / 1000)
|
this.postForm.display_time = parseInt(this.display_time / 1000)
|
||||||
console.log(this.postForm)
|
console.log(this.postForm)
|
||||||
|
|
Loading…
Reference in New Issue