this.$route.query刷新后类型改变

获取this.$route.query传递的参数,通常为number,但是在页面刷新后会转变为string,
这样基于此的判断条件就不生效了。
解决方法:
通过parseInt
手动转变数据类型。
例:
this.intotype = parseInt(this.$route.query.type)
if (this.intotype === 2) {
this.dialogTitle = '上传短视频'
this.labelName = '短视频'
}
原文地址:https://www.cnblogs.com/duxiaoxiao/p/14340702.html