This commit is contained in:
2024-10-22 09:09:41 +08:00
parent ef869c5ab1
commit 3a9b2d55c6
99 changed files with 4506 additions and 3465 deletions

View File

@@ -58,9 +58,12 @@ const _sfc_main = defineComponent({
const currentPage = ref(props.modelValue);
const currentPageShow = ref(currentPage.value);
const inlimit = ref(props.limit);
watch(() => props.limit, () => {
inlimit.value = props.limit;
});
watch(
() => props.limit,
() => {
inlimit.value = props.limit;
}
);
const totalPage = computed(() => {
maxPage.value = Math.ceil(props.total / inlimit.value);
let r = [];
@@ -118,10 +121,13 @@ const _sfc_main = defineComponent({
currentPageShow.value = currentPage.value;
emit("update:modelValue", currentPage.value);
});
watch(() => props.modelValue, () => {
currentPage.value = props.modelValue;
currentPageShow.value = currentPage.value;
});
watch(
() => props.modelValue,
() => {
currentPage.value = props.modelValue;
currentPageShow.value = currentPage.value;
}
);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
__props.showCount ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(t)("page.total")) + " " + toDisplayString(__props.total) + " " + toDisplayString(unref(t)("page.item")) + " " + toDisplayString(maxPage.value) + " " + toDisplayString(unref(t)("page.page")), 1)) : createCommentVNode("", true),