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
73654b78
Commit
73654b78
authored
Jul 02, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(popconfirm-button): remove button excess `title`
移除PopconfirmButton组件多余的title;修改TableAction的tooltip默认位置
parent
5fab267a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
PopConfirmButton.vue
src/components/Button/src/PopConfirmButton.vue
+1
-1
TableAction.vue
src/components/Table/src/components/TableAction.vue
+6
-8
No files found.
src/components/Button/src/PopConfirmButton.vue
View file @
73654b78
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
return
()
=>
{
return
()
=>
{
const
bindValues
=
omit
(
unref
(
getBindValues
),
'
icon
'
);
const
bindValues
=
omit
(
unref
(
getBindValues
),
'
icon
'
);
const
Button
=
h
(
BasicButton
,
bindValues
,
extendSlots
(
slots
));
const
Button
=
h
(
BasicButton
,
omit
(
bindValues
,
'
title
'
)
,
extendSlots
(
slots
));
// If it is not enabled, it is a normal button
// If it is not enabled, it is a normal button
if
(
!
props
.
enable
)
{
if
(
!
props
.
enable
)
{
...
...
src/components/Table/src/components/TableAction.vue
View file @
73654b78
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
<template
v-for=
"(action, index) in getActions"
:key=
"`$
{index}-${action.label}`">
<template
v-for=
"(action, index) in getActions"
:key=
"`$
{index}-${action.label}`">
<Tooltip
v-bind=
"getTooltip(action.tooltip)"
>
<Tooltip
v-bind=
"getTooltip(action.tooltip)"
>
<PopConfirmButton
v-bind=
"action"
>
<PopConfirmButton
v-bind=
"action"
>
<Tooltip
v-bind=
"getTooltip(action.tooltip)"
>
<Icon
:icon=
"action.icon"
class=
"mr-1"
v-if=
"action.icon"
/>
<Icon
:icon=
"action.icon"
class=
"mr-1"
v-if=
"action.icon"
/>
{{
action
.
label
}}
{{
action
.
label
}}
</Tooltip>
</PopConfirmButton>
</PopConfirmButton>
</Tooltip>
</Tooltip>
<Divider
<Divider
...
@@ -35,7 +33,7 @@
...
@@ -35,7 +33,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
computed
,
toRaw
}
from
'
vue
'
;
import
{
defineComponent
,
PropType
,
computed
,
toRaw
}
from
'
vue
'
;
import
{
MoreOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
MoreOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
Divider
,
Tooltip
}
from
'
ant-design-vue
'
;
import
{
Divider
,
Tooltip
,
TooltipProps
}
from
'
ant-design-vue
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
{
ActionItem
,
TableActionType
}
from
'
/@/components/Table
'
;
import
{
ActionItem
,
TableActionType
}
from
'
/@/components/Table
'
;
import
{
PopConfirmButton
}
from
'
/@/components/Button
'
;
import
{
PopConfirmButton
}
from
'
/@/components/Button
'
;
...
@@ -129,11 +127,11 @@
...
@@ -129,11 +127,11 @@
});
});
const
getTooltip
=
computed
(()
=>
{
const
getTooltip
=
computed
(()
=>
{
return
(
data
)
=>
{
return
(
data
:
string
|
TooltipProps
):
TooltipProps
=>
{
if
(
isString
(
data
))
{
if
(
isString
(
data
))
{
return
{
title
:
data
};
return
{
title
:
data
,
placement
:
'
bottom
'
};
}
else
{
}
else
{
return
data
;
return
Object
.
assign
({
placement
:
'
bottom
'
},
data
)
;
}
}
};
};
});
});
...
...
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