-
Notifications
You must be signed in to change notification settings - Fork 114
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
at 前面空格?,at后怎么取出来? #8
Comments
1. 微信不可以呀,我安卓微信6.5.7,以及Mac微信2.2.1,都是a-z0-9紧跟@是无效的, 2. 这里@不区分"at触发的"和"手动输入的",该库旨在消除多余的node节点 (和jquery.atwho的差异), 实际上不应该区分,不然如果单纯copy/paste消息,at信息就会不一致, 应该是单纯以规则去从content中直接提取at信息,目前这个功能库里没有帮用户存储或提取, |
嗯,vue-at确实可以提供一个方法来直接获取at信息,如:
<at v-model="atList"></at> 感觉这里使用
<at @change="handleAtChange"></at>
<script>
handleAtChange (data) {
this.atList = data
}
</script> 3 <at ref="at"></at>
<script>
send () {
this.$refs.at.getAtList() // --> [...]
}
</script> 最直接了当,虽然一般不是很建议使用$refs: 还有没有其他想法? |
暂时木油了,博主强大 O(∩_∩)O |
@KuiShang 噢抱歉哈哈,暂时还没空完善功能, 监听的事件直接是editor的input事件,所以不会错过什么 |
O(∩_∩)O谢谢 |
现在可以不输入空格,直接输入at触发面板么? |
@raind33 可以的 有一个prop可以控制: <at :avoidEmail="false"><editor /></at> |
确实可以,非常感谢! |
1 以微信为例,不管前面是不是空格只要输入at,都会触发事件,目前博主这里似乎是前面空格才行。这个能否修复?
2 at后 肯定还是要取出来(发送出去),如何区分出,真正由于at触发的(ex:@小浩)和手动输入的(ex:@123),
The text was updated successfully, but these errors were encountered: