This commit is contained in:
theluyuan 2024-09-25 11:09:52 +08:00
parent 2f5407d7b3
commit cfac396548
4 changed files with 16 additions and 19 deletions

View File

@ -1163,6 +1163,7 @@ const _sfc_main = defineComponent({
{ deep: true, immediate: true }
);
watch(tableDataSource, () => {
console.log("tableDataSource\u66F4\u65B0", tableDataSource.value);
if (!props.page || props.serverpage) {
datalist.value = tableDataSource.value;
} else {
@ -1181,12 +1182,10 @@ const _sfc_main = defineComponent({
emit("change", page);
} else {
page.current;
datalist.value = [
...tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
)
];
datalist.value = tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
);
}
};
const rowClick = function(data, evt) {

View File

@ -40218,6 +40218,7 @@ const _sfc_main$D = defineComponent({
{ deep: true, immediate: true }
);
watch(tableDataSource, () => {
console.log("tableDataSource\u66F4\u65B0", tableDataSource.value);
if (!props.page || props.serverpage) {
datalist.value = tableDataSource.value;
} else {
@ -40236,12 +40237,10 @@ const _sfc_main$D = defineComponent({
emit("change", page);
} else {
page.current;
datalist.value = [
...tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
)
];
datalist.value = tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
);
}
};
const rowClick = function(data, evt) {

View File

@ -340,6 +340,7 @@ watch(
{ deep: true, immediate: true }
);
watch(tableDataSource, () => {
console.log("tableDataSource更新", tableDataSource.value);
if (!props.page || props.serverpage) {
datalist.value = tableDataSource.value;
} else {
@ -362,12 +363,10 @@ const change = function (page: any) {
emit("change", page);
} else {
pagecurrent = page.current;
datalist.value = [
...tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
)
];
datalist.value = tableDataSource.value.slice(
page.limit * (page.current - 1),
page.limit * page.current
);
}
};

File diff suppressed because one or more lines are too long