diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 4757163..0000000 Binary files a/dist.zip and /dev/null differ diff --git a/src/components/select-icon/index.vue b/src/components/select-icon/index.vue index 7e9d4e5..48211ca 100644 --- a/src/components/select-icon/index.vue +++ b/src/components/select-icon/index.vue @@ -42,23 +42,22 @@ const iconList = computed(() => { if (!ArcoIcons) return []; let icons: string[] = []; for (let key in ArcoIcons) { - if (key != "default") { - icons.push(key); - } + if (key != "default") icons.push(key); } + // 若按照关键字搜索,则返回搜索结果 if (searchName.value) { return icons.filter(item => item.toLowerCase().includes(searchName.value.toLowerCase())); } + // 若关键字为空则返回全部列表 return icons; }); -const onIcon = (item: string) => { +const onIcon = (iconName: string) => { visible.value = false; - emit("select", item); + emit("select", iconName); }; const visible = ref(false); - const open = () => { searchName.value = ""; visible.value = true; diff --git a/src/views/common-component/icon-component/icon-component.vue b/src/views/common-component/icon-component/icon-component.vue index cd4828f..7a02ca3 100644 --- a/src/views/common-component/icon-component/icon-component.vue +++ b/src/views/common-component/icon-component/icon-component.vue @@ -30,7 +30,6 @@ const onFocus = () => { SelectIconRef.value.open(); }; const onClear = () => { - console.log("请?"); iconName.value = ""; };