1、修复页码器和vue3版本不兼容问题

master
chris 1 month ago
parent 90ef7b5ac9
commit a74f27e56c

@ -59,13 +59,16 @@ const props = defineProps({
}
})
const emit = defineEmits();
const emit = defineEmits(['pagination']);
const limit = defineModel('limit');
const page = defineModel('page');
const currentPage = computed({
get() {
return props.page
},
set(val) {
emit('update:page', val)
page.value = val
}
})
const pageSize = computed({
@ -73,7 +76,7 @@ const pageSize = computed({
return props.limit
},
set(val){
emit('update:limit', val)
limit.value = val
}
})
function handleSizeChange(val) {

@ -89,8 +89,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>

@ -85,8 +85,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
@ -225,7 +225,7 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
validateForm.then(() => {
validateForm().then(() => {
if (form.value.id != null) {
updateProductsCategory(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");

@ -97,8 +97,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
@ -257,7 +257,7 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
validateForm.then(() => {
validateForm().then(() => {
if (form.value.id != null) {
updateProductsRecord(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");

@ -101,8 +101,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>

@ -127,8 +127,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>

Loading…
Cancel
Save