UNPKG

dm-vue3-ui

Version:

This Components Library will help get you started developing in Vue 3.

18 lines (17 loc) 415 B
function generateArray(min, max, labels) { const specifies = []; let index = 0; for (let specify = min; specify <= max; specify += 1) { specifies.push({ value: specify, label: labels ? labels[index] : specify.toString() }); index += 1; } return specifies; } function zerofill(value) { const prefix = value < 10 ? "0" : ""; return `${prefix}${value}`; } export { generateArray, zerofill };