mcfxkh-Web/src/views/Home/panels/GqWeatherForcast/index.js

28 lines
634 B
JavaScript

import React from 'react';
import { useDispatch } from 'react-redux';
import PanelBox from '../../components/PanelBox';
import WF from './WF';
export default function WeatherForcast({ style }) {
const dispatch = useDispatch();
const closeLayer = () => {
dispatch.runtime.setLayerSetting({ contour: null, dem: undefined });
dispatch.map.setLayerVisible({ ContourLayer: false });
}
return (
<PanelBox
style={style}
title="天气预报1"
color="orange"
extra={
<i className="ionicons close cursor-pointer" onClick={closeLayer}></i>
}
>
<WF />
</PanelBox>
)
}