fix: 路径修改

This commit is contained in:
聆一 2020-02-18 23:12:11 +08:00
parent 47079b9b0b
commit 6130514a2d
2 changed files with 27 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { ILayer, StyleAttrField } from '@antv/l7';
import * as React from 'react';
import { IAttributeOptions } from '.';
import { IAttributeOptions } from './';
const { useEffect } = React;
interface ILayerProps {

View File

@ -3,12 +3,35 @@ import * as React from 'react';
import { LayerContext } from '../LayerContext';
import { useSceneValue } from '../SceneContext';
import { Active, Color, Filter, ILayerProps, Scales, Shape, Size, Source, Style } from '.';
import {
Active,
Color,
Filter,
ILayerProps,
Scales,
Shape,
Size,
Source,
Style,
} from './';
const { useEffect, useState } = React;
export default function BaseLayer(type: string, props: ILayerProps & { children?: any }) {
const { source, color, shape, style, size, scales, active, filter, options } = props;
export default function BaseLayer(
type: string,
props: ILayerProps & { children?: any },
) {
const {
source,
color,
shape,
style,
size,
scales,
active,
filter,
options,
} = props;
const mapScene = (useSceneValue() as unknown) as Scene;
const [layer, setLayer] = useState();
if (!layer) {