UNPKG

@antv/f-engine

Version:

FEngine 是 AntV F 系列可视化引擎的底层渲染引擎,为移动端提供了一套完整的渲染、事件、动画能力,能方便的构建可视化 UI

28 lines (27 loc) 625 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.jsx = jsx; var _tslib = require("tslib"); // 实现jsx-classic 入口 function jsx(type, config) { var children = []; for (var _i = 2; _i < arguments.length; _i++) { children[_i - 2] = arguments[_i]; } var _a = config || {}, key = _a.key, ref = _a.ref, props = (0, _tslib.__rest)(_a, ["key", "ref"]); // 保持和automatic模式一致 if (children.length) { props.children = children.length === 1 ? children[0] : children; } return { key: key, ref: ref, type: type, props: props }; }