fix: 终端-基站信息,展示信息列宽可以调整

This commit is contained in:
TsMask
2024-03-30 20:14:30 +08:00
parent fa14f50e2d
commit 32d7897818

View File

@@ -1,10 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref, onMounted, toRaw } from 'vue'; import { reactive, ref, onMounted, toRaw } from 'vue';
import { PageContainer } from 'antdv-pro-layout'; import { PageContainer } from 'antdv-pro-layout';
import { message } from 'ant-design-vue/lib'; import { TableColumnsType, message } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider'; import { SizeType } from 'ant-design-vue/lib/config-provider';
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/lib/table';
import { listBase5G } from '@/api/neUser/base5G'; import { listBase5G } from '@/api/neUser/base5G';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -71,7 +70,7 @@ let tableState: TabeStateType = reactive({
}); });
/**表格字段列 */ /**表格字段列 */
let tableColumns: ColumnsType = [ let tableColumns = ref<TableColumnsType>([
{ {
title: 'Radio ID', title: 'Radio ID',
dataIndex: 'id', dataIndex: 'id',
@@ -88,14 +87,17 @@ let tableColumns: ColumnsType = [
title: 'Radio Name', title: 'Radio Name',
dataIndex: 'name', dataIndex: 'name',
align: 'left', align: 'left',
width: 300, resizable: true,
width: 200,
minWidth: 150,
maxWidth: 400,
}, },
{ {
title: 'Radio Address', title: 'Radio Address',
dataIndex: 'address', dataIndex: 'address',
align: 'left', align: 'left',
}, },
]; ]);
/**表格分页器参数 */ /**表格分页器参数 */
let tablePagination = reactive({ let tablePagination = reactive({
@@ -330,6 +332,7 @@ onMounted(() => {
:row-class-name="fnTableStriped" :row-class-name="fnTableStriped"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ y: 'calc(100vh - 480px)' }" :scroll="{ y: 'calc(100vh - 480px)' }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
> >
</a-table> </a-table>
</a-card> </a-card>