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

Popup事件类型错误 #2468

Closed
agileago opened this issue Aug 2, 2023 · 7 comments · Fixed by #2469 or #2487
Closed

Popup事件类型错误 #2468

agileago opened this issue Aug 2, 2023 · 7 comments · Fixed by #2469 or #2487
Labels
Milestone

Comments

@agileago
Copy link
Contributor

agileago commented Aug 2, 2023

NutUI 包名

@nutui/nutui

NutUI 版本号

latest

平台

weapp

重现链接

https://github.com/agileago/vue3-taro

重现步骤

tsx下面popup无事件提示

期望的结果是什么?

有提示

实际的结果是什么?

没有

环境信息

No response

其他补充信息

发现类型变成这样了

image

@eiinu eiinu added the bug label Aug 2, 2023
@eiinu eiinu added this to the v4.1.3 milestone Aug 2, 2023
@eiinu eiinu linked a pull request Aug 2, 2023 that will close this issue
21 tasks
@agileago
Copy link
Contributor Author

agileago commented Aug 5, 2023

@eiinu 生成的是否还是有问题

image

jsx风格都是camelCase的

@eiinu
Copy link
Member

eiinu commented Aug 5, 2023

@eiinu 生成的是否还是有问题

image jsx风格都是camelCase的

Popup 组件内的事件使用的是 kebab-case,比如 click-pop,在使用模板语法时,@click-pop 或者 @clickPop 都是合法的。
但是 vue-tsc 并没有将这种命名完整地转换为 camelCase,只对首字母处理后加了 on。
vue 本身是兼容两种写法的,vue-tsc 这个处理逻辑就很奇怪。
现在看需要都统一改成 camelCase 才行

@agileago
Copy link
Contributor Author

agileago commented Aug 6, 2023

ant-design-vue和naiveui都是对的,所以这块得定个规则,支持tsx

@eiinu eiinu modified the milestones: v4.1.3, v4.1.4 Aug 7, 2023
@eiinu
Copy link
Member

eiinu commented Aug 7, 2023

ant-design-vue和naiveui都是对的,所以这块得定个规则,支持tsx

后续仓库内会增加 vue/v-on-event-hyphenationvue/custom-event-name-casing 规则校验

@agileago
Copy link
Contributor Author

agileago commented Aug 8, 2023

@eiinu 类型声明这块不改成 camelCase么?

@agileago
Copy link
Contributor Author

agileago commented Aug 8, 2023

京东内部不使用vue的tsx么?

@eiinu
Copy link
Member

eiinu commented Aug 9, 2023

@eiinu 类型声明这块不改成 camelCase么?

开发中。

@eiinu eiinu linked a pull request Aug 29, 2023 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants