feat 完善注释
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* 项目中心分页器(按设计稿:小方块、当前页为**蓝色描边**而非填充)。
|
||||
*
|
||||
* <p>为什么不复用公共 `PaginationBar`:那个是 32px 实心选中态、服务多个页面,
|
||||
* 与项目中心设计稿的 20px 描边样式不同,改它会波及其它页面。</p>
|
||||
*/
|
||||
|
||||
interface Props {
|
||||
page: number
|
||||
pageSize: number
|
||||
@@ -20,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
|
||||
@@ -96,7 +88,6 @@ function go(page: number): void {
|
||||
color: @primary-color;
|
||||
}
|
||||
|
||||
// 设计稿:当前页是描边态(蓝框 + 蓝字),不是实心
|
||||
&.is-active {
|
||||
border-color: @primary-color;
|
||||
color: @primary-color;
|
||||
|
||||
Reference in New Issue
Block a user