变更
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user