You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
426 B

8 months ago
  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. };