list operates on one page, and adds and edits on one page. When you click to edit a row of data in table, you can call to query the data according to ID for echo. But how to transfer the echoed data to the new page? I learned that it is troublesome to pass values through bus and vuex, bus. As soon as vuex refreshes the page data, there is no good experience. Is there any other way?
<el-button type="success" icon="el-icon-edit" size="mini" @click="updateCurrentRow(scope.row)"></el-button>
// Home
updateCurrentRow(row) {
this.$http
.get(this.$api.thelabelQueryId + `?id=${row.id}`)
.then(res => {
if (res.status == 200) {
// this.ruleForm, ?
this.ruleForm = res.data.data
this.$router.push({ path: "/addtag", query: { id: row.id } });
}
})
.catch(err => {
console.log(err);
});
},
// ?