Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9bd5a190
authored
Apr 12, 2025
by
Netfan
Committed by
GitHub
Apr 12, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: alert action button focus, fixed #5921 (#5922)
* 修复Alert组件的按钮焦点切换问题
1 parent
86da3ced
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
packages/@core/ui-kit/popup-ui/src/alert/alert.vue
playground/src/views/examples/modal/index.vue
packages/@core/ui-kit/popup-ui/src/alert/alert.vue
View file @
9bd5a19
...
@@ -138,7 +138,7 @@ async function handleOpenChange(val: boolean) {
...
@@ -138,7 +138,7 @@ async function handleOpenChange(val: boolean) {
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<component
:is=
"getIconRender"
class=
"mr-2"
/>
<component
:is=
"getIconRender"
class=
"mr-2"
/>
<span
class=
"flex-auto"
>
{{
$t
(
title
)
}}
</span>
<span
class=
"flex-auto"
>
{{
$t
(
title
)
}}
</span>
<AlertDialogCancel
v-if=
"showCancel"
>
<AlertDialogCancel
v-if=
"showCancel"
as-child
>
<VbenButton
<VbenButton
variant=
"ghost"
variant=
"ghost"
size=
"icon"
size=
"icon"
...
@@ -158,16 +158,17 @@ async function handleOpenChange(val: boolean) {
...
@@ -158,16 +158,17 @@ async function handleOpenChange(val: boolean) {
<VbenLoading
v-if=
"loading && contentMasking"
:spinning=
"loading"
/>
<VbenLoading
v-if=
"loading && contentMasking"
:spinning=
"loading"
/>
</AlertDialogDescription>
</AlertDialogDescription>
<div
class=
"flex justify-end gap-x-2"
:class=
"`justify-$
{buttonAlign}`">
<div
class=
"flex justify-end gap-x-2"
:class=
"`justify-$
{buttonAlign}`">
<AlertDialogCancel
v-if=
"showCancel"
:disabled=
"loading"
>
<AlertDialogCancel
v-if=
"showCancel"
as-child
>
<component
<component
:is=
"components.DefaultButton || VbenButton"
:is=
"components.DefaultButton || VbenButton"
:disabled=
"loading"
variant=
"ghost"
variant=
"ghost"
@
click=
"handleCancel"
@
click=
"handleCancel"
>
>
{{
cancelText
||
$t
(
'cancel'
)
}}
{{
cancelText
||
$t
(
'cancel'
)
}}
</component>
</component>
</AlertDialogCancel>
</AlertDialogCancel>
<AlertDialogAction>
<AlertDialogAction
as-child
>
<component
<component
:is=
"components.PrimaryButton || VbenButton"
:is=
"components.PrimaryButton || VbenButton"
:loading=
"loading"
:loading=
"loading"
...
...
playground/src/views/examples/modal/index.vue
View file @
9bd5a19
...
@@ -261,6 +261,9 @@ async function openPrompt() {
...
@@ -261,6 +261,9 @@ async function openPrompt() {
</
template
>
</
template
>
</Card>
</Card>
<Card
class=
"w-[300px]"
title=
"轻量提示弹窗"
>
<Card
class=
"w-[300px]"
title=
"轻量提示弹窗"
>
<
template
#
extra
>
<DocButton
path=
"/components/common-ui/vben-alert"
/>
</
template
>
<p>
通过快捷方法创建动态提示弹窗,适合一些轻量的提示和确认、输入等
</p>
<p>
通过快捷方法创建动态提示弹窗,适合一些轻量的提示和确认、输入等
</p>
<
template
#
actions
>
<
template
#
actions
>
<Button
type=
"primary"
@
click=
"openAlert"
>
Alert
</Button>
<Button
type=
"primary"
@
click=
"openAlert"
>
Alert
</Button>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment