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

[Bug Report] 按需引入vant,showImagePreview样式丢失 #12827

Closed
Loser1027 opened this issue Apr 25, 2024 · 2 comments
Closed

[Bug Report] 按需引入vant,showImagePreview样式丢失 #12827

Loser1027 opened this issue Apr 25, 2024 · 2 comments

Comments

@Loser1027
Copy link

重现链接

https://codesandbox.io/p/devbox/vant-4-issue-template-forked-lzzdj5?file=%2Fsrc%2FApp.vue%3A13%2C41&workspaceId=398fb7a5-af35-435f-a588-d704fa330800

Vant 版本

4.8.1

描述一下你遇到的问题。

按需引入vant,showImagePreview样式丢失

重现步骤

  1. 点击button
  2. 样式丢失

设备/浏览器

chrome

@suncohey
Copy link
Contributor

image

Vant 中有个别组件是以函数的形式提供的,包括 Toast,Dialog,Notify 和 ImagePreview 组件。在使用函数组件时,unplugin-vue-components 无法自动引入对应的样式,因此需要手动引入样式。

@Jungzl
Copy link
Contributor

Jungzl commented Apr 25, 2024

Duplicate: #12709

@inottn inottn closed this as completed Apr 25, 2024
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

4 participants