|
@@ -167,11 +167,11 @@ const onblur = (params, index) => {
|
|
|
console.log(params, index)
|
|
|
}
|
|
|
|
|
|
-const onInput = debounce(function(params, index) {
|
|
|
+const onInput = (params, index) => {
|
|
|
currentIptIndex.value = index;
|
|
|
emits("setUser", {index: index, name: params.name})
|
|
|
getTwitterUsers(params.name)
|
|
|
-}, 500)
|
|
|
+}
|
|
|
|
|
|
const onKeydown = (params, index) => {
|
|
|
// setIptWidth(index);
|
|
@@ -219,10 +219,8 @@ const rectClick = (event) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const getTwitterUsers = (query, cb) => {
|
|
|
- if(query.indexOf('@') > -1) {
|
|
|
- return;
|
|
|
- }
|
|
|
+const getTwitterUsers = debounce(function(query, cb) {
|
|
|
+ query = query.replace("@", "");
|
|
|
searchTwitterUser({
|
|
|
params: {
|
|
|
name : query
|
|
@@ -234,7 +232,7 @@ const getTwitterUsers = (query, cb) => {
|
|
|
cb && cb(res);
|
|
|
console.log('searchTwitterUser',res)
|
|
|
})
|
|
|
-}
|
|
|
+}, 500)
|
|
|
|
|
|
const selectedUser = (params, index) => {
|
|
|
emits("setUser", {index: currentIptIndex.value, name: params.screenName});
|