fix: 重命名图标搜索文件 (#745)

Reviewed-on: daoyoucloud/tachycode#745
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-04-17 14:00:14 +08:00 committed by baijingfeng
parent e3f23fa7b1
commit 6d0e3eded2
3 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@ import { Input } from 'antd';
import _ from 'lodash';
import React from 'react';
export const IconFilter = (props) => {
export const IconFilterInput = (props) => {
const { changeFilterKey } = props;
const onChange = _.debounce((e) => {
const inputValue = e.target.value;

View File

@ -1,8 +1,8 @@
import React, { useMemo, useState } from 'react';
import React, { useMemo } from 'react';
import { Icon, icons } from '../../../icon';
import { Tooltip } from 'antd';
export const IconList = (props) => {
export const IconFilterList = (props) => {
const { filterKey, onChange, changePop } = props;
const iconKeysByFilter = useMemo(() => {

View File

@ -7,8 +7,8 @@ import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Icon, hasIcon, icons } from '../../../icon';
import { StablePopover } from '../popover';
import { IconFilter } from './IconFilter';
import { IconList } from './IconList';
import { IconFilterInput } from './IconFilterInput';
import { IconFilterList } from './IconList';
function IconField(props: any) {
const { value, onChange, disabled } = props;
@ -31,8 +31,8 @@ function IconField(props: any) {
}}
content={
<>
<IconFilter changeFilterKey={setFilterKey} />
<IconList filterKey={filterKey} onChange={onChange} changePop={setVisible} />
<IconFilterInput changeFilterKey={setFilterKey} />
<IconFilterList filterKey={filterKey} onChange={onChange} changePop={setVisible} />
</>
}
title={t('Icon')}