摘要: 1.路由参数解耦 通常在组件中使用路由参数,大多数人会做以下事情。 export default { methods: { getParamsId() { return this.$route.params.id } } } 在组件中使用 $route 会导致与其相应路由的高度耦合,通过将其限制为某 阅读全文
posted @ 2023-02-10 11:49 假装学习 阅读(19) 评论(0) 推荐(0) 编辑