UNPKG

element-plus

Version:

A Component Library for Vue 3

25 lines (22 loc) 632 B
import { isNumber } from './util.mjs'; const isValidWidthUnit = (val) => { if (isNumber(val)) { return true; } else { return ["px", "rem", "em", "vw", "%", "vmin", "vmax"].some((unit) => val.endsWith(unit)) || val.startsWith("calc"); } }; const isValidComponentSize = (val) => ["", "large", "medium", "small", "mini"].includes(val); const isValidDatePickType = (val) => [ "year", "month", "date", "dates", "week", "datetime", "datetimerange", "daterange", "monthrange" ].includes(val); export { isValidComponentSize, isValidDatePickType, isValidWidthUnit }; //# sourceMappingURL=validators.mjs.map