-
-
-
-
+
diff --git a/resources/assets/sass/components/drawer-overlay.scss b/resources/assets/sass/components/drawer-overlay.scss
index d779da6a2..c5b978e46 100644
--- a/resources/assets/sass/components/drawer-overlay.scss
+++ b/resources/assets/sass/components/drawer-overlay.scss
@@ -1,36 +1,30 @@
-body {
- .ivu-modal-wrap {
- &.common-drawer-overlay {
- .ivu-modal {
- .ivu-modal-content {
- margin-top: 0;
- margin-bottom: 0;
- }
- }
- }
+.common-drawer {
+ --margin-top: 8px;
+ --margin-left: 8px;
+ --margin-right: 8px;
+ --margin-bottom: 8px;
+ --close-top: 16px;
+ --close-right: 16px;
+ --close-size: 40px;
+ --close-color: #606266;
+ --title-color: #303133;
+ --content-bg-color: #ffffff;
+ --border-radius: 16px;
+
+ &.file-drawer {
+ --margin-top: 40px;
+ --margin-left: 0px;
+ --margin-right: 0px;
+ --margin-bottom: 0px;
+ --close-top: 0px;
+ --close-right: 0px;
+ --close-color: #ffffff;
+ --border-radius: 16px 16px 0 0;
}
-}
-.common-drawer-overlay {
- .ivu-modal {
- margin: 0;
- padding: 0;
-
- .ivu-modal-content {
- background: transparent;
-
- .ivu-modal-close {
- display: none;
- }
-
- .ivu-modal-body {
- padding: 0;
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
- align-content: flex-end;
- }
- }
+ &.approve-drawer {
+ --close-top: 28px;
+ --close-right: 20px;
}
.overlay-body {
@@ -41,154 +35,204 @@ body {
max-width: 100%;
max-height: 100%;
position: relative;
- z-index: 2;
.overlay-close {
- flex-shrink: 0;
+ position: absolute;
+ z-index: 2;
+ top: var(--close-top);
+ right: var(--close-right);
+ margin-top: var(--status-bar-height);
+ width: var(--close-size);
+ height: var(--close-size);
display: flex;
- align-items: flex-end;
- justify-content: flex-end;
- padding-top: var(--status-bar-height);
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
- > a {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 40px;
- height: 40px;
- color: #fff;
-
- .icon {
- width: 24px;
- height: 24px
- }
+ > svg {
+ color: var(--close-color);
+ opacity: 0.8;
+ width: 24px;
+ height: 24px;
+ transition: all 0.3s;
+ }
+ &:hover {
> svg {
- transition: all 0.3s;
- }
-
- &:hover {
- color: #fff;
-
- > svg {
- transform: rotate(-90deg);
- }
+ opacity: 1;
+ transform: rotate(-90deg);
}
}
}
.overlay-resize {
- width: 100%;
- height: 5px;
- margin-bottom: -5px;
- z-index: 1;
+ position: absolute;
+ top: 0;
+ left: var(--margin-left);
+ right: auto;
+ bottom: 0;
+ width: 5px;
+ z-index: 2;
+
+ &.bottom {
+ left: 0;
+ right: 0;
+ top: var(--margin-top);
+ bottom: 0;
+ width: 100%;
+ height: 5px;
+ }
}
.overlay-content {
flex: 1;
+ min-height: 0;
position: relative;
- background: #fff;
- border-radius: 18px 18px 0 0;
+ z-index: 1;
+ background-color: var(--content-bg-color);
+ margin: var(--margin-top) var(--margin-right) var(--margin-bottom) var(--margin-left);
+ border-radius: var(--border-radius);
+ overflow: hidden;
cursor: default;
display: flex;
flex-direction: column;
- .overlay-content-status {
+ &-status {
flex-shrink: 0;
height: var(--status-bar-height);
}
- .overlay-content-body {
+ &-header {
+ flex-shrink: 0;
+ padding: calc(var(--close-top) - var(--margin-top)) calc(var(--close-size) + var(--close-right)) calc(var(--close-top) - var(--margin-top)) 30px;
+ box-sizing: content-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ min-height: 40px;
+ gap: 12px;
+
+ &-title {
+ flex: 1;
+ min-width: 0;
+ color: var(--title-color);
+ font-size: 20px;
+ font-weight: 500;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ &-more {
+ flex-shrink: 0;
+ }
+ }
+
+ &-body {
flex: 1;
- height: 0;
+ min-height: 0;
position: relative;
}
- .overlay-content-navigation {
+ &-navigation {
flex-shrink: 0;
height: var(--navigation-bar-height);
}
-
- .ivu-modal-wrap-apply {
- .ivu-modal-wrap-apply-title {
- border-top-left-radius: 18px;
- }
- }
}
}
+}
+
+.drawer-fullscreen {
+ --margin-top: 0px;
+ --margin-left: 0px;
+ --margin-right: 0px;
+ --margin-bottom: 0px;
+ --close-top: 8px;
+ --close-right: 8px;
+ --border-radius: 0;
+
+ &.approve-drawer {
+ --close-top: 20px;
+ --close-right: 12px;
+ }
+}
+
+body {
+ .ivu-modal-wrap {
+ &.common-drawer {
+ overflow: hidden;
+
+ .ivu-modal {
+ .ivu-modal-content {
+ margin-top: 0;
+ margin-bottom: 0;
+ background-color: transparent;
+ }
+
+ .ivu-modal-close {
+ display: none;
+ }
- &.right {
- .ivu-modal {
- .ivu-modal-content {
.ivu-modal-body {
- flex-direction: row;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ align-items: flex-end;
}
}
}
+ }
+}
- .overlay-body {
- flex-direction: row;
-
- .overlay-close {
- align-items: flex-start;
- }
-
- .overlay-resize {
- width: 5px;
- height: 100%;
- margin-right: -5px;
- z-index: 1;
- }
-
- .overlay-content {
- border-radius: 18px 0 0 18px;
- }
+body.dark-mode-reverse {
+ .common-drawer {
+ &.file-drawer {
+ --close-color: #000000;
}
}
}
+.drawer-animation {
+ &-fade {
+ &-enter-active,
+ &-leave-active {
+ transition: opacity .5s cubic-bezier(0.32, 0.72, 0, 1);
+ }
-.common-drawer-modal {
- .ivu-modal-fullscreen {
- background-color: #ffffff;
+ &-enter,
+ &-leave-to {
+ opacity: 0;
+ }
}
- .overlay-body {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100%;
- max-width: 100%;
- max-height: 100%;
- position: relative;
- z-index: 2;
+ &-right {
+ &-enter-active,
+ &-leave-active {
+ touch-action: none;
+ will-change: transform, opacity;
+ transition: transform .2s cubic-bezier(0.32, 0.72, 0, 1), opacity .2s cubic-bezier(0.32, 0.72, 0, 1);
+ }
+
+ &-enter,
+ &-leave-to {
+ transform: translate(15%, 0) scale(0.98);
+ opacity: 0;
+ }
+ }
+
+ &-bottom {
+ &-enter-active,
+ &-leave-active {
+ touch-action: none;
+ will-change: transform, opacity;
+ transition: transform .2s cubic-bezier(0.32, 0.72, 0, 1), opacity .2s cubic-bezier(0.32, 0.72, 0, 1);
+ }
+
+ &-enter,
+ &-leave-to {
+ transform: translate(0, 15%) scale(0.98);
+ opacity: 0;
+ }
}
}
-
-.drawer-slide-bottom-enter-active {
- transition: all .2s ease;
-}
-
-.drawer-slide-bottom-leave-active {
- transition: all .2s ease;
-}
-
-.drawer-slide-bottom-enter,
-.drawer-slide-bottom-leave-to {
- transform: translate(0, 15%) scale(0.98);
- opacity: 0;
-}
-
-.drawer-slide-right-enter-active {
- transition: all .2s ease;
-}
-
-.drawer-slide-right-leave-active {
- transition: all .2s ease;
-}
-
-.drawer-slide-right-enter,
-.drawer-slide-right-leave-to {
- transform: translate(15%, 0) scale(0.98);
- opacity: 0;
-}
diff --git a/resources/assets/sass/pages/common.scss b/resources/assets/sass/pages/common.scss
index 7d772ad10..83ffc7b30 100755
--- a/resources/assets/sass/pages/common.scss
+++ b/resources/assets/sass/pages/common.scss
@@ -824,31 +824,6 @@ body {
opacity: 0;
}
-/*全局 ivu-modal-wrap*/
-body {
- .ivu-modal-wrap {
- &.common-drawer-overlay {
- overflow: hidden;
- }
-
- &.common-drawer-modal {
- .ivu-modal-body {
- padding: 0 !important;
-
- .dialog-wrapper {
- &.inde-list {
- border-radius: 0
- }
- }
- }
-
- .ivu-modal-close {
- z-index: 3;
- }
- }
- }
-}
-
/*全局返回按钮*/
.common-nav-back{
cursor: pointer;