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

使用update:formatted-value后·选择日期后数据消息 #4766

Closed
yudan215 opened this issue Apr 25, 2023 · 3 comments
Closed

使用update:formatted-value后·选择日期后数据消息 #4766

yudan215 opened this issue Apr 25, 2023 · 3 comments

Comments

@yudan215
Copy link

TuSimple/naive-ui version (版本)

2.34.3

Vue version (Vue 版本)

3.3.0-beta.1

Browser and its version (浏览器及其版本)

chrome

System and its version (系统及其版本)

win10

Node version (Node 版本)

Reappearance link (重现链接)

https://github.com/看下面地址

Reappearance steps (重现步骤)

使用update:formatted-value后·选择日期后数据消失
演示地址:https://1024code.com/codecubes/zqsmi6w

Expected results (期望的结果)

正常显示

Actual results (实际的结果)

使用update:formatted-value后·选择日期后数据消息

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Apr 25, 2023
@XieZongChen
Copy link
Collaborator

image
链接打开无复现

@yudan215
Copy link
Author

image 链接打开无复现

早上我用Edge也出现这个问题,多刷新几次就可以了·建议使用谷歌浏览器

@jizai1125
Copy link
Contributor

jizai1125 commented May 10, 2023

Upgrade the Vue version to 3.2.46 or higher to fix this issue. It's caused by Vue compiler treating v-model:kebab-case and @update:kebab-case inconsistently, which has been fixed in Vue 3.2.46.. Before the fix, v-model:kebab-case would compile to onUpdate:kebab-case, and @update:kebab-case would compile to onUpdate:kebabCase. Now, they will all compile to onUpdate:kebabCase.

Alternatively, you can use camelCase instead of kebab-case, like this:

<n-date-picker
    v-model:formattedValue="monthRange"
    @update:formattedValue="handleMonthRange"
 />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants