-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Image组件class无效,width/height百分比无效 #1788
Comments
不是呀,我这里说的无效就是对包裹图片的
|
jsx丢失scopedId的问题,可以看下这个解决方案 vuejs/babel-plugin-jsx#51 (comment) |
关于 class 实际上还真不是你理解的那个原因,不然的话你看 card 就挂上了 scopeId,从根本上讲是 vue 对 fragment 的处理,导致 scopeId 没能落在 image 上,image 因为实现了预览功能所以内部使用了 fragment。这个应该可以通过调整 VDOM 结构解决,我周末试试。 本质原因在这里:vuejs/core#2549 |
主要是 |
scope id 给了,百分比的话我想了想还是算了,感觉比较 hack,还是让用户直接控制比较好 |
TuSimple/naive-ui version (版本)
2.21.5
Vue version (Vue 版本)
3.2.24
Browser and its version (浏览器及其版本)
Chrome(96.0.4664.45)
System and its version (系统及其版本)
Windows10
Node version (Node 版本)
Reappearance link (重现链接)
https://codesandbox.io/s/recursing-jones-3v9jh?file=/src/Demo.vue
Reappearance steps (重现步骤)
Image组件class无效,width/height百分比无效
Expected results (期望的结果)
Image组件class有效,width/height百分比有效
Actual results (实际的结果)
Image组件class无效,width/height百分比无效
Remarks (补充说明)
The text was updated successfully, but these errors were encountered: