comment-constants.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. },
  19. {
  20. title: '文章标题',
  21. align: 'center',
  22. dataIndex: 'postTitle',
  23. scopedSlots: { customRender: 'postTitle' }
  24. },
  25. {
  26. title: '评论内容',
  27. align: 'center',
  28. dataIndex: 'content',
  29. scopedSlots: { customRender: 'content' }
  30. },
  31. {
  32. title: '操作',
  33. dataIndex: 'action',
  34. align: 'center',
  35. width: '150px',
  36. scopedSlots: { customRender: 'action' }
  37. }
  38. ]
  39. }
  40. // 表格里面的列key value
  41. const filters = {
  42. syncStatusTypeFilter (status) {
  43. const statusMap = {
  44. 0: 'error',
  45. 1: 'success'
  46. }
  47. return statusMap[status]
  48. },
  49. statusTypeFilter (status) {
  50. const statusMap = {
  51. 1: 'error',
  52. 2: 'success'
  53. }
  54. return statusMap[status]
  55. },
  56. tagsListFilter (tagsList) {
  57. return '这是一个测试'
  58. }
  59. }
  60. export { table, filters }