Merge branch 'master' into deploy
This commit is contained in:
commit
b303d02783
|
@ -61,6 +61,7 @@ export default {
|
||||||
languageTypeList: {
|
languageTypeList: {
|
||||||
'en': 'en',
|
'en': 'en',
|
||||||
'zh': 'zh_CN',
|
'zh': 'zh_CN',
|
||||||
|
'es': 'es_MX',
|
||||||
'ja': 'ja'
|
'ja': 'ja'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,7 +108,7 @@ export default {
|
||||||
window.tinymce.init({
|
window.tinymce.init({
|
||||||
language: this.language,
|
language: this.language,
|
||||||
// language cnd URL, detail see https://github.com/PanJiaChen/tinymce-lang
|
// language cnd URL, detail see https://github.com/PanJiaChen/tinymce-lang
|
||||||
language_url: `https://cdn.jsdelivr.net/npm/tinymce-lang/langs/${this.language}.js`,
|
language_url: this.language === 'en' ? '' : `https://cdn.jsdelivr.net/npm/tinymce-lang/langs/${this.language}.js`,
|
||||||
selector: `#${this.tinymceId}`,
|
selector: `#${this.tinymceId}`,
|
||||||
height: this.height,
|
height: this.height,
|
||||||
body_class: 'panel-body ',
|
body_class: 'panel-body ',
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label-width="120px" label="Publush Time:" class="postInfo-container-item">
|
<el-form-item label-width="120px" label="Publush Time:" class="postInfo-container-item">
|
||||||
<el-date-picker v-model="postForm.display_time" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" />
|
<el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
@ -154,6 +154,18 @@ export default {
|
||||||
},
|
},
|
||||||
lang() {
|
lang() {
|
||||||
return this.$store.getters.language
|
return this.$store.getters.language
|
||||||
|
},
|
||||||
|
displayTime: {
|
||||||
|
// set and get is useful when the data
|
||||||
|
// returned by the back end api is different from the front end
|
||||||
|
// back end return => "2013-06-25 06:59:25"
|
||||||
|
// front end need timestamp => 1372114765000
|
||||||
|
get() {
|
||||||
|
return (+new Date(this.postForm.display_time))
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.postForm.display_time = new Date(val)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -189,7 +201,6 @@ export default {
|
||||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
this.$store.dispatch('tagsView/updateVisitedView', route)
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.postForm.display_time = parseInt(this.display_time / 1000)
|
|
||||||
console.log(this.postForm)
|
console.log(this.postForm)
|
||||||
this.$refs.postForm.validate(valid => {
|
this.$refs.postForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
Loading…
Reference in New Issue