upgrade package
This commit is contained in:
@ -291,6 +291,30 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
head () {
|
||||
const keywords = []
|
||||
for (let i = 0; i < this.articels.term_relationships.length; i++) {
|
||||
if (this.articels.term_relationships[i].term_taxonomy && this.articels.term_relationships[i].term_taxonomy.term && this.articels.term_relationships[i].term_taxonomy.taxonomy === 'post_tag') {
|
||||
keywords.push(this.articels.term_relationships[i].term_taxonomy.term.name)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${this.articels.post_title} - 轶哥`,
|
||||
meta: [
|
||||
{
|
||||
hid: 'description',
|
||||
name: 'description',
|
||||
content: this.description
|
||||
},
|
||||
{
|
||||
hid: 'keywords',
|
||||
name: 'keywords',
|
||||
content: keywords.join(',')
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 创建编辑器
|
||||
if (process.client) {
|
||||
@ -920,30 +944,6 @@ export default {
|
||||
localStorage.checkSetting = new Date().getTime().toString()
|
||||
}
|
||||
}
|
||||
},
|
||||
head () {
|
||||
const keywords = []
|
||||
for (let i = 0; i < this.articels.term_relationships.length; i++) {
|
||||
if (this.articels.term_relationships[i].term_taxonomy && this.articels.term_relationships[i].term_taxonomy.term && this.articels.term_relationships[i].term_taxonomy.taxonomy === 'post_tag') {
|
||||
keywords.push(this.articels.term_relationships[i].term_taxonomy.term.name)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${this.articels.post_title} - 轶哥`,
|
||||
meta: [
|
||||
{
|
||||
hid: 'description',
|
||||
name: 'description',
|
||||
content: this.description
|
||||
},
|
||||
{
|
||||
hid: 'keywords',
|
||||
name: 'keywords',
|
||||
content: keywords.join(',')
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -12,10 +12,10 @@
|
||||
import { Form, FormItem, Input, Switch, Button } from 'element-ui'
|
||||
|
||||
export default {
|
||||
layout: 'auth',
|
||||
components: {
|
||||
Form, FormItem, Input, VueSwitch: Switch, Button
|
||||
},
|
||||
layout: 'auth',
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
|
Reference in New Issue
Block a user