编码记录

if (drawInterface[item.type]) {

                let zrShape = drawInterface[item.type](item);

                drawInterface.addShape(zrShape, item);

            }

 

从item中挑出4种属性使用

start({ id, type, shape, style }) {

        let start = Start.getInstance().draw({ id, type, shape, style });

        return start;

    }

你可能感兴趣的:(JavaScript)