lis8.0-vue3/src/views/liswork/labItem/tab/commonDescriptions.vue

46 lines
1.1 KiB
Vue
Raw Normal View History

2025-10-21 17:43:57 +08:00
<template>
<!-- 常见描述 -->
2025-10-28 16:22:44 +08:00
<div v-show="visible">
<div class="modifyClass">
<el-button type="primary" @click="">增加</el-button>
<el-button type="primary" @click="">删除</el-button>
</div>
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/>
</div>
2025-10-21 17:43:57 +08:00
</template>
2025-10-24 15:37:24 +08:00
<script setup lang="ts">
2025-10-28 16:22:44 +08:00
import CustomTable from '@/components/elTable/index.vue'
import { ref } from 'vue';
2025-10-24 15:37:24 +08:00
2025-10-21 17:43:57 +08:00
const props = defineProps({
2025-10-28 16:22:44 +08:00
// 是否显示
2025-10-21 17:43:57 +08:00
visible: {
2025-10-24 15:37:24 +08:00
type: Boolean,
2025-10-21 17:43:57 +08:00
required: true,
2025-10-24 15:37:24 +08:00
default: false
2025-10-21 17:43:57 +08:00
}
});
2025-10-28 16:22:44 +08:00
const tableRef = ref<any>(null);
const dataList = ref();
const columns = ref([
{ prop: 'textresult', label: '文字描述', visible: true, align: 'center', width: 500 },
]);
const tableConfig = ref({
border: true, // 边框
height: '80vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// cellStyle: cellStyleHd
})
//退拽属性
const handleColumnDragEnd = (data: any) => {
// 更新列配置
columns.value = data.columns;
}
2025-10-21 17:43:57 +08:00
</script>