2023年3月30日 删除列配置

This commit is contained in:
bai 2023-03-30 20:18:30 +08:00
parent 7524944502
commit 6912abd949
2 changed files with 28 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<div class="table-settings">
<RedoSetting v-if="getSetting.redo" :isMobile="isMobile" :getPopupContainer="getTableContainer" />
<SizeSetting v-if="getSetting.size" :isMobile="isMobile" :getPopupContainer="getTableContainer" />
<ColumnSetting v-if="getSetting.setting" :isMobile="isMobile" @columns-change="handleColumnChange" :getPopupContainer="getTableContainer" />
<!-- <ColumnSetting v-if="getSetting.setting" :isMobile="isMobile" @columns-change="handleColumnChange" :getPopupContainer="getTableContainer" /> -->
<FullScreenSetting v-if="getSetting.fullScreen" :isMobile="isMobile" :getPopupContainer="getTableContainer" />
</div>
</template>
@ -10,7 +10,7 @@
import type { PropType } from 'vue';
import type { TableSetting, ColumnChangeParam } from '../../types/table';
import { defineComponent, computed, unref } from 'vue';
import ColumnSetting from './ColumnSetting.vue';
// import ColumnSetting from './ColumnSetting.vue';
import SizeSetting from './SizeSetting.vue';
import RedoSetting from './RedoSetting.vue';
import FullScreenSetting from './FullScreenSetting.vue';
@ -20,7 +20,7 @@
export default defineComponent({
name: 'TableSetting',
components: {
ColumnSetting,
// ColumnSetting,
SizeSetting,
RedoSetting,
FullScreenSetting,

View File

@ -80,6 +80,7 @@
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
///
<!-- 表单区域 -->
<KcKetangbiaoModal ref="registerModal" @success="handleSuccess"></KcKetangbiaoModal>
</div>
@ -106,6 +107,28 @@
columns,
canResize:false,
useSearchForm: false,
// customRow: (record, index: number) => {
// return {
// //
// onClick: (event) => {
// console.log(record, index, event);
// console.log(selectedRows,selectedRowKeys,);
// console.log(ref([record]),ref([record.id]));
// selectedRowKeys.value = ref([record]);
// selectedRows.value = ref([record.id]);
// // if (typeof rowSelection.onChange === 'function') {
// // rowSelection.onChange(...args);
// // }
// },
// };
// },
clickToRowSelect: true,
pagination: {
pageSize: 5
},
rowSelection: {
type: 'radio'
},
actionColumn: {
width: 120,
fixed: 'right',
@ -124,7 +147,7 @@
},
},
exportConfig: {
name: "课堂",
name: "课堂管理",
url: getExportUrl,
},
importConfig: {
@ -132,7 +155,7 @@
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },