Spreadsheet

Omi 和 x-spreadsheet 打造表格标签。

使用

  1. <m-spreadsheet
  2. onChange={(evt)=>{
  3. console.log(evt.detail)
  4. }}
  5. width={500}
  6. height={500}
  7. data={
  8. {
  9. freeze: 'B3',
  10. styles: [{
  11. bgcolor: '#f4f5f8',
  12. textwrap: true,
  13. color: '#900b09',
  14. border: {
  15. top: ['thin', '#0366d6'],
  16. bottom: ['thin', '#0366d6'],
  17. right: ['thin', '#0366d6'],
  18. left: ['thin', '#0366d6']
  19. }
  20. }],
  21. merges: [
  22. 'C3:D4'
  23. ],
  24. rows: {
  25. 1: {
  26. cells: {
  27. 0: { text: 'testingtesttestetst' },
  28. 2: { text: 'testing' }
  29. }
  30. },
  31. 2: {
  32. cells: {
  33. 0: { text: 'render', style: 0 },
  34. 1: { text: 'Hello' },
  35. 2: { text: 'haha', merge: [1, 1] }
  36. }
  37. },
  38. 8: {
  39. cells: {
  40. 8: { text: 'border test', style: 0 }
  41. }
  42. }
  43. }
  44. }}>
  45. </m-spreadsheet>

API

Props

  1. {
  2. data?: object
  3. width?: number
  4. height?: number
  5. }