handleEdit (index, row) {
// let id = row._id
this.$router.push({name: "news-edit", params : {
new : row
}, query: {id: row._id, type: "edit"}})
},
Let let id= row._id show id=undefined, but row._id is worth it. I don"t know why
mounted () {
debugger
console.log(this.$route.query.type)
if ( "edit" == this.$route.query.type ){
let old = this.$route.params.new
this.title = old.title
this.author = old.author
this.content = old.content
this.abstract = old.abstract
this.coverImage = old.coverImage
}
console.log(this.title)
},
the same problem with old causes the following title not to get anything