We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.20
vue3
http://xx
将Modal组件 v-model:visible初始值为false也会进行预渲染,而不是等第一次值为true的时候才进行
当我在通过函数调用将visible值改为true的时候再进行渲染,否则获取props的值不正确
将Modal组件 v-model:visible初始值为false也会进行预渲染,此时props为undefined
父组件传递props给modal作为初始值,因为modal会直接进行渲染,即setup函数会直接执行,const initData = ref(props.boolean),此时父组件的props值会为undefined
The text was updated successfully, but these errors were encountered:
visible 控制的是显示,控制渲染时机可以使用 v-if="visible"
visible
v-if="visible"
Sorry, something went wrong.
你的意思是我需要 <a-modal v-model:visible="open" v-if="open"/> 吗?可是这样v-model:visible这个属性就很怪,我明明不需要它,但是又不加不行
<a-modal v-model:visible="open" v-if="open"/>
No branches or pull requests
Version
3.2.20
Environment
vue3
Reproduction link
http://xx
Steps to reproduce
将Modal组件 v-model:visible初始值为false也会进行预渲染,而不是等第一次值为true的时候才进行
What is expected?
当我在通过函数调用将visible值改为true的时候再进行渲染,否则获取props的值不正确
What is actually happening?
将Modal组件 v-model:visible初始值为false也会进行预渲染,此时props为undefined
父组件传递props给modal作为初始值,因为modal会直接进行渲染,即setup函数会直接执行,const initData = ref(props.boolean),此时父组件的props值会为undefined
The text was updated successfully, but these errors were encountered: