/** * flex-basis 规则 */ import { UNIT_STR, NONNEGATIVE_NUMBER_REGEX_STR } from '../constant'; export default { regExp: new RegExp(`^flex-basis-(?((?${NONNEGATIVE_NUMBER_REGEX_STR})(?${UNIT_STR})?)|initial|inherit|auto)$`), render: function ({ grops }) { let { value, num, unit } = grops; if (num) { value = `${num}${unit}`; } return { name: 'flex-basis', css: [`flex-basis: ${value}`] } } }