index.wxs 426 B

1234567891011121314151617
  1. /* eslint-disable */
  2. var style = require('../wxs/style.wxs');
  3. var addUnit = require('../wxs/add-unit.wxs');
  4. function sizeStyle(data) {
  5. return "Array" === data.previewSize.constructor ? style({
  6. width: addUnit(data.previewSize[0]),
  7. height: addUnit(data.previewSize[1]),
  8. }) : style({
  9. width: addUnit(data.previewSize),
  10. height: addUnit(data.previewSize),
  11. });
  12. }
  13. module.exports = {
  14. sizeStyle: sizeStyle,
  15. };