Skip to content

Commit

Permalink
fix: 修改ts类型
Browse files Browse the repository at this point in the history
  • Loading branch information
syb01094648 committed Mar 7, 2024
1 parent 44b954b commit b4e2cb5
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/components/map-control-group/official-layer-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ const enLayout = {
wrapperCol: { span: 15 },
};

type customTilesItemProps = {
id: string;
image?: string;
title?: string;
layers?: string[];
};

export function OfficialLayerControl() {
const [form] = Form.useForm();
const styles = useStyle();
Expand Down Expand Up @@ -91,12 +98,7 @@ export function OfficialLayerControl() {
return false; // 阻止antd组件自动上传
};

const onItemClick = (item: {
id: any;
image: string;
title: string;
layers: string[];
}) => {
const onItemClick = (item: customTilesItemProps) => {
setRadioValue(item.id);
setLayerType(
item.id === OfficeLayerEnum.VectorMap ? [] : ([item.id] as string[]),
Expand Down Expand Up @@ -142,12 +144,7 @@ export function OfficialLayerControl() {

const onConfirm = (
e: React.MouseEvent<HTMLElement> | undefined,
item: {
id: string;
image?: string;
title?: string;
layers?: string[];
},
item: customTilesItemProps,
) => {
e?.stopPropagation();
const newCustomTiles = customTiles.filter((val) => {
Expand Down

0 comments on commit b4e2cb5

Please sign in to comment.