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:
parent
e3f23fa7b1
commit
6d0e3eded2
@ -2,7 +2,7 @@ import { Input } from 'antd';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export const IconFilter = (props) => {
|
export const IconFilterInput = (props) => {
|
||||||
const { changeFilterKey } = props;
|
const { changeFilterKey } = props;
|
||||||
const onChange = _.debounce((e) => {
|
const onChange = _.debounce((e) => {
|
||||||
const inputValue = e.target.value;
|
const inputValue = e.target.value;
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useMemo, useState } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { Icon, icons } from '../../../icon';
|
import { Icon, icons } from '../../../icon';
|
||||||
import { Tooltip } from 'antd';
|
import { Tooltip } from 'antd';
|
||||||
|
|
||||||
export const IconList = (props) => {
|
export const IconFilterList = (props) => {
|
||||||
const { filterKey, onChange, changePop } = props;
|
const { filterKey, onChange, changePop } = props;
|
||||||
|
|
||||||
const iconKeysByFilter = useMemo(() => {
|
const iconKeysByFilter = useMemo(() => {
|
||||||
|
@ -7,8 +7,8 @@ import React, { useMemo, useState } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Icon, hasIcon, icons } from '../../../icon';
|
import { Icon, hasIcon, icons } from '../../../icon';
|
||||||
import { StablePopover } from '../popover';
|
import { StablePopover } from '../popover';
|
||||||
import { IconFilter } from './IconFilter';
|
import { IconFilterInput } from './IconFilterInput';
|
||||||
import { IconList } from './IconList';
|
import { IconFilterList } from './IconList';
|
||||||
|
|
||||||
function IconField(props: any) {
|
function IconField(props: any) {
|
||||||
const { value, onChange, disabled } = props;
|
const { value, onChange, disabled } = props;
|
||||||
@ -31,8 +31,8 @@ function IconField(props: any) {
|
|||||||
}}
|
}}
|
||||||
content={
|
content={
|
||||||
<>
|
<>
|
||||||
<IconFilter changeFilterKey={setFilterKey} />
|
<IconFilterInput changeFilterKey={setFilterKey} />
|
||||||
<IconList filterKey={filterKey} onChange={onChange} changePop={setVisible} />
|
<IconFilterList filterKey={filterKey} onChange={onChange} changePop={setVisible} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
title={t('Icon')}
|
title={t('Icon')}
|
||||||
|
Loading…
Reference in New Issue
Block a user