in the Vue component, the value in the object returned by Data is modified by the method in Methods, but the whole page is not re-rendered according to the modified value
export default {
data () {
let page = this.$attrs["page"]
let pageSize = this.$attrs["pageSize"]
let dataBus = {
newArticleData: [],
page
}
console.log(page)
this.$a.get(`http://localhost:8081/api/article/page/${dataBus.page}/pageSize/${pageSize}`).then(res => {
let json = res.data
if (json.err === false) {
dataBus.newArticleData = json.data[0]
}
}, err => {
console.log(err)
})
return dataBus
},
methods: {
addPage () {
this.pagePP
console.log(this.page)
}
}
}