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
c3b90765
Commit
c3b90765
authored
Jul 03, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(modal): add `tooltip` for action buttons
为最大化、全屏、还原等操作按钮添加工具提示
parent
b96ea075
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
ModalClose.vue
src/components/Modal/src/components/ModalClose.vue
+14
-4
component.ts
src/locales/lang/en/component.ts
+3
-0
component.ts
src/locales/lang/zh_CN/component.ts
+3
-0
No files found.
CHANGELOG.zh_CN.md
View file @
c3b90765
...
...
@@ -12,6 +12,7 @@
-
新增
`onChange`
用于接受头像剪裁并上传成功事件
-
新增
`btnText`
、
`btnProps`
用于自定义上传按钮文案和属性
-
为剪裁
`Modal`
内的操作按钮添加工具提示
-
**Modal**
为右上角的操作按钮添加工具提示
### 🐛 Bug Fixes
...
...
src/components/Modal/src/components/ModalClose.vue
View file @
c3b90765
<
template
>
<div
:class=
"getClass"
>
<template
v-if=
"canFullscreen"
>
<FullscreenExitOutlined
role=
"full"
@
click=
"handleFullScreen"
v-if=
"fullScreen"
/>
<FullscreenOutlined
role=
"close"
@
click=
"handleFullScreen"
v-else
/>
<Tooltip
:title=
"t('component.modal.restore')"
placement=
"bottom"
v-if=
"fullScreen"
>
<FullscreenExitOutlined
role=
"full"
@
click=
"handleFullScreen"
/>
</Tooltip>
<Tooltip
:title=
"t('component.modal.maximize')"
placement=
"bottom"
v-else
>
<FullscreenOutlined
role=
"close"
@
click=
"handleFullScreen"
/>
</Tooltip>
</
template
>
<CloseOutlined
@
click=
"handleCancel"
/>
<Tooltip
:title=
"t('component.modal.close')"
placement=
"bottom"
>
<CloseOutlined
@
click=
"handleCancel"
/>
</Tooltip>
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
computed
}
from
'
vue
'
;
import
{
FullscreenExitOutlined
,
FullscreenOutlined
,
CloseOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
useDesign
}
from
'
/@/hooks/web/useDesign
'
;
import
{
Tooltip
}
from
'
ant-design-vue
'
;
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
export
default
defineComponent
({
name
:
'
ModalClose
'
,
components
:
{
FullscreenExitOutlined
,
FullscreenOutlined
,
CloseOutlined
},
components
:
{
Tooltip
,
FullscreenExitOutlined
,
FullscreenOutlined
,
CloseOutlined
},
props
:
{
canFullscreen
:
{
type
:
Boolean
,
default
:
true
},
fullScreen
:
{
type
:
Boolean
},
...
...
@@ -22,6 +30,7 @@
emits
:
[
'
cancel
'
,
'
fullscreen
'
],
setup
(
props
,
{
emit
})
{
const
{
prefixCls
}
=
useDesign
(
'
basic-modal-close
'
);
const
{
t
}
=
useI18n
();
const
getClass
=
computed
(()
=>
{
return
[
...
...
@@ -44,6 +53,7 @@
}
return
{
t
,
getClass
,
prefixCls
,
handleCancel
,
...
...
src/locales/lang/en/component.ts
View file @
c3b90765
...
...
@@ -48,6 +48,9 @@ export default {
modal
:
{
cancelText
:
'
Close
'
,
okText
:
'
Confirm
'
,
close
:
'
Close
'
,
maximize
:
'
Maximize
'
,
restore
:
'
Restore
'
,
},
table
:
{
settingDens
:
'
Density
'
,
...
...
src/locales/lang/zh_CN/component.ts
View file @
c3b90765
...
...
@@ -50,6 +50,9 @@ export default {
modal
:
{
cancelText
:
'
关闭
'
,
okText
:
'
确认
'
,
close
:
'
关闭
'
,
maximize
:
'
最大化
'
,
restore
:
'
还原
'
,
},
table
:
{
settingDens
:
'
密度
'
,
...
...
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