attrs.vdom.js 699 B

12345678910111213141516171819202122232425262728293031323334
  1. ({
  2. type: 'recycle-list',
  3. attr: {
  4. append: 'tree',
  5. listData: [
  6. { type: 'A', count: 1, source: 'http://whatever.com/x.png' },
  7. { type: 'A', count: 2, source: 'http://whatever.com/y.png' },
  8. { type: 'A', count: 3, source: 'http://whatever.com/z.png' }
  9. ],
  10. switch: 'type',
  11. alias: 'item'
  12. },
  13. children: [{
  14. type: 'cell-slot',
  15. attr: { append: 'tree', case: 'A' },
  16. children: [{
  17. type: 'image',
  18. attr: {
  19. resize: 'cover',
  20. src: {
  21. '@binding': 'item.source'
  22. }
  23. }
  24. }, {
  25. type: 'text',
  26. attr: {
  27. lines: '3',
  28. count: {
  29. '@binding': 'item.count'
  30. }
  31. }
  32. }]
  33. }]
  34. })