comment-constants.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // 表格列信息
  2. const table = {
  3. columns: [
  4. {
  5. title: 'ID',
  6. align: 'center',
  7. dataIndex: 'id'
  8. },
  9. {
  10. title: '作者',
  11. align: 'center',
  12. dataIndex: 'authorName'
  13. },
  14. {
  15. title: '回复对象',
  16. align: 'center',
  17. dataIndex: 'parentUserName',
  18. scopedSlots: { customRender: 'parentUserName' }
  19. },
  20. {
  21. title: '文章标题',
  22. align: 'center',
  23. dataIndex: 'postTitle',
  24. scopedSlots: { customRender: 'postTitle' }
  25. },
  26. {
  27. title: '评论内容',
  28. align: 'center',
  29. dataIndex: 'content',
  30. scopedSlots: { customRender: 'content' }
  31. },
  32. {
  33. title: '操作',
  34. dataIndex: 'action',
  35. align: 'center',
  36. width: '150px',
  37. scopedSlots: { customRender: 'action' }
  38. }
  39. ]
  40. }
  41. // 表格里面的列key value
  42. const filters = {
  43. syncStatusTypeFilter (status) {
  44. const statusMap = {
  45. 0: 'error',
  46. 1: 'success'
  47. }
  48. return statusMap[status]
  49. },
  50. statusTypeFilter (status) {
  51. const statusMap = {
  52. 1: 'error',
  53. 2: 'success'
  54. }
  55. return statusMap[status]
  56. },
  57. tagsListFilter (tagsList) {
  58. return '这是一个测试'
  59. }
  60. }
  61. export { table, filters }