|
|
@@ -12,9 +12,7 @@
|
|
|
:columns="columns"
|
|
|
:scroll="{y:410}"
|
|
|
:pagination="pagination"
|
|
|
- :row-selection="isSelect ? rowSelection : null"
|
|
|
:row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
|
|
- @resize-column="handleResizeColumn"
|
|
|
>
|
|
|
<template v-for="(item,index) in renderArr" #[item]="scope" :key="index">
|
|
|
<slot :name="item" :scope="scope" v-bind="scope || {}" />
|
|
|
@@ -65,8 +63,8 @@ const pagination = reactive({
|
|
|
const showSizeChange = (current, pageSize) => {
|
|
|
setTimeout(() => {
|
|
|
pagination.current = 1;
|
|
|
- emit('getPage', pagination.current, pageSize);
|
|
|
- },1000);
|
|
|
+ // emit('getPage', pagination.current, pageSize);
|
|
|
+ },500);
|
|
|
pagination.pageSize = pageSize;
|
|
|
};
|
|
|
|
|
|
@@ -76,23 +74,7 @@ const changePage = (current, size) => {
|
|
|
emit('getPage', pagination.current, size);
|
|
|
};
|
|
|
|
|
|
-// 是否多选
|
|
|
-const emit = defineEmits(['batch', 'getPage']);
|
|
|
-const rowSelection = {
|
|
|
- onChange: (selectedRowKeys, selectedRows) => {
|
|
|
- // console.log(selectedRowKeys, selectedRows);
|
|
|
- // emit('batch', selectedRowKeys);
|
|
|
- },
|
|
|
- getCheckboxProps: record => ({
|
|
|
- // disabled: record.name === '',
|
|
|
- // name: record.name,
|
|
|
- }),
|
|
|
-};
|
|
|
-
|
|
|
-// 表头可拖拽配置
|
|
|
-const handleResizeColumn = (w, col) => {
|
|
|
- col.width = w;
|
|
|
-};
|
|
|
+const emit = defineEmits(['getPage']);
|
|
|
|
|
|
// 监听total变化
|
|
|
watch(
|