docs: 规范注释
This commit is contained in:
parent
e3b60cfa53
commit
9798965f6a
@ -42,23 +42,22 @@ const iconList = computed(() => {
|
|||||||
if (!ArcoIcons) return [];
|
if (!ArcoIcons) return [];
|
||||||
let icons: string[] = [];
|
let icons: string[] = [];
|
||||||
for (let key in ArcoIcons) {
|
for (let key in ArcoIcons) {
|
||||||
if (key != "default") {
|
if (key != "default") icons.push(key);
|
||||||
icons.push(key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// 若按照关键字搜索,则返回搜索结果
|
||||||
if (searchName.value) {
|
if (searchName.value) {
|
||||||
return icons.filter(item => item.toLowerCase().includes(searchName.value.toLowerCase()));
|
return icons.filter(item => item.toLowerCase().includes(searchName.value.toLowerCase()));
|
||||||
}
|
}
|
||||||
|
// 若关键字为空则返回全部列表
|
||||||
return icons;
|
return icons;
|
||||||
});
|
});
|
||||||
|
|
||||||
const onIcon = (item: string) => {
|
const onIcon = (iconName: string) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emit("select", item);
|
emit("select", iconName);
|
||||||
};
|
};
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|
||||||
const open = () => {
|
const open = () => {
|
||||||
searchName.value = "";
|
searchName.value = "";
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
|
|||||||
@ -30,7 +30,6 @@ const onFocus = () => {
|
|||||||
SelectIconRef.value.open();
|
SelectIconRef.value.open();
|
||||||
};
|
};
|
||||||
const onClear = () => {
|
const onClear = () => {
|
||||||
console.log("请?");
|
|
||||||
iconName.value = "";
|
iconName.value = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user