UNPKG

linkmore-design

Version:

🌈 🚀lm组件库。🚀

24 lines (22 loc) 721 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getResizeColumnCount = void 0; // 列响应数量处理: (盒子总高宽, 列宽度) const getResizeColumnCount = ({ width: totalWidth } = {}, colWidth) => { if (totalWidth > 1790) { return colWidth > 308 ? 4 : colWidth > 228 ? 5 : colWidth > 200 ? 6 : 7; } if (totalWidth > 1390) { return colWidth > 308 ? 3 : colWidth > 228 ? 4 : colWidth > 200 ? 5 : 6; } if (totalWidth > 990) { return colWidth > 308 ? 2 : colWidth > 228 ? 3 : colWidth > 200 ? 4 : 5; } // 小于990时 return colWidth > 308 ? 2 : colWidth > 228 ? 3 : colWidth > 200 ? 4 : 5; }; exports.getResizeColumnCount = getResizeColumnCount;