jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/es/Grid/index.sjs
2024-11-10 15:01:22 +08:00

26 lines
548 B
JavaScript

function checkNeedVerticalSpace(count, index, columns) {
if (count % columns === 0) {
return index < count - columns;
} else {
return index < columns * Math.floor(count / columns);
}
}
function checkShowSplitLine(index, count, columns, mode, showDivider) {
if (!showDivider) {
return false;
}
if (index === count - 1) {
return false;
}
if (mode === 'default') {
if ((index + 1) % columns === 0) {
return false;
}
}
return true;
}
export default {
checkNeedVerticalSpace,
checkShowSplitLine,
};