mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-10 23:54:57 +08:00
分享中心取消即时和拼音搜索
This commit is contained in:
parent
807834244d
commit
3a7085ac31
@ -96,11 +96,11 @@
|
|||||||
debounce="200"
|
debounce="200"
|
||||||
standout="bg-primary text-white"
|
standout="bg-primary text-white"
|
||||||
dense
|
dense
|
||||||
@update:model-value="updateSearch"
|
@keydown="(e) => e.keyCode === 13 && updateSearch()"
|
||||||
placeholder="搜索,支持拼音首字母"
|
placeholder="搜索"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-btn dense flat icon="search" @click="updateSearch" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
@ -119,7 +119,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import commandTypes from "../js/options/commandTypes.js";
|
import commandTypes from "../js/options/commandTypes.js";
|
||||||
import pinyinMatch from "pinyin-match";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -194,7 +193,9 @@ export default {
|
|||||||
if (!this.commandSearchKeyword) this.matchedCommands = this.allCommands;
|
if (!this.commandSearchKeyword) this.matchedCommands = this.allCommands;
|
||||||
else
|
else
|
||||||
this.matchedCommands = this.allCommands.filter((x) =>
|
this.matchedCommands = this.allCommands.filter((x) =>
|
||||||
pinyinMatch.match(x.title, this.commandSearchKeyword)
|
x.title
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(this.commandSearchKeyword.toLowerCase())
|
||||||
);
|
);
|
||||||
this.fetchCommandDetails(1);
|
this.fetchCommandDetails(1);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user