-
通过defineComponents定义的组件导出的时候会提示"export 'defineComponent' was not found in 'vue'
小程序开发工具会报错 TypeError: Object(...) is not a function<script> import { defineComponent, toRefs } from 'vue' export default defineComponent({ name: 'xxx', props: { tips: { type: Array, default: () => { return [] } } }, setup(props, context) { return { ...toRefs(props) } } }) </script>
-
import { getCurrentInstance } from vue,uni-app框架下在vue中暂时拿不到getCurrentInstance这个函数,无法访问到getCurrentInstance
-
v-model双向数据绑定默认用的还是原来的value属性和input事件,不是vue3.0中的v-bind:modelValue="xxx"的modelValue属性和update:modelValue事件;
-
ref无法获取组件实例ref引用;
<share ref="shareRef" ></share> const shareRef = ref(null) onMounted(() => { console.log('onMounted, shareRef: ', shareRef.value)//此处打印null,undefined })

sonicsunsky
- 发布:2020-10-08 15:55
- 更新:2022-02-21 14:16
- 阅读:12060
uni-app 通过vue-cli创建的vue3.0项目不支持的一些功能总结
分类:uni-app
14 个评论
要回复文章请先登录或注册
1***@qq.com
miniprogrammer
t***@163.com
2***@qq.com
战斗猪
战斗猪
战斗猪
sonicsunsky (作者)
毛学生
t***@163.com