fix table page
This commit is contained in:
@@ -951,7 +951,8 @@ const _sfc_main = defineComponent({
|
||||
} },
|
||||
getRadioProps: { type: Function, default: () => {
|
||||
} },
|
||||
download: { default: "" }
|
||||
download: { default: "" },
|
||||
serverpage: { type: Boolean, default: false }
|
||||
},
|
||||
emits: [
|
||||
"change",
|
||||
@@ -1128,8 +1129,12 @@ const _sfc_main = defineComponent({
|
||||
});
|
||||
let pagecurrent;
|
||||
const change = function(page) {
|
||||
pagecurrent = page.current;
|
||||
datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
|
||||
if (props.serverpage) {
|
||||
emit("change", page);
|
||||
} else {
|
||||
pagecurrent = page.current;
|
||||
datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
|
||||
}
|
||||
};
|
||||
const rowClick = function(data, evt) {
|
||||
emit("row", data, evt);
|
||||
|
||||
Reference in New Issue
Block a user