classname.vdom.js 515 B

123456789101112131415161718192021222324252627
  1. ({
  2. type: 'recycle-list',
  3. attr: {
  4. append: 'tree',
  5. listData: [
  6. { type: 'A', color: 'red' },
  7. { type: 'A', color: 'blue' }
  8. ],
  9. switch: 'type',
  10. alias: 'item'
  11. },
  12. children: [{
  13. type: 'cell-slot',
  14. attr: { append: 'tree', case: 'A' },
  15. style: {
  16. backgroundColor: '#FF6600'
  17. },
  18. children: [{
  19. type: 'text',
  20. attr: {
  21. // not supported yet
  22. // classList: ['text', { '@binding': 'item.color' }],
  23. value: 'content'
  24. }
  25. }]
  26. }]
  27. })