diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue
index 2ebadd575..a6f4e5d64 100755
--- a/resources/assets/js/App.vue
+++ b/resources/assets/js/App.vue
@@ -62,7 +62,7 @@ export default {
},
computed: {
- ...mapState(['userId', 'userToken', 'cacheDrawerOverlay']),
+ ...mapState(['userId', 'userToken']),
},
watch: {
@@ -221,10 +221,6 @@ export default {
if (this.$Modal.removeLast()) {
return true;
}
- if (this.cacheDrawerOverlay.length > 0) {
- this.cacheDrawerOverlay[this.cacheDrawerOverlay.length - 1].close();
- return true;
- }
}
this.$Electron.registerMsgListener('dispatch', args => {
if (!$A.isJson(args)) {
diff --git a/resources/assets/js/components/DrawerOverlay.vue b/resources/assets/js/components/DrawerOverlay.vue
deleted file mode 100644
index 47f8a7cea..000000000
--- a/resources/assets/js/components/DrawerOverlay.vue
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
diff --git a/resources/assets/js/components/DrawerOverlay/index.vue b/resources/assets/js/components/DrawerOverlay/index.vue
new file mode 100644
index 000000000..eed138d0b
--- /dev/null
+++ b/resources/assets/js/components/DrawerOverlay/index.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
diff --git a/resources/assets/js/components/DrawerOverlay/view.vue b/resources/assets/js/components/DrawerOverlay/view.vue
new file mode 100644
index 000000000..9114e2b8c
--- /dev/null
+++ b/resources/assets/js/components/DrawerOverlay/view.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
diff --git a/resources/assets/js/components/Mobile/Back.vue b/resources/assets/js/components/Mobile/Back.vue
index 077fdf8a8..21e314b76 100644
--- a/resources/assets/js/components/Mobile/Back.vue
+++ b/resources/assets/js/components/Mobile/Back.vue
@@ -39,8 +39,6 @@ export default {
},
computed: {
- ...mapState(['cacheDrawerOverlay']),
-
style() {
return {
top: this.y + 'px',
@@ -79,20 +77,13 @@ export default {
if (!this.showTabbar) {
return true;
}
- if (this.$Modal.visibles().length > 0) {
- return true;
- }
- return this.cacheDrawerOverlay.length > 0;
+ return this.$Modal.visibles().length > 0;
},
onBack() {
if (this.$Modal.removeLast()) {
return;
}
- if (this.cacheDrawerOverlay.length > 0) {
- this.cacheDrawerOverlay[this.cacheDrawerOverlay.length - 1].close();
- return;
- }
this.goBack();
},
diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js
index 2bfe385c6..5e9f33275 100644
--- a/resources/assets/js/store/state.js
+++ b/resources/assets/js/store/state.js
@@ -12,10 +12,6 @@ const stateData = {
// 数据缓存
cacheLoading: {},
- // DrawerOverlay
- cacheDrawerIndex: 0,
- cacheDrawerOverlay: [],
-
// User
cacheUserActive: {},
cacheUserWait: [],
diff --git a/resources/assets/sass/components/drawer-overlay.scss b/resources/assets/sass/components/drawer-overlay.scss
index 9241d9c53..6e913e620 100644
--- a/resources/assets/sass/components/drawer-overlay.scss
+++ b/resources/assets/sass/components/drawer-overlay.scss
@@ -1,26 +1,23 @@
-.drawer-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 0;
- height: 0;
- z-index: 1000;
- box-sizing: border-box;
- pointer-events: none;
- background: rgba(10, 10, 10, 0.76);
- outline: none;
- opacity: 0;
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
+.common-drawer-overlay {
+ .ivu-modal {
+ margin: 0;
+ padding: 0;
- .overlay-mask {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- z-index: 1;
+ .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;
+ }
+ }
}
.overlay-body {
@@ -37,22 +34,27 @@
display: flex;
align-items: flex-end;
justify-content: flex-end;
+
> a {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
- color: #dbdbde;
+ color: #fff;
+
.icon {
width: 24px;
height: 24px
}
+
> svg {
transition: all 0.3s;
}
+
&:hover {
color: #fff;
+
> svg {
transform: rotate(-90deg);
}
@@ -72,71 +74,65 @@
position: relative;
background: #fff;
border-radius: 18px 18px 0 0;
- transform: translate(0, 15%) scale(0.98);
+ transform: translate(0, 0) scale(1);
cursor: default;
- opacity: 0;
- }
- }
-
- &.overlay-visible {
- pointer-events: auto;
- opacity: 1;
- width: 100%;
- height: 100%;
- transition: opacity 0.2s ease;
- .overlay-body {
- .overlay-content {
- opacity: 1;
- transform: translate(0, 0) scale(1);
- transition: opacity 0.2s ease, transform 0.3s ease;
- }
- }
- }
-
- &.overlay-hide {
- width: 100%;
- height: 100%;
- transition: opacity 0.2s ease;
- .overlay-body {
- .overlay-content {
- transform: translate(0, 15%) scale(0.98);
- transition: opacity 0.2s ease, transform 0.2s ease
- }
}
}
&.right {
- flex-direction: row;
- justify-content: flex-end;
+ .ivu-modal {
+ .ivu-modal-content {
+ .ivu-modal-body {
+ flex-direction: row;
+ }
+ }
+ }
+
.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 {
- transform: translate(15%, 0) scale(0.98);
border-radius: 18px 0 0 18px;
}
}
- &.overlay-visible {
- .overlay-body {
- .overlay-content {
- transform: translate(0, 0) scale(1);
- }
- }
- }
- &.overlay-hide {
- .overlay-body {
- .overlay-content {
- transform: translate(15%, 0) scale(0.98);
- }
- }
- }
}
}
+
+.drawer-fade-bottom-enter-active {
+ transition: all .2s ease;
+}
+
+.drawer-fade-bottom-leave-active {
+ transition: all .2s ease;
+}
+
+.drawer-fade-bottom-enter,
+.drawer-fade-bottom-leave-to {
+ transform: translate(0, 15%) scale(0.98);
+ opacity: 0;
+}
+
+.drawer-fade-right-enter-active {
+ transition: all .2s ease;
+}
+
+.drawer-fade-right-leave-active {
+ transition: all .2s ease;
+}
+
+.drawer-fade-right-enter,
+.drawer-fade-right-leave-to {
+ transform: translate(15%, 0) scale(0.98);
+ opacity: 0;
+}