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

希望支持传入自定义的linkTap方法覆盖默认逻辑 #343

Closed
sws797 opened this issue Aug 18, 2021 · 2 comments
Closed

希望支持传入自定义的linkTap方法覆盖默认逻辑 #343

sws797 opened this issue Aug 18, 2021 · 2 comments
Labels
question Further information is requested

Comments

@sws797
Copy link

sws797 commented Aug 18, 2021

新功能描述

例如:支持传入自定义方法,覆盖原有的linktap逻辑

应用场景

富文本内容由网页端编辑,文本内超链接连接到同站点下的页面。
在小程序中配置了@linktap,所以点击该链接也可以跳转到小程序中对应的页面。

但是因为链接中含有://,在linkTap默认逻辑中会识别成外部链接,即使可以在小程序内部跳转,也会弹出“链接已复制”

临时办法

小程序渲染富文本内容时,将小程序可以跳转的链接转化成小程序链接,匹配linkTap的逻辑

@jin-yufeng
Copy link
Owner

copy-link 设置成 false 就可以屏蔽默认的自动复制了
然后就可以在 linktap 事件里自定义处理

@sws797
Copy link
Author

sws797 commented Aug 18, 2021

copy-link 设置成 false 就可以屏蔽默认的自动复制了
然后就可以在 linktap 事件里自定义处理

谢谢,是我看错地方看到miniprogram里面去了,也没有仔细看文档😂

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

No branches or pull requests

2 participants