This commit is contained in:
2022-11-14 11:59:26 +08:00
parent 0a63adba99
commit 492d0963fe
336 changed files with 70636 additions and 7 deletions

10
es/utils/index.js Normal file
View File

@@ -0,0 +1,10 @@
function indentHandle(obj) {
const { indent, level, basePadding = 0, isTree } = obj;
const least = level - 1;
if (isTree && indent && least > 0) {
const px = typeof indent === "boolean" ? `${basePadding + 10 * least}px` : indent.replace(/\d+/g, (s) => (basePadding + least * +s).toString());
return `padding-left: ${px}`;
}
return "";
}
export { indentHandle as i };