handleAfterInit.js 317 B

12345678910111213141516171819
  1. "use strict";
  2. function handleAfterInit() {
  3. var _this = this;
  4. var classStr = '';
  5. this.data.__classNames.forEach(function (key) {
  6. classStr += _this.props[key] || '';
  7. });
  8. if (this.data._classes !== classStr) {
  9. this.setData({
  10. _classes: classStr
  11. });
  12. }
  13. }
  14. module.exports = handleAfterInit;