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,导入Vue的h函数后,会让vue-cropper无法显示base64格式图片 #827

Open
Alex-Jee opened this issue May 31, 2024 · 3 comments

Comments

@Alex-Jee
Copy link

如题,vue3项目,"vue-cropper": "^1.1.3"。去掉h函数导入就正常了。
顺便一提可否提供ts类型声明,现在只能让lang是js

@xyxiao001
Copy link
Owner

我看看 ts类型声明我到时提供下,h函数导入后会报错嘛

@wanghaochun
Copy link

我看看 ts类型声明我到时提供下,h函数导入后会报错嘛

不会报错,但是会样式丢失。。目前所用版本为1.1.1,我是想将vue-cropper封装成编程式命令使用(类似element-plus的MessageBox【https://element-plus.org/zh-CN/component/message-box.html】,使用时直接调用且可以通过Promise接受裁剪结果),将vue-cropper声明在我自定义组件Cropper下,
image
通过h函数创建Cropper组件(里面已有声明式导入vue-cropper)
image
通过查看DOM发现样式不生效,请问有什么办法解决吗?
image

@wanghaochun
Copy link

image
已解决

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

No branches or pull requests

3 participants