option.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. expand: true,
  21. stripe: true,
  22. selection: true,
  23. page: false,
  24. menuAlign: 'center',
  25. defaultSort: {
  26. prop: 'username',
  27. order: 'descending'
  28. },
  29. align: 'center',
  30. dic: [],
  31. column: [{
  32. label: '用户名',
  33. prop: 'username',
  34. span: 24,
  35. solt: true,
  36. sortable: true,
  37. width: 120,
  38. rules: [{
  39. required: true,
  40. message: '请输入用户名',
  41. trigger: 'blur'
  42. }]
  43. }, {
  44. label: '类型',
  45. prop: 'type',
  46. width: 80,
  47. type: 'select',
  48. sortable: true,
  49. dicData: [{
  50. label: '后端',
  51. value: '0'
  52. }, {
  53. label: '前端',
  54. value: '1'
  55. }]
  56. }, {
  57. label: 'stars',
  58. width: '150',
  59. prop: 'stars',
  60. sortable: true,
  61. solt: true
  62. }, {
  63. label: '码云',
  64. solt: true,
  65. span: 24,
  66. prop: 'address',
  67. type: 'textarea',
  68. overHidden: true
  69. }, {
  70. label: '项目介绍',
  71. width: '300',
  72. prop: 'info',
  73. editDisabled: true,
  74. type: 'textarea',
  75. span: 24,
  76. maxRow: 4,
  77. minRow: 4,
  78. overHidden: true
  79. }]
  80. }