【study】封装一个el-select可渲染的数字函数

33 阅读1分钟

image.png

export const FixedDays = ((num) => {
    const list = [];
    for (let i = 1; i < num; i++) {
        list.push({
            value: i,
            label: `每月${i}号`,
        });
    }
    return list;
})(29);