Skip to content

Commit

Permalink
Merge pull request #333 from ecaps1038/monorepo-dev
Browse files Browse the repository at this point in the history
Version 0.0.12
  • Loading branch information
Rickon-DAFEI authored Mar 20, 2024
2 parents 6e332b4 + dcd884e commit 73c043c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<template>
<yk-pagination :total="50"></yk-pagination>
<yk-space dir="vertical">
<yk-pagination :total="30"></yk-pagination>
<yk-pagination :total="40"></yk-pagination>
<yk-pagination :total="50"></yk-pagination>
</yk-space>
</template>
8 changes: 8 additions & 0 deletions packages/yike-design-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# 更新日志


### [0.0.12](https://github.com/ecaps1038/yike-design-dev/compare/v0.0.11...v0.0.12) (2024-03-20)


### 🐛 Bug Fixes | Bug 修复

* **modal:** should not trigger keydown event when modelValue is false ([73af440](https://github.com/ecaps1038/yike-design-dev/commit/73af440194f37d2c143aac8c1a1cc62808d06a8a))
* **pagination:** fix lost page 2 when total page is 3 ([e32feb6](https://github.com/ecaps1038/yike-design-dev/commit/e32feb6bac447fbf0c4fee4336aece6bd972f408))

### [0.0.11](https://github.com/ecaps1038/yike-design-dev/compare/v0.0.10...v0.0.11) (2024-03-20)


Expand Down
2 changes: 1 addition & 1 deletion packages/yike-design-ui/components/modal/src/modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ onMounted(() => {
})
const escapeClose = (ev: KeyboardEvent) => {
if (ev.key === 'Escape') closeModal()
if (ev.key === 'Escape' && props.modelValue) closeModal()
}
const closeMaskToCloseModal = () => {
props.closeable && emit('update:modelValue', false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@
>
1
</span>

<span
v-if="showPrevEllispsis && !simple"
:class="[cssScope('item'), cssScope('item-ellipsis')]"
@click.prevent="() => handleEllispsisClick('prev')"
>
...
</span>

<span
v-for="pager in pagers"
:key="pager"
Expand Down Expand Up @@ -127,11 +125,13 @@ const showNextEllispsis = computed(() =>
)
const pagers = computed(() => {
if (props.totalPages == 3) {
return [2]
}
const array: number[] = []
if (props.simple || pagerSize.value < 2) {
return array
}
if (props.current <= showPrevEllispsisThreshold.value) {
for (let i = 0; i < pagerSize.value; i++) {
array.push(i + 2)
Expand All @@ -157,6 +157,7 @@ const pagers = computed(() => {
}
array.reverse()
}
return array
})
Expand Down
2 changes: 1 addition & 1 deletion packages/yike-design-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yike-design/ui",
"version": "0.0.11",
"version": "0.0.12",
"type": "module",
"description": "yike-design-ui",
"author": "ecaps1038 https://github.com/ecaps1038",
Expand Down

0 comments on commit 73c043c

Please sign in to comment.