Skip to content

Commit 1c3d9fa

Browse files
Merge pull request #2 from Little-LittleProgrammer/feature/utils-2.0.4
合并 feature/utils-2.0.4 到 main
2 parents e425ba1 + a70722c commit 1c3d9fa

File tree

67 files changed

+3930
-1720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3930
-1720
lines changed

.github/workflows/auto-merge.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Auto Merge PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
branches: [main]
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
enable-auto-merge:
13+
if: >-
14+
github.event.pull_request.base.ref == 'main' &&
15+
github.event.pull_request.draft == false
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Enable GitHub Auto-merge (squash)
19+
uses: peter-evans/enable-pull-request-automerge@v3
20+
with:
21+
pull-request-number: ${{ github.event.pull_request.number }}
22+
merge-method: squash
23+

.github/workflows/tag-on-merge.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Tag on Merge to main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-tag:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Derive tag name from PR if possible
19+
id: vars
20+
run: |
21+
# 通过关联 PR 获取 head 分支名
22+
PR_NUM=$(git log -1 --pretty=%B | sed -n 's/Merge pull request #\([0-9]\+\).*/\1/p' | tr -d '\n')
23+
if [ -n "$PR_NUM" ]; then
24+
echo "Detected PR: #$PR_NUM"
25+
API_URL="https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUM"
26+
HEAD_REF=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github+json" "$API_URL" | jq -r '.head.ref')
27+
TAG="$HEAD_REF"
28+
fi
29+
# 如果没有检测到 PR 或 API 失败,尝试从 merge commit message 中提取
30+
if [ -z "$TAG" ]; then
31+
MSG=$(git log -1 --pretty=%B)
32+
TAG=$(echo "$MSG" | sed -n 's/.*from [^/]*\/\(.*\)/\1/p' | tr -d '\n')
33+
fi
34+
# 兜底
35+
if [ -z "$TAG" ]; then
36+
TAG="$(date +%Y%m%d)-${GITHUB_SHA::7}"
37+
fi
38+
# 清理 tag 前缀,如 feature/
39+
TAG="${TAG#feature/}"
40+
TAG="${TAG#fix/}"
41+
TAG="${TAG#release/}"
42+
TAG="${TAG#hotfix/}"
43+
# 保底前缀
44+
if [ -z "$TAG" ]; then
45+
TAG="build-${GITHUB_SHA::7}"
46+
fi
47+
echo "tag=$TAG" >> $GITHUB_OUTPUT
48+
49+
- name: Create tag if not exists
50+
run: |
51+
TAG=${{ steps.vars.outputs.tag }}
52+
echo "Tag to create: $TAG"
53+
if git rev-parse "$TAG" >/dev/null 2>&1; then
54+
echo "Tag $TAG already exists, skipping"
55+
exit 0
56+
fi
57+
git tag "$TAG"
58+
git push origin "$TAG"
59+

apps/playground/index.html

Lines changed: 86 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,89 @@
11
<!DOCTYPE html>
22
<html lang="zh-CN" id="JsHtmlRoot">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Quantum demo</title>
7-
</head>
8-
<body>
9-
<div id="app">
10-
<style>
11-
@keyframes rotate{
12-
0%{
13-
transform: rotate(0deg);
14-
}
15-
50%{
16-
transform: rotate(180deg);
17-
}
18-
100%{
19-
transform: rotate(360deg);
20-
}
21-
}
22-
.app-loading {
23-
display: flex;
24-
width: 100%;
25-
height: 100%;
26-
justify-content: center;
27-
align-items: center;
28-
flex-direction: column;
29-
background-color: #f4f7f9;
30-
}
31-
.app-loading .app-loading-container {
32-
position: absolute;
33-
top: 50%;
34-
left: 50%;
35-
display: flex;
36-
transform: translate3d(-50%, -50%, 0);
37-
justify-content: center;
38-
align-items: center;
39-
flex-direction: column;
40-
}
41-
.app-loading .app-loading-content {
42-
border-radius: 10px;
43-
position: relative;
44-
text-align: center;
45-
height: 80px;
46-
width: 80px;
47-
z-index: 888;
48-
}
49-
.app-loading .app-loading-rotate {
50-
height: 100%;
51-
width: 100%;
52-
border-radius: 10px;
53-
font-size: 0;
54-
background-image: url('/src/assets/images/logo.png');
55-
background-size: contain;
56-
animation: rotate 1.5s infinite ;
57-
}
58-
.app-loading .app-img-container {
59-
position: absolute;
60-
bottom: 0;
61-
width: 100%;
62-
height: 100%;
63-
transform-origin: bottom;
64-
background-size: 100%;
65-
z-index: 999;
66-
background-position: bottom;
67-
}
68-
.app-loading .app-loading-title {
69-
display: flex;
70-
margin-top: 30px;
71-
font-size: 30px;
72-
color: rgb(0 0 0 / 85%);
73-
justify-content: center;
74-
align-items: center;
75-
}
76-
</style>
77-
<div class="app-loading">
78-
<div class="app-loading-container">
79-
<div class="app-loading-content">
80-
<div class="app-loading-rotate"></div>
81-
<div class="app-img-container"></div>
82-
</div>
83-
<div class="app-loading-title">Quantum 低代码平台</div>
84-
</div>
85-
</div>
86-
</div>
87-
<script type="module" src="/src/main.ts"></script>
88-
</body>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Quantum demo</title>
7+
</head>
8+
<body>
9+
<div id="app">
10+
<style>
11+
@keyframes rotate {
12+
0% {
13+
transform: rotate(0deg);
14+
}
15+
50% {
16+
transform: rotate(180deg);
17+
}
18+
100% {
19+
transform: rotate(360deg);
20+
}
21+
}
22+
.app-loading {
23+
display: flex;
24+
width: 100%;
25+
height: 100%;
26+
justify-content: center;
27+
align-items: center;
28+
flex-direction: column;
29+
background-color: #f4f7f9;
30+
}
31+
.app-loading .app-loading-container {
32+
position: absolute;
33+
top: 50%;
34+
left: 50%;
35+
display: flex;
36+
transform: translate3d(-50%, -50%, 0);
37+
justify-content: center;
38+
align-items: center;
39+
flex-direction: column;
40+
}
41+
.app-loading .app-loading-content {
42+
border-radius: 10px;
43+
position: relative;
44+
text-align: center;
45+
height: 80px;
46+
width: 80px;
47+
z-index: 888;
48+
}
49+
.app-loading .app-loading-rotate {
50+
height: 100%;
51+
width: 100%;
52+
border-radius: 10px;
53+
font-size: 0;
54+
background-image: url('/src/assets/images/logo.png');
55+
background-size: contain;
56+
animation: rotate 1.5s infinite;
57+
}
58+
.app-loading .app-img-container {
59+
position: absolute;
60+
bottom: 0;
61+
width: 100%;
62+
height: 100%;
63+
transform-origin: bottom;
64+
background-size: 100%;
65+
z-index: 999;
66+
background-position: bottom;
67+
}
68+
.app-loading .app-loading-title {
69+
display: flex;
70+
margin-top: 30px;
71+
font-size: 30px;
72+
color: rgb(0 0 0 / 85%);
73+
justify-content: center;
74+
align-items: center;
75+
}
76+
</style>
77+
<div class="app-loading">
78+
<div class="app-loading-container">
79+
<div class="app-loading-content">
80+
<div class="app-loading-rotate"></div>
81+
<div class="app-img-container"></div>
82+
</div>
83+
<div class="app-loading-title">Quantum Design</div>
84+
</div>
85+
</div>
86+
</div>
87+
<script type="module" src="/src/main.ts"></script>
88+
</body>
8989
</html>
90-

apps/playground/src/views/demo/form/UseForm.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ const schemas = computed(() =>
8181
const [registerForm, { getFieldsValue, setFieldsValue }] = useForm({
8282
schemas,
8383
layout: 'inline',
84+
// 开启自定义筛选功能
85+
enableCustomFilter: true,
86+
formId: '1234',
8487
submitFunc: async() => {
8588
console.log(getFieldsValue());
8689
}

apps/playground/src/views/demo/modal/base-demo.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ const [Modal, modalApi] = useQAntdModal({
77
draggable: true,
88
onCancel() {
99
modalApi.close();
10-
},
11-
onClosed() {
12-
message.info('onClosed:关闭动画结束');
10+
console.log('onCancel');
1311
},
1412
onConfirm() {
1513
message.info('onConfirm');
14+
console.log('onConfirm');
1615
// modalApi.close();
1716
},
18-
onOpened() {
19-
message.info('onOpened:打开动画结束');
17+
onOpenChange(isOpen: boolean) {
18+
message.info(`onOpenChange: ${isOpen}`);
19+
console.log('onOpenChange', isOpen);
2020
},
21+
onOpened() {
22+
message.info('onOpened');
23+
console.log('onOpened');
24+
}
2125
});
2226
2327
function lockModal() {

0 commit comments

Comments
 (0)