decode.js 465 B

1234567891011121314151617181920212223242526
  1. const config = require('./config');
  2. Component({
  3. options: {
  4. styleIsolation: 'apply-shared'
  5. },
  6. properties: {
  7. nodes: {
  8. type: Object,
  9. value: {}
  10. }
  11. },
  12. lifetimes: {
  13. attached: function () {
  14. const _ts = this;
  15. config.events.forEach(item => {
  16. _ts['_' + item] = function (...arg) {
  17. if (global._events && typeof global._events[item] === 'function') {
  18. global._events[item](...arg);
  19. }
  20. };
  21. });
  22. }
  23. }
  24. })