tree.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const data = [
  2. {
  3. id: '1',
  4. parentId: '0',
  5. name: 'root',
  6. title: 'root',
  7. text: 'root',
  8. value: '1',
  9. rank: 1,
  10. children: [
  11. {
  12. id: '32816b88ff72423f960e7d492a386131',
  13. parentId: '1',
  14. name: '一级',
  15. title: '一级',
  16. text: '一级',
  17. value: '32816b88ff72423f960e7d492a386131',
  18. rank: 2,
  19. children: [
  20. {
  21. id: '9e11afc35d55475fb0bd3164b9684cbe',
  22. parentId: '32816b88ff72423f960e7d492a386131',
  23. name: '二级',
  24. title: '二级',
  25. text: '二级',
  26. value: '9e11afc35d55475fb0bd3164b9684cbe',
  27. rank: 3,
  28. children: [
  29. {
  30. id: '4cc1b04635e4444292526c5391699077',
  31. parentId: '9e11afc35d55475fb0bd3164b9684cbe',
  32. name: '三级',
  33. title: '三级',
  34. text: '三级',
  35. value: '4cc1b04635e4444292526c5391699077',
  36. rank: 4,
  37. children: [],
  38. },
  39. ],
  40. },
  41. ],
  42. },
  43. ],
  44. },
  45. ]
  46. module.exports = [
  47. {
  48. url: '/tree/list',
  49. type: 'post',
  50. response() {
  51. return { code: 200, msg: 'success', data }
  52. },
  53. },
  54. ]