2
0

stateful.vdom.js 804 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ({
  2. type: 'recycle-list',
  3. attr: {
  4. append: 'tree',
  5. listData: [
  6. { type: 'A', number: 24 },
  7. { type: 'A', number: 42 }
  8. ],
  9. switch: 'type',
  10. alias: 'item'
  11. },
  12. children: [{
  13. type: 'cell-slot',
  14. attr: { append: 'tree', case: 'A' },
  15. children: [{
  16. type: 'div',
  17. attr: {
  18. '@isComponentRoot': true,
  19. '@componentProps': {
  20. start: { '@binding': 'item.number' }
  21. }
  22. },
  23. children: [{
  24. type: 'text',
  25. classList: ['output'],
  26. attr: {
  27. value: { '@binding': 'count' } // need confirm
  28. }
  29. }, {
  30. type: 'text',
  31. event: ['click'],
  32. classList: ['button'],
  33. attr: { value: '+' }
  34. }]
  35. }, {
  36. type: 'text',
  37. attr: { value: 'other' }
  38. }]
  39. }]
  40. })