add page count
This commit is contained in:
parent
7b125d0216
commit
eb1b0c9b16
@ -203,7 +203,7 @@ const _sfc_main = defineComponent({
|
|||||||
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
|
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
|
||||||
}, toDisplayString(unref(t)("page.confirm")), 9, _hoisted_10)
|
}, toDisplayString(unref(t)("page.confirm")), 9, _hoisted_10)
|
||||||
])) : createCommentVNode("", true),
|
])) : createCommentVNode("", true),
|
||||||
props.count ? (openBlock(), createElementBlock("span", _hoisted_11, "\u5171" + toDisplayString(props.count) + "\u6761", 1)) : createCommentVNode("", true)
|
__props.count ? (openBlock(), createElementBlock("span", _hoisted_11, "\u5171" + toDisplayString(__props.count) + "\u6761", 1)) : createCommentVNode("", true)
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -551,7 +551,8 @@ const _sfc_main$1 = defineComponent({
|
|||||||
pages: null,
|
pages: null,
|
||||||
total: null,
|
total: null,
|
||||||
limit: null,
|
limit: null,
|
||||||
theme: null
|
theme: null,
|
||||||
|
count: null
|
||||||
},
|
},
|
||||||
emits: ["update:current", "update:limit", "change"],
|
emits: ["update:current", "update:limit", "change"],
|
||||||
setup(__props, { emit }) {
|
setup(__props, { emit }) {
|
||||||
@ -586,6 +587,7 @@ const _sfc_main$1 = defineComponent({
|
|||||||
limits: __props.limits,
|
limits: __props.limits,
|
||||||
theme: __props.theme,
|
theme: __props.theme,
|
||||||
pages: __props.pages,
|
pages: __props.pages,
|
||||||
|
count: __props.count,
|
||||||
modelValue: unref(current),
|
modelValue: unref(current),
|
||||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(current) ? current.value = $event : null),
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(current) ? current.value = $event : null),
|
||||||
limit: unref(limit),
|
limit: unref(limit),
|
||||||
@ -599,7 +601,7 @@ const _sfc_main$1 = defineComponent({
|
|||||||
createVNode(unref(_sfc_main$2E), { type: "layui-icon-right" })
|
createVNode(unref(_sfc_main$2E), { type: "layui-icon-right" })
|
||||||
]),
|
]),
|
||||||
_: 1
|
_: 1
|
||||||
}, 8, ["total", "show-page", "show-skip", "show-limit", "show-count", "show-refresh", "limits", "theme", "pages", "modelValue", "limit"]);
|
}, 8, ["total", "show-page", "show-skip", "show-limit", "show-count", "show-refresh", "limits", "theme", "pages", "count", "modelValue", "limit"]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1387,12 +1389,13 @@ const _sfc_main = defineComponent({
|
|||||||
showRefresh: __props.page.showRefresh,
|
showRefresh: __props.page.showRefresh,
|
||||||
showLimit: __props.page.showLimit,
|
showLimit: __props.page.showLimit,
|
||||||
showCount: __props.page.showCount,
|
showCount: __props.page.showCount,
|
||||||
|
count: __props.page.count,
|
||||||
current: __props.page.current,
|
current: __props.page.current,
|
||||||
"onUpdate:current": _cache[7] || (_cache[7] = ($event) => __props.page.current = $event),
|
"onUpdate:current": _cache[7] || (_cache[7] = ($event) => __props.page.current = $event),
|
||||||
limit: __props.page.limit,
|
limit: __props.page.limit,
|
||||||
"onUpdate:limit": _cache[8] || (_cache[8] = ($event) => __props.page.limit = $event),
|
"onUpdate:limit": _cache[8] || (_cache[8] = ($event) => __props.page.limit = $event),
|
||||||
onChange: change
|
onChange: change
|
||||||
}, null, 8, ["total", "pages", "theme", "limits", "showSkip", "show-page", "showRefresh", "showLimit", "showCount", "current", "limit"])
|
}, null, 8, ["total", "pages", "theme", "limits", "showSkip", "show-page", "showRefresh", "showLimit", "showCount", "count", "current", "limit"])
|
||||||
])) : createCommentVNode("", true)
|
])) : createCommentVNode("", true)
|
||||||
], 2)
|
], 2)
|
||||||
], 512);
|
], 512);
|
||||||
|
11
lib/index.js
11
lib/index.js
@ -18791,7 +18791,7 @@ const _sfc_main$F = defineComponent({
|
|||||||
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
|
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
|
||||||
}, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$7)
|
}, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$7)
|
||||||
])) : createCommentVNode("", true),
|
])) : createCommentVNode("", true),
|
||||||
props.count ? (openBlock(), createElementBlock("span", _hoisted_11$7, "\u5171" + toDisplayString$1(props.count) + "\u6761", 1)) : createCommentVNode("", true)
|
__props.count ? (openBlock(), createElementBlock("span", _hoisted_11$7, "\u5171" + toDisplayString$1(__props.count) + "\u6761", 1)) : createCommentVNode("", true)
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -18812,7 +18812,8 @@ const _sfc_main$E = defineComponent({
|
|||||||
pages: null,
|
pages: null,
|
||||||
total: null,
|
total: null,
|
||||||
limit: null,
|
limit: null,
|
||||||
theme: null
|
theme: null,
|
||||||
|
count: null
|
||||||
},
|
},
|
||||||
emits: ["update:current", "update:limit", "change"],
|
emits: ["update:current", "update:limit", "change"],
|
||||||
setup(__props, { emit }) {
|
setup(__props, { emit }) {
|
||||||
@ -18847,6 +18848,7 @@ const _sfc_main$E = defineComponent({
|
|||||||
limits: __props.limits,
|
limits: __props.limits,
|
||||||
theme: __props.theme,
|
theme: __props.theme,
|
||||||
pages: __props.pages,
|
pages: __props.pages,
|
||||||
|
count: __props.count,
|
||||||
modelValue: unref(current),
|
modelValue: unref(current),
|
||||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(current) ? current.value = $event : null),
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(current) ? current.value = $event : null),
|
||||||
limit: unref(limit),
|
limit: unref(limit),
|
||||||
@ -18860,7 +18862,7 @@ const _sfc_main$E = defineComponent({
|
|||||||
createVNode(unref(_sfc_main$2E), { type: "layui-icon-right" })
|
createVNode(unref(_sfc_main$2E), { type: "layui-icon-right" })
|
||||||
]),
|
]),
|
||||||
_: 1
|
_: 1
|
||||||
}, 8, ["total", "show-page", "show-skip", "show-limit", "show-count", "show-refresh", "limits", "theme", "pages", "modelValue", "limit"]);
|
}, 8, ["total", "show-page", "show-skip", "show-limit", "show-count", "show-refresh", "limits", "theme", "pages", "count", "modelValue", "limit"]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -19648,12 +19650,13 @@ const _sfc_main$D = defineComponent({
|
|||||||
showRefresh: __props.page.showRefresh,
|
showRefresh: __props.page.showRefresh,
|
||||||
showLimit: __props.page.showLimit,
|
showLimit: __props.page.showLimit,
|
||||||
showCount: __props.page.showCount,
|
showCount: __props.page.showCount,
|
||||||
|
count: __props.page.count,
|
||||||
current: __props.page.current,
|
current: __props.page.current,
|
||||||
"onUpdate:current": _cache[7] || (_cache[7] = ($event) => __props.page.current = $event),
|
"onUpdate:current": _cache[7] || (_cache[7] = ($event) => __props.page.current = $event),
|
||||||
limit: __props.page.limit,
|
limit: __props.page.limit,
|
||||||
"onUpdate:limit": _cache[8] || (_cache[8] = ($event) => __props.page.limit = $event),
|
"onUpdate:limit": _cache[8] || (_cache[8] = ($event) => __props.page.limit = $event),
|
||||||
onChange: change3
|
onChange: change3
|
||||||
}, null, 8, ["total", "pages", "theme", "limits", "showSkip", "show-page", "showRefresh", "showLimit", "showCount", "current", "limit"])
|
}, null, 8, ["total", "pages", "theme", "limits", "showSkip", "show-page", "showRefresh", "showLimit", "showCount", "count", "current", "limit"])
|
||||||
])) : createCommentVNode("", true)
|
])) : createCommentVNode("", true)
|
||||||
], 2)
|
], 2)
|
||||||
], 512);
|
], 512);
|
||||||
|
@ -224,6 +224,6 @@ watch(
|
|||||||
{{ t("page.confirm") }}
|
{{ t("page.confirm") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="props.count">共{{props.count}}条</span>
|
<span v-if="count">共{{count}}条</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -21,6 +21,7 @@ export interface TablePageProps {
|
|||||||
total: number;
|
total: number;
|
||||||
limit: number;
|
limit: number;
|
||||||
theme?: string;
|
theme?: string;
|
||||||
|
count?:number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<TablePageProps>(), {
|
const props = withDefaults(defineProps<TablePageProps>(), {
|
||||||
@ -65,6 +66,7 @@ const change = (pageData: any) => {
|
|||||||
:limits="limits"
|
:limits="limits"
|
||||||
:theme="theme"
|
:theme="theme"
|
||||||
:pages="pages"
|
:pages="pages"
|
||||||
|
:count="count"
|
||||||
v-model="current"
|
v-model="current"
|
||||||
v-model:limit="limit"
|
v-model:limit="limit"
|
||||||
@change="change"
|
@change="change"
|
||||||
|
@ -910,6 +910,7 @@ onBeforeUnmount(() => {
|
|||||||
:showRefresh="page.showRefresh"
|
:showRefresh="page.showRefresh"
|
||||||
:showLimit="page.showLimit"
|
:showLimit="page.showLimit"
|
||||||
:showCount="page.showCount"
|
:showCount="page.showCount"
|
||||||
|
:count="page.count"
|
||||||
v-model:current="page.current"
|
v-model:current="page.current"
|
||||||
v-model:limit="page.limit"
|
v-model:limit="page.limit"
|
||||||
@change="change"
|
@change="change"
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user