Skip to content

Commit 4dd454c

Browse files
author
Tenny
committed
Merge branch 'dev' of git@github.com:DvShu/neatui-vue.git into dev
2 parents cc9e431 + 421aaac commit 4dd454c

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

.github/workflows/release-please.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
id: is-published
4848
# these if statements ensure that a publication only occurs when
4949
# a new release is created:
50-
if: ${{ steps.release.outputs.release_created }}
5150
run: |
52-
echo "is_published"
51+
echo "is_published: ${{ steps.release.outputs.releases_created }}"
52+
echo "prs_created: ${{ steps.release.outputs.prs_created }}"
5353
5454
- name: Output Release Created
5555
id: output-release-created

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.10.1](https://github.com/DvShu/neatui-vue/compare/v0.10.0...v0.10.1) (2024-07-05)
4+
5+
6+
### Bug Fixes
7+
8+
* **Form:** 修复表单提交 ([9baa6df](https://github.com/DvShu/neatui-vue/commit/9baa6dfa7b61d113e6e408287c70b95337cda390))
9+
* **Loading:** 增加结束检测避免因错误而无法触发transitionEnd事件 ([9da2d06](https://github.com/DvShu/neatui-vue/commit/9da2d069489391ff1c7772aca42769e363a8846d))
10+
311
## [0.10.0](https://github.com/DvShu/neatui-vue/compare/v0.9.3...v0.10.0) (2024-07-05)
412

513

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@asteres/neatui-vue",
33
"description": "基于 Vue3 的 UI 组件库",
4-
"version": "0.10.0",
4+
"version": "0.10.1",
55
"type": "module",
66
"scripts": {
77
"g:c": "node scripts/index.js template",

src/directives/loading.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,25 @@ function removeLoading(
9393
arg?: string,
9494
) {
9595
const selectorPrefix = modifiers.fullscreen ? '#' : '.';
96-
const $mask = elem(`${selectorPrefix}nt-loading-mask`, el)[0];
96+
let $mask = elem(`${selectorPrefix}nt-loading-mask`, el)[0];
9797
if ($mask) {
98+
function transitionEnd() {
99+
el.classList.remove(
100+
'nt-loading',
101+
'nt-loading-lock',
102+
'nt-loading-fullscreen',
103+
'nt-loading-bar--finish',
104+
'nt-loading-bar--start',
105+
);
106+
if ($mask != null) {
107+
el.removeChild($mask);
108+
$mask = undefined as any;
109+
}
110+
}
98111
$mask.addEventListener(
99112
'transitionend',
100113
() => {
101-
el.classList.remove(
102-
'nt-loading',
103-
'nt-loading-lock',
104-
'nt-loading-fullscreen',
105-
'nt-loading-bar--finish',
106-
'nt-loading-bar--start',
107-
);
108-
el.removeChild($mask);
114+
transitionEnd();
109115
},
110116
{ once: true },
111117
);
@@ -114,6 +120,10 @@ function removeLoading(
114120
} else {
115121
$mask.style.opacity = '0';
116122
}
123+
// 检测避免因为错误导致无法移除
124+
setTimeout(() => {
125+
transitionEnd();
126+
}, 350);
117127
}
118128
}
119129

0 commit comments

Comments
 (0)