Skip to content
New issue

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

<script>options api与<script setup>一起使用时,v-model生产模式构建错误 #6261

Closed
chenhaihong opened this issue Jul 12, 2022 · 1 comment

Comments

@chenhaihong
Copy link

Vue version

3.2.27

Link to minimal reproduction

https://sfc.vuejs.org/#eNqFUttu2zAM/RVCGNAWSKx2fRjgOUE67DP04lpMrdWWBIl2NwT591GWk9TpsAKGZN4OqcNzEE/eF+OAohRVbILxtFXW9N4Fgp+m7tzLk9awD66Hm0KePank5ruyAMri7ylb474eOoJD8jaOISxaiiUc3gEdVymqa6pv73ImQEAagj1ZALF1b5ybi0rY113EqQzgmC4++KvkeVw28j9EhvLsaZyNBC12nYMNPNzf86jLAsLedzUhWwDV80DkLOyazjSvGyUWI2woDKjEdhoMKpmTc+HlZeO6dxq7MiVdIygBkvMree4qViKTvO5rX/yKzvICJgbUHIhKMHX52Uow3clWoiXysZRysP71pWCa5Y5jMgyWTI9r7frdY/G1ePwmtYn03l9g7NfPwb1FDNxRiZnTCVyyc8SwDmg1Bgz/bXaVu2h4FfvQ9LRAJmAhpoX+/qUoHxzPcmIk0ZuURX88lvDDuQ5ruzpVzKKZ1ZbPHql1+oLQGo0XDQJQa2LxBXtDt0oMniWK0y6Zp4x294kEl4rSZmRJmP0sBZbPtFyq2oetnh4OtdaVZDPjftBgGpDL0rXUHBM9Xqnp+BdUJ0lC

Steps to reproduce

  1. 点击 show 按钮
  2. 点击 hide 按钮
  3. 出现错误提示 showAddDialog is not defined

What is expected?

生产模式能与开发模式保持一直,能正确构建出 v-model 的语法糖代码。

What is actually happening?

生产模式能构建出了错误的代码,

//....
{
    show: e.showDialogAdd,
    "onUpdate:show": s[1] || (s[1] = u=>B(showDialogAdd) ? showDialogAdd.value = u : null),
    roles: e.adminRoles,
    onAfterAdd: e.onSubmit  
}
//....

System Info

No response

Any additional comments?

No response

@chenhaihong chenhaihong changed the title <script>与<script setup>一起使用时,v-model生产模式构建错误 <script> options api与<script setup>一起使用时,v-model生产模式构建错误 Jul 12, 2022
@chenhaihong chenhaihong changed the title <script> options api与<script setup>一起使用时,v-model生产模式构建错误 <script>options api与<script setup>一起使用时,v-model生产模式构建错误 Jul 12, 2022
@LinusBorg
Copy link
Member

duplicate of #6248

@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants