import deviceType from '../config/deviceType'; import Link from './Link'; import Section from './section'; /** 图库*/ const mapShape = {}; mapShape[deviceType.Link] = Link; mapShape[deviceType.Section] = Section; function shapefactory(type, device, style) { const shape = mapShape[type]; if (shape instanceof Function) { return new shape(device, style[type], style.Global); } } export default shapefactory;