Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
cd8e0a12
Commit
cd8e0a12
authored
Jul 15, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 证书上传按钮优化
parent
b864abfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
20 deletions
+98
-20
portal-manager-ui/admin/src/components/licenseHint/LicenseHint.vue
...nager-ui/admin/src/components/licenseHint/LicenseHint.vue
+29
-20
portal-manager-ui/admin/src/components/licenseHint/Loading.vue
...l-manager-ui/admin/src/components/licenseHint/Loading.vue
+69
-0
No files found.
portal-manager-ui/admin/src/components/licenseHint/LicenseHint.vue
View file @
cd8e0a12
...
...
@@ -21,17 +21,16 @@
<p
class=
"message"
>
{{
licenseInfo
.
msg
}}
</p>
<div
class=
"actions"
>
<a-button
class=
"read"
:loading=
"loading"
@
click=
"handleUpload"
>
点击上传新证书
</a-button>
<a-button
class=
"mark-as-read"
:disabled=
"isDisabled"
@
click=
"handleClose"
>
<div
class=
"read"
@
click=
"handleUpload"
>
<div
class=
"loading-btn"
v-if=
"loading"
>
<span>
上传中
</span><Loading></Loading>
</div>
<span
v-else
>
点击上传新证书
</span>
</div>
<div
class=
"mark-as-read"
:disabled=
"isDisabled"
@
click=
"handleClose"
>
关闭弹窗
<span
v-if=
"time"
>
(
{{
time
}}
)
</span>
</
a-button
>
</
div
>
</div>
</div>
</div>
...
...
@@ -40,11 +39,15 @@
<
script
>
import
{
uploadCipher
,
checkCipher
}
from
"
@/api/user
"
;
import
{
mapMutations
,
mapState
}
from
"
vuex
"
;
import
Loading
from
"
./Loading.vue
"
;
export
default
{
components
:
{
Loading
,
},
data
()
{
return
{
accept
:
"
application/x-zip-compressed
"
,
loading
:
fals
e
,
loading
:
tru
e
,
timer
:
null
,
isDisabled
:
true
,
time
:
0
,
...
...
@@ -71,10 +74,11 @@ export default {
},
1000
);
},
handleClose
()
{
//
if (this.isDisabled) return;
if
(
this
.
isDisabled
)
return
;
this
.
show
=
false
;
},
async
handleUpload
()
{
if
(
this
.
loading
)
return
;
let
file
=
await
this
.
getFile
();
if
(
!
file
)
return
;
this
.
loading
=
true
;
...
...
@@ -198,12 +202,13 @@ export default {
.read {
width: 100%;
height: 44px;
//
display: flex;
//
align-items: center;
//
justify-content: center;
//
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
}
...
...
@@ -211,7 +216,11 @@ export default {
background-color: #0857e8;
color: rgba(255, 255, 255, 1);
}
.loading-btn {
display: flex;
justify-content: center;
gap: 10px;
}
.mark-as-read {
margin-top: 8px;
background-color: rgba(249, 250, 251, 1);
...
...
@@ -222,8 +231,8 @@ export default {
.mark-as-read:hover {
background-color: rgb(230, 231, 233);
}
//
.mark-as-read[disabled] {
//
cursor: not-allowed;
//
}
.mark-as-read[disabled] {
cursor: not-allowed;
}
}
</
style
>
portal-manager-ui/admin/src/components/licenseHint/Loading.vue
0 → 100644
View file @
cd8e0a12
<
template
>
<div
class=
"loader"
>
<div
class=
"dot dot-1"
></div>
<div
class=
"dot dot-2"
></div>
<div
class=
"dot dot-3"
></div>
<!--
<div
class=
"dot dot-4"
></div>
<div
class=
"dot dot-5"
></div>
-->
</div>
</
template
>
<
script
>
export
default
{};
</
script
>
<
style
lang=
"less"
scoped
>
.loader {
display: flex;
justify-content: center;
align-items: center;
gap: 5px;
}
.dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #fff;
-webkit-animation: dot-pulse2 1.5s ease-in-out infinite;
animation: dot-pulse2 1.5s ease-in-out infinite;
}
.dot-1 {
animation-delay: 0s;
}
.dot-2 {
animation-delay: 0.3s;
}
.dot-3 {
animation-delay: 0.6s;
}
// .dot-4 {
// animation-delay: 0.9s;
// }
// .dot-5 {
// animation-delay: 1.2s;
// }
@keyframes dot-pulse2 {
0% {
transform: scale(0.5);
opacity: 0.5;
}
50% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.5);
opacity: 0.5;
}
}
</
style
>
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