Commit d708106d by 潘际乾

$route的监听

parent b9593fed
......@@ -11,6 +11,15 @@
<script>
export default {
name: "Business",
watch: {
$route() {
if (this.$route.path.startsWith("/review")) {
this.$store.commit("setMode", "display");
} else {
this.$store.commit("setMode", "normal");
}
},
},
created: () => {
console.log("进入业务交易界面");
},
......
......@@ -71,11 +71,6 @@ export default {
},
watch: {
$route() {
if (this.$route.path.startsWith("/review")) {
this.$store.commit("setMode", "display");
} else {
this.$store.commit("setMode", "normal");
}
this.addTags();
this.moveToCurrentTag();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment