index.js 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. export const columns = (_this) => {
  2. return [
  3. {
  4. prop: 'nickName',
  5. label: '用户名称',
  6. align: 'center'
  7. },
  8. {
  9. prop: 'userName',
  10. label: '登录账号'
  11. },
  12. {
  13. prop: 'deptName',
  14. label: '所属机构'
  15. },
  16. {
  17. prop: 'majorName',
  18. label: '所属专业'
  19. },
  20. {
  21. prop: 'sex',
  22. label: '性别',
  23. width: '80px',
  24. render: (h, params) => {
  25. if (params.row.sex == 1) {
  26. return h('span', '男')
  27. } else {
  28. return h('span', '女')
  29. }
  30. }
  31. },
  32. {
  33. prop: 'phonenumber',
  34. label: '联系方式'
  35. },
  36. {
  37. prop: 'remark',
  38. label: '备注'
  39. }
  40. ]
  41. }
  42. export const options = {
  43. stripe: false, // 斑马纹
  44. mutiSelect: true, // 多选框
  45. index: false, // 显示序号, 多选则 mutiSelect
  46. loading: false, // 表格动画
  47. border: true,
  48. initTable: true, // 是否一挂载就加载数据
  49. height: 'calc(100vh - 500px)'
  50. }