1. 环境 1. uniapp2. vite + vue3 + typescript + vite(移动端低代码)3. 编译成多端通用的小程序 2. 需要分两类解决 v-model属性 在高版本的Vue3+vite中使用父组件传递下来
1. uniapp2. vite + vue3 + typescript + vite(移动端低代码)3. 编译成多端通用的小程序
- v-model属性
[vite] [plugin:vite:vue] v-model cannot be used on a prop, because local prop bindings are not writable. 09:49:27.156 Use a v-bind binding combined with a v-on listener that emits update:x event instead.
const value = computed({ get: () => props.modelValue, set: (val) => { emits('update:modelValue', val) }})
// 父组件 // 子组件 GdFORMComponents
其他属性
attrs
// 父组件
觉得有用点个赞,让更多的人看见
来源地址:https://blog.csdn.net/weixin_44441196/article/details/130358038
--结束END--
本文标题: 解决uniapp编译的微信小程序不支持v-bind=“$attrs“
本文链接: https://www.lsjlt.com/news/372431.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0