Browse Source

👣 基于vben重构原生组件

master
wangxiang 3 years ago
parent
commit
1256a69455
  1. 8
      kicc-ui/src/views/system/config/index.vue

8
kicc-ui/src/views/system/config/index.vue

@ -149,7 +149,7 @@ @@ -149,7 +149,7 @@
import { RedoOutlined, ColumnHeightOutlined, FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons-vue';
import { ref, onMounted, computed, watch } from 'vue';
import { Table, Form, Row, Col, Divider, Tooltip, Dropdown, Menu, Select, DatePicker, Alert } from 'ant-design-vue';
import { BasicTableProps, PaginationProps, SizeType } from '/@/components/Table';
import {BasicColumn, BasicTableProps, PaginationProps, SizeType} from '/@/components/Table';
import { listConfig, delConfig } from '/@/api/platform/system/controller/config';
import ConfigModal from './ConfigModal.vue';
import { columns } from './config.data';
@ -233,6 +233,8 @@ @@ -233,6 +233,8 @@
tableProps: {
// ID
rowKey: 'id',
//
columns,
//
loading: false,
//
@ -248,6 +250,7 @@ @@ -248,6 +250,7 @@
const defineBasicTableProps = defineProps(basicProps);
const basicTableProps = computed(() => ({ ...toRaw(defineBasicTableProps), ...state.tableProps } as unknown as BasicTableProps));
const dataSourceRef = computed(() => state.tableProps.dataSource);
const columnsRef = computed<BasicColumn[]>(() => state.tableProps.columns);
// vben-tablerowSelection,
const {
getRowSelection,
@ -269,12 +272,11 @@ @@ -269,12 +272,11 @@
// 使vben-table线
const { getRowClassName } = useTableStyle(basicTableProps, prefixCls);
// 使vben-table
const { getScrollRef, redoHeight } = useTableScroll(basicTableProps, tableElRef, columns as any, getRowSelectionRef, dataSourceRef);
const { getScrollRef, redoHeight } = useTableScroll(basicTableProps, tableElRef, columnsRef, getRowSelectionRef, dataSourceRef);
// a-table
const getBindValues = computed(() => {
const propsData: Recordable = {
...state.tableProps,
columns: columns,
size: state.selectedKeys[0],
scroll: unref(getScrollRef),
rowClassName: unref(getRowClassName),

Loading…
Cancel
Save