Skip to content

Commit

Permalink
backlogs update
Browse files Browse the repository at this point in the history
  • Loading branch information
colinin committed May 31, 2024
1 parent b6a84da commit 6c8af70
Show file tree
Hide file tree
Showing 124 changed files with 2,758 additions and 1,593 deletions.
4 changes: 2 additions & 2 deletions apps/vue/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VITE_PUBLIC_PATH=/

# Cross-domain proxy, you can configure multiple
# Please note that no line breaks
VITE_PROXY=[["/connect","http://127.0.0.1:30000"],["/api","http://127.0.0.1:30000"],["/signalr-hubs","ws://127.0.0.1:30000"]]
VITE_PROXY=[["/connect","http://99.22.20.2:30000"],["/api","http://99.22.20.2:30000"],["/signalr-hubs","ws://99.22.20.2:30000"]]
# VITE_PROXY=[["/api","https://vvbin.cn/test"]]

# Delete console
Expand All @@ -25,6 +25,6 @@ VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_MULTITENANCY_KEY='__tenant'

# STS Connect
VITE_GLOB_AUTHORITY='http://127.0.0.1:30000'
VITE_GLOB_AUTHORITY='http://99.22.20.2:30000'
VITE_GLOB_CLIENT_ID='vue-admin-client'
VITE_GLOB_CLIENT_SECRET='1q2w3e*'
55 changes: 26 additions & 29 deletions apps/vue/src/components/Table/src/BasicTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@
v-show="getEmptyDataIsShowTable"
@change="handleTableChange"
@resizeColumn="handleResizeColumn"
@expand="handleTableExpand"
>
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
<slot :name="item" v-bind="data || {}"></slot>
</template>
<template #headerCell="{ column }">
<HeaderCell :column="column" />
<slot name="headerCell" v-bind="{ column }">
<HeaderCell :column="column" />
</slot>
</template>
<!-- 增加对antdv3.x兼容 -->
<template #bodyCell="data">
<slot name="bodyCell" v-bind="data || {}"></slot>
</template>
Expand All @@ -62,19 +66,10 @@
TableActionType,
SizeType,
ColumnChangeParam,
InnerMethods,
} from './types/table';
import {
defineComponent,
ref,
reactive,
computed,
unref,
toRaw,
inject,
watchEffect,
nextTick,
} from 'vue';
import { defineComponent, ref, reactive, computed, unref, toRaw, inject, watchEffect, nextTick } from 'vue';
import { Button, Table } from 'ant-design-vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { useModal } from '/@/components/Modal/index';
Expand Down Expand Up @@ -209,12 +204,12 @@
emit,
);
function handleTableChange(...args) {
onTableChange.call(undefined, ...args);
emit('change', ...args);
function handleTableChange(pagination: any, filters: any, sorter: any, extra: any) {
onTableChange(pagination, filters, sorter);
emit('change', pagination, filters, sorter);
// 解决通过useTable注册onChange时不起作用的问题
const { onChange } = unref(getProps);
onChange && isFunction(onChange) && onChange.call(undefined, ...args);
onChange && isFunction(onChange) && onChange(pagination, filters, sorter, extra);
}
const {
Expand Down Expand Up @@ -248,7 +243,7 @@
const { getRowClassName } = useTableStyle(getProps, prefixCls);
const { getExpandOption, expandAll, expandRows, collapseAll } = useTableExpand(
const { getExpandOption, expandAll, expandRows, collapseRows, collapseAll, handleTableExpand } = useTableExpand(
getProps,
tableData,
emit,
Expand All @@ -265,15 +260,14 @@
},
};
const methods: InnerMethods = {
clearSelectedRowKeys,
getSelectRowKeys,
};
const { getAlertEnabled, getAlertMessage } = useTableAlert(getProps, getRowSelectionRef);
const { getHeaderProps } = useTableHeader(
getProps,
slots,
handlers,
getAlertEnabled,
getAlertMessage,
);
const { getHeaderProps } = useTableHeader(getProps, slots, handlers, methods, getAlertEnabled, getAlertMessage);
const { getFooterProps } = useTableFooter(
getProps,
Expand All @@ -289,8 +283,9 @@
getFormSlotKeys,
handleSearchInfoChange,
handleAdvanceSearchChange,
handleAdvanceSearchInfoChange,
} = useTableForm(getProps, slots, fetch, getLoading, formActions.setFieldsValue);
handleAdvanceSearchInfoChange
} =
useTableForm(getProps, slots, fetch, getLoading, formActions.setFieldsValue);
const getBindValues = computed(() => {
const dataSource = unref(getDataSourceRef);
Expand All @@ -310,9 +305,9 @@
footer: unref(getFooterProps),
...unref(getExpandOption),
};
if (slots.expandedRowRender) {
propsData = omit(propsData, 'scroll');
}
// if (slots.expandedRowRender) {
// propsData = omit(propsData, 'scroll');
// }
propsData = omit(propsData, ['class', 'onChange']);
return propsData;
Expand Down Expand Up @@ -373,6 +368,7 @@
setCacheColumnsByField,
expandAll,
expandRows,
collapseRows,
collapseAll,
scrollTo,
getSize: () => {
Expand Down Expand Up @@ -427,6 +423,7 @@
getWrapperClass,
columns: getViewColumns,
handleResizeColumn,
handleTableExpand,
};
},
});
Expand Down
Loading

0 comments on commit 6c8af70

Please sign in to comment.