/* Layout */ import Layout from '@/layout/index.vue' import { ADMIN, DISTRIBUTOR } from…
- User
/* Layout */ import Layout from '@/layout/index.vue' import { ADMIN, DISTRIBUTOR } from '@/api/common' const routerPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return routerPush.call(this, location).catch((error) => error) // Property 'catch' does not exist on type 'void' } 这个 ts 类型报错问题怎么处理
Vue.use(VueRouter)
- Assistant
It seems like your
.push()function doesn't return a Promise, so you can't call.catch()on it. Here's how you can modify your code:javascript
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.