mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
--fix bug
This commit is contained in:
@@ -29,6 +29,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
pageKey: {
|
||||
type: String,
|
||||
default: "pageNo"
|
||||
},
|
||||
params: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
@@ -45,7 +49,7 @@ const props = defineProps({
|
||||
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
|
||||
const rowSelectKeys = ref([]);
|
||||
const selectsData = ref([]);
|
||||
const params = useResetRef({ pageNo: 1, pageSize: 10 });
|
||||
const params = useResetRef({ [props.pageKey]: 1, pageSize: 10 });
|
||||
const postParam = computed(() => ({ ...params.value, ...props.params }));
|
||||
|
||||
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
|
||||
@@ -89,12 +93,12 @@ function onSelectChange(e, l) {
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
showSizeChanger: false,
|
||||
current: params.value.pageNo,
|
||||
current: params.value[props.pageKey],
|
||||
pageSize: params.value.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
const changePagination = (e) => {
|
||||
params.value.pageNo = e;
|
||||
params.value[props.pageKey] = e;
|
||||
onFetch();
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
margin: 0px 4px 120px 10px;
|
||||
border: 1px solid #f0f0f0;
|
||||
">
|
||||
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE"
|
||||
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="page"
|
||||
:request="useBoeApiUserInfoPage" :params="nameSearch"
|
||||
v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user