-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yxh01132861
committed
Nov 17, 2023
1 parent
3ae18dd
commit ec7ed46
Showing
15 changed files
with
81 additions
and
180 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...tribute/components/ResterScaleSelector/CustomMappingColors/CustomInput/InputCat/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { InputNumber } from 'antd'; | ||
import { isNumber } from 'lodash-es'; | ||
import React, { useEffect, useState } from 'react'; | ||
|
||
type ItemProps = { | ||
size: 'small' | 'middle' | 'large'; | ||
value: [number]; | ||
min: number; | ||
max: number; | ||
onChange: (val: [number]) => void; | ||
}; | ||
|
||
const InputCat = ({ size = 'middle', value, min, max, onChange }: ItemProps) => { | ||
const [itemVal, setItemVal] = useState(value); | ||
|
||
const onInputChange = (e: number) => { | ||
onChange([e]); | ||
setItemVal([e]); | ||
}; | ||
|
||
useEffect(() => { | ||
setItemVal(value); | ||
}, [value]); | ||
|
||
return ( | ||
<InputNumber | ||
size={size} | ||
min={min} | ||
max={max} | ||
value={itemVal?.[0]} | ||
style={{ width: '100%' }} | ||
onChange={(e) => isNumber(e) && onInputChange(e)} | ||
/> | ||
); | ||
}; | ||
|
||
export default InputCat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
...bute/components/ResterScaleSelector/CustomMappingColors/CustomItem/Item/CatItem/index.tsx
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
...yerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomItem/Item/index.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...ayerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomItem/Item/style.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...olors/CustomItem/Item/NumberItem/style.ts → ...ngColors/CustomInput/InputNumber/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
...src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomItem/Item/index.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.../src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomItem/Item/style.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters