
Vue3
青颜的天空
做自己的保护神!
展开
-
[Vue3] v-for循环中报错 类型“never”上不存在属性“xxx”
[Vue3] v-for循环中报错 类型“never”上不存在属性“xxx”原创 2022-07-21 10:39:22 · 8165 阅读 · 0 评论 -
Vue3 + TypeScript 报错:无法找到模块xx的声明文件
Vue3 + TypeScript 报错:无法找到模块xx的声明文件原创 2022-07-20 22:00:00 · 4369 阅读 · 0 评论 -
如何解决:warning Prop ‘fontFamily‘ requires default value to be set vue/require- 以及 vue3中props的默认写法
Vue3 中的项目使用 eslint 进行代码校验报如下警告warning Prop 'params' requires default value to be set vue/require-default-prop意思为:Prop ‘params’ 需要设置默认值原创 2022-07-15 00:15:00 · 3914 阅读 · 0 评论 -
Vue3 + Typescript 中使用 Vuex报错:Binding element ‘state‘ implicitly has an ‘any’ type
Vue3 + Typescript 中使用 Vuex报错:Binding element 'state' implicitly has an ‘any’ type原创 2022-07-14 23:15:00 · 3507 阅读 · 0 评论 -
vue3 typescript 在methods和setup中使用$refs并解决Object is possibly “null”
在vue中,通常在template中给某组件设置了 ref属性后,在methods中,直接this.$refs调用即可。但是使用了typescript后,this.$refs.xxx将会被提示Object is of type 'unknown'。这需要将变量定义一下类型。import XXComponent from 'XXComponent.vue';...(this.$refs.xxx as XXComponent).methodimport { XXComponent } from '原创 2021-09-13 13:45:29 · 6650 阅读 · 0 评论 -
Vue 中引入 json 的三种方法
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。 JSON 是 JS 对象的字符串表示法,它使用文本表示一个 JS 对象的信息,本质是一个字符串。原创 2021-05-07 12:54:01 · 40360 阅读 · 0 评论 -
Vue3 中使用 vue-router 实现路由跳转与参数获取
Vue3 中使用 vue-router 实现路由跳转与参数获取原创 2021-05-07 10:55:17 · 4333 阅读 · 0 评论