Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
60b80c96
Commit
60b80c96
authored
Jun 23, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dropdown): icon and trigger work unexpected
修复Dropdown中popconfirm的事件响应区域以及icon不正常的问题 fix: #796,#787
parent
9298b3c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Dropdown.vue
src/components/Dropdown/src/Dropdown.vue
+10
-3
No files found.
src/components/Dropdown/src/Dropdown.vue
View file @
60b80c96
...
@@ -11,9 +11,14 @@
...
@@ -11,9 +11,14 @@
@
click=
"handleClickMenu(item)"
@
click=
"handleClickMenu(item)"
:disabled=
"item.disabled"
:disabled=
"item.disabled"
>
>
<Popconfirm
v-if=
"popconfirm && item.popConfirm"
v-bind=
"item"
>
<Popconfirm
v-if=
"popconfirm && item.popConfirm"
v-bind=
"omit(item.popConfirm, 'icon')"
>
<Icon
:icon=
"item.icon"
v-if=
"item.icon"
/>
<template
#icon
v-if=
"item.popConfirm.icon"
>
<span
class=
"ml-1"
>
{{
item
.
text
}}
</span>
<Icon
:icon=
"item.popConfirm.icon"
/>
</
template
>
<div>
<Icon
:icon=
"item.icon"
v-if=
"item.icon"
/>
<span
class=
"ml-1"
>
{{ item.text }}
</span>
</div>
</Popconfirm>
</Popconfirm>
<
template
v-else
>
<
template
v-else
>
<Icon
:icon=
"item.icon"
v-if=
"item.icon"
/>
<Icon
:icon=
"item.icon"
v-if=
"item.icon"
/>
...
@@ -34,6 +39,7 @@
...
@@ -34,6 +39,7 @@
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
Dropdown
,
Menu
,
Popconfirm
}
from
'
ant-design-vue
'
;
import
{
Dropdown
,
Menu
,
Popconfirm
}
from
'
ant-design-vue
'
;
import
{
Icon
}
from
'
/@/components/Icon
'
;
import
{
Icon
}
from
'
/@/components/Icon
'
;
import
{
omit
}
from
'
lodash-es
'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'
BasicDropdown
'
,
name
:
'
BasicDropdown
'
,
...
@@ -78,6 +84,7 @@
...
@@ -78,6 +84,7 @@
return
{
return
{
handleClickMenu
,
handleClickMenu
,
omit
,
getAttr
:
(
key
:
string
|
number
)
=>
({
key
}),
getAttr
:
(
key
:
string
|
number
)
=>
({
key
}),
};
};
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment