index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <div class="boilerData container-app">
  3. <vxe-grid v-bind="gridOptions">
  4. <template #operate="{ row }">
  5. <vxe-button type="text" status="primary">权限</vxe-button>
  6. </template>
  7. </vxe-grid>
  8. </div>
  9. </template>
  10. <script lang="ts" setup>
  11. import { reactive } from 'vue';
  12. import { VxeGridProps } from 'vxe-table';
  13. import { tableCloumn } from './constants';
  14. const tableData = [
  15. {
  16. id: '1001',
  17. boilerName: '1号锅炉',
  18. boilerRoomName: '冠城锅炉房',
  19. channel1: '12.5',
  20. channel2: '112.5',
  21. channel3: '19.5',
  22. channel4: '15',
  23. channel5: '12',
  24. channel6: '18',
  25. },
  26. {
  27. id: '1002',
  28. boilerName: '1号锅炉',
  29. boilerRoomName: '冠城锅炉房',
  30. channel1: '12.5',
  31. channel2: '112.5',
  32. channel3: '19.5',
  33. channel4: '15',
  34. channel5: '12',
  35. channel6: '18',
  36. },
  37. {
  38. id: '1003',
  39. boilerName: '1号锅炉',
  40. boilerRoomName: '冠城锅炉房',
  41. channel1: '12.5',
  42. channel2: '112.5',
  43. channel3: '19.5',
  44. channel4: '15',
  45. channel5: '12',
  46. channel6: '18',
  47. },
  48. ];
  49. const gridOptions = reactive<VxeGridProps>({
  50. id: 'toolbar_demo_1',
  51. border: true,
  52. stripe: true,
  53. align: 'center',
  54. height: '100%',
  55. columnConfig: {
  56. resizable: true,
  57. },
  58. customConfig: {
  59. storage: true,
  60. },
  61. columns: tableCloumn,
  62. data: [],
  63. toolbarConfig: {
  64. custom: true,
  65. // custom: {
  66. // icon: 'vxe-icon-menu',
  67. // },
  68. },
  69. });
  70. const init = () => {};
  71. defineExpose({ init });
  72. </script>
  73. <style lang="less" scoped>
  74. :deep(.t-button.t-size-s) {
  75. font: var(--td-font-body-medium);
  76. }
  77. .boilerData {
  78. padding: 15px;
  79. height: 78vh;
  80. }
  81. </style>