Skip to content

Commit

Permalink
fix: 评审问题处理
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Oct 20, 2023
1 parent 70721d3 commit 254a6ad
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ const CustomMappingColor = (props: CustomMappingColorProps) => {
const deletePaletteRangeItem = (index: number, position: string | null) => {
if (dataType === 'number') {
const _value = customRanges[index];
// @ts-ignore

const list: CustomMappingColorItem[] = customRanges
.map((item, _index) => {
if (index === _index) {
return undefined;
return item;
}

if (position !== 'last') {
Expand All @@ -115,7 +115,7 @@ const CustomMappingColor = (props: CustomMappingColorProps) => {
return item;
}
})
.filter((item) => !isEmpty(item));
.filter((item, _index) => _index !== index);

setCustomRanges(list);
} else {
Expand All @@ -125,7 +125,6 @@ const CustomMappingColor = (props: CustomMappingColorProps) => {

const onChangePaletteRangeItem = (value: (string | number | null)[], color: string, index: number) => {
if (dataType === 'number') {
// @ts-ignore
const list: CustomMappingColorItem[] = customRanges.map((item, _index) => {
if (index === _index) {
return {
Expand Down Expand Up @@ -154,7 +153,6 @@ const CustomMappingColor = (props: CustomMappingColorProps) => {

setCustomRanges(list);
} else {
// @ts-ignore
const list: CustomMappingColorItem[] = customRanges.map((item, _index) => {
if (index === _index) {
return {
Expand Down

0 comments on commit 254a6ad

Please sign in to comment.