From 86c859886052c5d9f1c2fe5653f0b52b54f0faab Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 14 Jul 2020 14:40:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BE=A7=E6=BB=91=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9B=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= =?UTF-8?q?=EF=BC=9Aaccount=E4=BE=A7=E6=BB=91=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/stylus/main.scss | 177 ++---------------- .../components/common/rightBox/accountBox.vue | 164 ++++++++++++++++ .../src/components/page/config/account.vue | 177 +++--------------- 3 files changed, 201 insertions(+), 317 deletions(-) create mode 100644 nezha-fronted/src/components/common/rightBox/accountBox.vue diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 3cd35d9a8..3cfd95de8 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -858,175 +858,26 @@ li{ transform-origin: right; } } -@keyframes unfold-200 { - 0%{ - visibility: hidden; - opacity: 0; - max-height: 0; - } - 25%{ - opacity: 0; - max-height: 50px; - } - 50%{ - opacity: 0; - max-height: 100px; - } - 75%{ - opacity: 0.4; - max-height: 150px; - } - 100% { - visibility: visible; - opacity: 1; - max-height: 200px; - } -} -@keyframes fold-200 { - 0% { - opacity: 1; - max-height: 200px; - visibility: visible; - } - 25%{ - - opacity: 0.4; - max-height: 150px; - } - 50%{ - opacity: 0; - max-height: 100px; - } - 75%{ - opacity: 0; - max-height: 50px; - } - 100% { - visibility: hidden; - opacity: 0; - max-height: 0; - } -} -@keyframes unfold-500 { - 0%{ - visibility: hidden; - opacity: 0; - max-height: 0; - } - 25%{ - opacity: 0; - max-height: 100px; - } - 50%{ - opacity: 0; - max-height: 200px; - } - 66%{ - opacity: 0.2; - max-height: 300px; - } - 83%{ - opacity: 0.5; - max-height: 400px; - } - 100% { - visibility: visible; - opacity: 1; - max-height: 500px; - } -} -@keyframes unfold-600 { - 0%{ - visibility: hidden; - opacity: 0; - max-height: 0; - } - 25%{ - opacity: 0; - max-height: 120px; - } - 50%{ - opacity: 0; - max-height: 240px; - } - 66%{ - opacity: 0.2; - max-height: 360px; - } - 83%{ - opacity: 0.5; - max-height: 480px; - } - 100% { - visibility: visible; - opacity: 1; - max-height: 600px; - } -} -@keyframes fold-500 { - 0% { - opacity: 1; - max-height: 500px; - visibility: visible; - } - 16% { - opacity: 0.5; - max-height: 400px; - } - 33%{ - opacity: 0.2; - max-height: 300px; - } - 50%{ - opacity: 0; - max-height: 200px; - } - 75%{ - opacity: 0; - max-height: 100px; - } - 100% { - visibility: hidden; - opacity: 0; - max-height: 0; - } -} -@keyframes fold-600 { - 0% { - opacity: 1; - max-height: 600px; - visibility: visible; - } - 16% { - opacity: 0.5; - max-height: 480px; - } - 33%{ - opacity: 0.2; - max-height: 360px; - } - 50%{ - opacity: 0; - max-height: 240px; - } - 75%{ - opacity: 0; - max-height: 120px; - } - 100% { - visibility: hidden; - opacity: 0; - max-height: 0; - } -} -.right-box-enter-active{ +/*.right-box-enter-active{ transition: transform 0.4s; } .right-box-leave-active { transition: transform 0.4s; } -.right-box-enter,.right-box-leave-to { +.right-box-enter, .right-box-leave-to { transform: translateX(100%); +}*/ +.right-box-enter-active, .right-box-leave-active { + transform: scaleX(1); + opacity: 1; + transition: transform .5s + cubic-bezier(.23, 1, .32, 1), opacity .5s + cubic-bezier(.23, 1, .32, 1); + transform-origin: right center; +} +.right-box-enter, .right-box-leave-active { + opacity: 0; + transform: scaleX(0); } .right-box-580-enter-active{ transition: transform 0.4s; diff --git a/nezha-fronted/src/components/common/rightBox/accountBox.vue b/nezha-fronted/src/components/common/rightBox/accountBox.vue new file mode 100644 index 000000000..10790c6c1 --- /dev/null +++ b/nezha-fronted/src/components/common/rightBox/accountBox.vue @@ -0,0 +1,164 @@ + + + + + + + {{$t('overall.delete')}} + + + + + + {{editUser.userId ? ($t("config.account.editAccount") + " ID:" + editUser.userId) : $t("config.account.createAccount")}} + + + + + + + + + + + + + + + + + + + + + + + + {{editUser.createTime}} + + + + + + + + {{$t('overall.cancel')}} + + + {{$t('overall.save')}} + + + + + diff --git a/nezha-fronted/src/components/page/config/account.vue b/nezha-fronted/src/components/page/config/account.vue index 6ad9bc71a..6ac2858ad 100644 --- a/nezha-fronted/src/components/page/config/account.vue +++ b/nezha-fronted/src/components/page/config/account.vue @@ -118,71 +118,7 @@ - - - - - - {{$t('overall.delete')}} - - - - {{$t('overall.edit')}} - - - - - - {{rightBox.title}} - - - - - - - - - {{user.username}} - - - - - - - - - {{user.email}} - - - - - - - - {{user.createTime}} - - - - - - - - {{$t('overall.cancel')}} - - - {{$t('overall.save')}} - - - +