zent
Version:
一套前端设计语言和基于React的实现
15 lines (14 loc) • 457 B
JavaScript
export function getKeyFromChildrenIndex(child, index, subPrefix) {
if (subPrefix === void 0) { subPrefix = 'item'; }
return child.key || subPrefix + "_" + index;
}
export function getExtraStyle(_a) {
var isInline = _a.isInline, depth = _a.depth, inlineIndent = _a.inlineIndent;
var styleObject = {};
if (isInline) {
styleObject = {
paddingLeft: depth * inlineIndent + "px",
};
}
return styleObject;
}