@antv/f2
Version:
Charts for mobile visualization.
24 lines • 739 B
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["key", "ref"];
// 实现jsx-classic 入口
export function jsx(type, config) {
var _ref = config || {},
key = _ref.key,
ref = _ref.ref,
props = _objectWithoutProperties(_ref, _excluded);
// 保持和automatic模式一致
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
children[_key - 2] = arguments[_key];
}
if (children.length) {
props.children = children.length === 1 ? children[0] : children;
}
return {
key: key,
ref: ref,
type: type,
props: props,
// 存储一些过程中的cache值
_cache: {}
};
}