watch:{getorderid(curval,oldval){ //监听了computed中getorderid的值,如果发生改变就触发console.logconsole.log(`最新值${curval}--旧值${oldval}`);}},computed:{ //同步了store中state内的orderid值getorderid(){return this.$store.state.orderid;}}
热门工具 换一换