-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: n-image
adds showPreview methods
#6746
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
n-image
adds showPreview methods, closes [#6695](https://git…n-image
adds showPreview methods
我看有人的需求好像是image-preview这个组件要单独使用,这个要做吗? |
Welcome PR |
感觉你写的这个不是单纯的独立api,类似于vant中的showImagePreview,这种传一个图片url数组比较合适。你这种获取instance去调用自定义的show方法,那我为啥不直接模拟点击instance.click()。 |
你要的是独立image-preview,这个showPreview是给部分人要按钮打开图片预览,两个东西。 |
我意思你的showPreview, 就是instance.click()。写复杂了 |
组件内部能实现的,组件内部实现好一点,参考elementplus的showPreview,总有人需要的 |
OK,你这样说也没问题。但其实业务方面更需要的是刚刚提到的独立组件, 不然就得,把NImage手动去隐藏, 然后再去模拟点击。很是麻烦 |
我有看到有那个image-preview单独使用的需求,arco.design有相近的功能,这两天加班的时候做一下 |
搞个
|
feat:
n-image
允许通过调用showPreview 方法来触发大图预览close #5763
close #6479
close #6695