error TS2322 Type ‘string | LocationQueryValue[] | null‘ is not assignable to type ‘string‘.
代码:错误提示:解决办法方式一:// eslint-disable-next-line @typescript-eslint/ban-ts-comment// @ts-ignoreconst redirect: string = this.$route.query && this.$route.query.redirect;方式二:const redirect: string |
·
代码:
错误提示:
解决办法
方式一:
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const redirect: string = this.$route.query && this.$route.query.redirect;
方式二:
const redirect: string | null = this.$route.query && this.$route.query.redirect;
更多推荐
所有评论(0)