新手问题 @username 这个功能一般怎么完成呢?

yirolhao · January 21, 2017 · Last by yirolhao replied at January 22, 2017 · 1412 hits

做个博客呆萌,想弄下这个功能,感覺很麻烦。建个新表?还是每次将 show 的时候,在查找? 还是其他的?求指教。

  1. 前端 AutoComplete 的库匹配输入框输入,例如 At.js
  2. 后端实现前缀匹配搜索,简单点你用 SQL: select * from users where name like "%xx" 也是可以的。

#2 楼 @huacnlee @ 一般不是只匹配一个,如果没有就没变化,如果有就变成一个链接,咱们的这@感觉更难做。。

You need to Sign in before reply, if you don't have an account, please Sign up first.