role.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (c) 2018-2025, lengleng All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the pig4cloud.com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: lengleng (wangiegie@gmail.com)
  16. */
  17. export const tableOption = {
  18. border: true,
  19. index: true,
  20. indexLabel: '序号',
  21. stripe: true,
  22. menuAlign: 'center',
  23. editBtn: false,
  24. delBtn: false,
  25. align: 'center',
  26. addBtn: false,
  27. column: [{
  28. fixed: true,
  29. label: 'id',
  30. prop: 'roleId',
  31. span: 24,
  32. editDisabled: true,
  33. addVisdiplay: false,
  34. }, {
  35. fixed: true,
  36. label: '角色名称',
  37. prop: 'roleName',
  38. span: 24,
  39. rules: [{
  40. required: true,
  41. message: '角色名称不能为空',
  42. trigger: 'blur'
  43. },
  44. {
  45. min: 3,
  46. max: 20,
  47. message: '长度在 3 到 20 个字符',
  48. trigger: 'blur'
  49. }
  50. ]
  51. }, {
  52. label: '角色标识',
  53. prop: 'roleCode',
  54. span: 24,
  55. rules: [{
  56. required: true,
  57. message: '角色标识不能为空',
  58. trigger: 'blur'
  59. },
  60. {
  61. min: 3,
  62. max: 20,
  63. message: '长度在 3 到 20 个字符',
  64. trigger: 'blur'
  65. }
  66. ]
  67. }, {
  68. width: 180,
  69. label: '角色描述',
  70. prop: 'roleDesc',
  71. overHidden: true,
  72. type: 'textarea',
  73. minRows: 6,
  74. span: 24,
  75. }, {
  76. width: 180,
  77. label: '创建时间',
  78. prop: 'createTime',
  79. more: true,
  80. type: 'datetime',
  81. format: 'yyyy-MM-dd HH:mm',
  82. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  83. editDisabled: true,
  84. addVisdiplay: false,
  85. span: 24,
  86. }]
  87. }