|
|
@@ -1,42 +1,42 @@
|
|
|
<template>
|
|
|
<div class="tablePaganations">
|
|
|
- <a-config-provider :locale="locale">
|
|
|
- <a-table
|
|
|
- id="commonTable"
|
|
|
- class="ant-table-striped"
|
|
|
- bordered
|
|
|
- size="small"
|
|
|
- height="1000px"
|
|
|
- :loading="isLoading"
|
|
|
- :data-source="dataSource"
|
|
|
- :columns="columns"
|
|
|
- :row-key="(record) => record.id"
|
|
|
- :scroll="{ y: yScroll }"
|
|
|
- :pagination="havePage ? pagination : false"
|
|
|
- :row-class-name="
|
|
|
- (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
|
|
- "
|
|
|
- :row-selection="
|
|
|
- isSelect
|
|
|
- ? {
|
|
|
- selectedRowKeys: state.selectedRowKeys,
|
|
|
- onSelect: selectEvent,
|
|
|
- onSelectAll: selectAllEvent,
|
|
|
- }
|
|
|
- : null
|
|
|
- "
|
|
|
- @change="tableChange"
|
|
|
- @resize-column="handleResizeColumn"
|
|
|
+ <!-- <a-config-provider :locale="locale"> -->
|
|
|
+ <a-table
|
|
|
+ id="commonTable"
|
|
|
+ class="ant-table-striped"
|
|
|
+ bordered
|
|
|
+ size="small"
|
|
|
+ height="1000px"
|
|
|
+ :loading="isLoading"
|
|
|
+ :data-source="dataSource"
|
|
|
+ :columns="columns"
|
|
|
+ :row-key="(record) => record.id"
|
|
|
+ :scroll="{ y: yScroll }"
|
|
|
+ :pagination="havePage ? pagination : false"
|
|
|
+ :row-class-name="
|
|
|
+ (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
|
|
+ "
|
|
|
+ :row-selection="
|
|
|
+ isSelect
|
|
|
+ ? {
|
|
|
+ selectedRowKeys: state.selectedRowKeys,
|
|
|
+ onSelect: selectEvent,
|
|
|
+ onSelectAll: selectAllEvent,
|
|
|
+ }
|
|
|
+ : null
|
|
|
+ "
|
|
|
+ @change="tableChange"
|
|
|
+ @resize-column="handleResizeColumn"
|
|
|
+ >
|
|
|
+ <template
|
|
|
+ v-for="(item, index) in renderArr"
|
|
|
+ #[item]="scope"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
- <template
|
|
|
- v-for="(item, index) in renderArr"
|
|
|
- #[item]="scope"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <slot :name="item" :scope="scope" v-bind="scope || {}" />
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- </a-config-provider>
|
|
|
+ <slot :name="item" :scope="scope" v-bind="scope || {}" />
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- </a-config-provider> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -52,8 +52,8 @@ import {
|
|
|
onMounted,
|
|
|
} from 'vue';
|
|
|
import { getTableScroll } from '../common/tableScroll.js';
|
|
|
-import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
|
|
|
-const locale = ref(zhCN);
|
|
|
+// import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
|
|
|
+// const locale = ref(zhCN);
|
|
|
|
|
|
const props = defineProps({
|
|
|
// 表格数据
|