feat 完善注释
This commit is contained in:
@@ -13,7 +13,6 @@ const emit = defineEmits<{ pageChange: [page: number] }>()
|
||||
|
||||
const pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.pageSize)))
|
||||
|
||||
/** 页码序列:≤7 全部展示,否则首尾 + 当前页窗口(… 省略) */
|
||||
const pages = computed<Array<number | '...'>>(() => {
|
||||
const n = pageCount.value
|
||||
const { page } = props
|
||||
@@ -67,19 +66,19 @@ function go(page: number): void {
|
||||
<style lang="less" scoped>
|
||||
.pagination {
|
||||
.flex(row, center);
|
||||
gap: @spacing-xs; // 盒间距 6 × 0.77 ≈ 5
|
||||
padding: 12px 0; // 网格 → 分页 36 × 0.77(叠加主栏 gap 18)
|
||||
gap: @spacing-xs;
|
||||
padding: 12px 0;
|
||||
|
||||
&__btn {
|
||||
.flex(row, center);
|
||||
min-width: 20px; // 设计15 页码盒 26 × 0.77
|
||||
height: 25px; // 设计 32 × 0.77
|
||||
min-width: 20px;
|
||||
height: 25px;
|
||||
padding: 0 3px;
|
||||
border: 1px solid @border-color;
|
||||
border-radius: @radius-sm;
|
||||
background: @white;
|
||||
color: @text-color-secondary; // 设计15 实取 rgba(107,114,128)
|
||||
font-size: 11px; // 设计 12 → 9.2,取可读下限 11
|
||||
color: @text-color-secondary;
|
||||
font-size: 11px;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover:not(:disabled):not(.is-ellipsis) {
|
||||
@@ -90,7 +89,7 @@ function go(page: number): void {
|
||||
&.is-active {
|
||||
border-color: @cases-page-active-bg;
|
||||
background: @cases-page-active-bg;
|
||||
color: @primary-strong; // 设计15 当前页文字 rgba(2,79,255)
|
||||
color: @primary-strong;
|
||||
}
|
||||
|
||||
&.is-ellipsis {
|
||||
|
||||
Reference in New Issue
Block a user