index.wxs 377 B

1234567891011121314151617181920
  1. /* eslint-disable */
  2. var utils = require('../wxs/utils.wxs');
  3. function barStyle(barHeight, activeColor) {
  4. var styles = [['height', utils.addUnit(barHeight)]];
  5. if (activeColor) {
  6. styles.push(['background', activeColor]);
  7. }
  8. return styles
  9. .map(function (item) {
  10. return item.join(':');
  11. })
  12. .join(';');
  13. }
  14. module.exports = {
  15. barStyle: barStyle,
  16. };