UNPKG

zent

Version:

一套前端设计语言和基于React的实现

15 lines (12 loc) 239 B
const helper = { getCalculatedWidth(width) { let res; if (typeof width === 'number') { res = `${width}%`; } else if (typeof width === 'string') { res = width; } return res; } }; export default helper;