This commit is contained in:
2024-09-24 17:04:44 +08:00
parent 6cd84e0021
commit 30528311c1
77 changed files with 2251 additions and 1361 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),