feat: 长按删除搜索记录

This commit is contained in:
guozhigq
2023-11-11 23:39:54 +08:00
parent d105718fbf
commit 96523a99ce
3 changed files with 36 additions and 16 deletions

View File

@ -117,6 +117,13 @@ class SSearchController extends GetxController {
submit();
}
onLongSelect(word) {
int index = historyList.indexOf(word);
historyList.value = historyList.removeAt(index);
historyList.refresh();
histiryWord.put('cacheList', historyList);
}
onClearHis() {
historyList.value = [];
historyCacheList = [];