mirror of https://gitee.com/antv-l7/antv-l7
fix: tslint error
This commit is contained in:
parent
5b42f2d7b3
commit
5e442daa9e
|
@ -19,5 +19,6 @@ exports.onCreateWebpackConfig = ({ getConfig }) => {
|
|||
'@antv/l7-scene': path.resolve(__dirname, 'packages/scene/src'),
|
||||
'@antv/l7-source': path.resolve(__dirname, 'packages/source/src'),
|
||||
'@antv/l7-utils': path.resolve(__dirname, 'packages/utils/src'),
|
||||
'@antv/l7-react': path.resolve(__dirname, 'packages/react/src')
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,13 +9,10 @@ interface ILayerProps {
|
|||
}
|
||||
export default React.memo(function Chart(props: ILayerProps) {
|
||||
const { layer, scales } = props;
|
||||
useEffect(
|
||||
() => {
|
||||
useEffect(() => {
|
||||
scales.field
|
||||
? layer.scale(scales.field as string, scales.value as IScale)
|
||||
: layer.scale(scales.values as IScaleOptions);
|
||||
},
|
||||
Object.values(scales).map((scale) => JSON.stringify(scales)),
|
||||
);
|
||||
}, [scales.value, scales.field, JSON.stringify(scales.values)]);
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -9,8 +9,11 @@ interface ILayerProps {
|
|||
}
|
||||
export default React.memo(function Chart(props: ILayerProps) {
|
||||
const { layer, style } = props;
|
||||
useEffect(() => {
|
||||
useEffect(
|
||||
() => {
|
||||
layer.style(style);
|
||||
}, Object.values(style));
|
||||
},
|
||||
Object.keys(style).map((key) => style[key]),
|
||||
);
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"compilerOptions": {
|
||||
"declarationDir": "./es",
|
||||
"rootDir": "./src",
|
||||
"baseUrl": "./"
|
||||
"baseUrl": "./",
|
||||
"target": "es6",
|
||||
},
|
||||
"include": ["./src"]
|
||||
}
|
Loading…
Reference in New Issue