index.wxs 477 B

1234567891011121314151617181920
  1. /* eslint-disable */
  2. var style = require('../wxs/style.wxs');
  3. var addUnit = require('../wxs/add-unit.wxs');
  4. function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
  5. var styles = {
  6. 'font-size': addUnit(iconSize),
  7. };
  8. if (checkedColor && value && !disabled && !parentDisabled) {
  9. styles['border-color'] = checkedColor;
  10. styles['background-color'] = checkedColor;
  11. }
  12. return style(styles);
  13. }
  14. module.exports = {
  15. iconStyle: iconStyle,
  16. };