From a74f27e56c8f8dd2f27c9c308ff7d117d43884bb Mon Sep 17 00:00:00 2001 From: chris <510148846@qq.com> Date: Thu, 12 Dec 2024 10:58:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E9=A1=B5=E7=A0=81?= =?UTF-8?q?=E5=99=A8=E5=92=8Cvue3=E7=89=88=E6=9C=AC=E4=B8=8D=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pagination/index.vue | 9 ++++++--- src/views/product/category/index.vue | 4 ++-- src/views/product/productCategory/index.vue | 6 +++--- src/views/product/productRecord/index.vue | 6 +++--- src/views/product/productType/index.vue | 4 ++-- src/views/supplier/record/index.vue | 4 ++-- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 38de953..34b5dc5 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -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) { diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue index a7311f7..8e2e057 100644 --- a/src/views/product/category/index.vue +++ b/src/views/product/category/index.vue @@ -89,8 +89,8 @@ diff --git a/src/views/product/productCategory/index.vue b/src/views/product/productCategory/index.vue index 81ca058..bae3377 100644 --- a/src/views/product/productCategory/index.vue +++ b/src/views/product/productCategory/index.vue @@ -85,8 +85,8 @@ @@ -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("修改成功"); diff --git a/src/views/product/productRecord/index.vue b/src/views/product/productRecord/index.vue index 9d61883..076252c 100644 --- a/src/views/product/productRecord/index.vue +++ b/src/views/product/productRecord/index.vue @@ -97,8 +97,8 @@ @@ -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("修改成功"); diff --git a/src/views/product/productType/index.vue b/src/views/product/productType/index.vue index 2839404..72b0cc1 100644 --- a/src/views/product/productType/index.vue +++ b/src/views/product/productType/index.vue @@ -101,8 +101,8 @@ diff --git a/src/views/supplier/record/index.vue b/src/views/supplier/record/index.vue index 1938a4a..d998302 100644 --- a/src/views/supplier/record/index.vue +++ b/src/views/supplier/record/index.vue @@ -127,8 +127,8 @@