Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table组件,TableAction中使用dropDownActions下拉选项,下拉选项的popConfirm无法被禁用 #3538

Closed
dengdai11201 opened this issue Jan 11, 2024 · 5 comments

Comments

@dengdai11201
Copy link

img_v3_0270_d388bac9-d7df-40d5-93ba-15ef9bbab21g
如图所示,图中下拉按钮已置灰,但依然可以点击并弹出popConfirm框,且弹出框的cancel和ok点击后仍然可以执行相关操作

@xachary
Copy link

xachary commented Jan 11, 2024

@dengdai11201
下面测试正常

最新示例:

/comp/table/fixedColumn

测试页面:

src\views\demo\table\FixedColumn.vue

场景模拟:

             {
                label: '删除',
                icon: 'ic:outline-delete-outline',
                 // 原来的逻辑
                // onClick: handleDelete.bind(null, record),

                // 模拟的场景
                popConfirm: {
                  title: `删除?`,
                  confirm: () => handleDelete.bind(null, record),
                },
                onClick: (e) => {
                  e.stopPropagation();
                },
                disabled: true,
              },

@dengdai11201
Copy link
Author

dengdai11201 commented Jan 11, 2024

image
@xachary 我的代码现在是这样的,
onClick: (e) => {
e.stopPropagation();
},
这部分添加与否,在置灰状态下都能点击弹出popConfirm

@xachary
Copy link

xachary commented Jan 11, 2024

e.stopPropagation() 在这里只是防止点击触发 select,没什么关系。
新源码未能重现你说的问题,建议做新源码中尝试一下咯。
目测图片,没发现明显差异。
@dengdai11201

@dengdai11201
Copy link
Author

新源码中确实没有了

@anncwb
Copy link
Collaborator

anncwb commented Apr 9, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@anncwb anncwb added the Stale label Apr 9, 2024
@anncwb anncwb closed this as completed Apr 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants