mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化移动端任务窗口布局
This commit is contained in:
parent
df02a6b50f
commit
6dc5ae1ae4
@ -56,7 +56,8 @@
|
|||||||
<!--主任务-->
|
<!--主任务-->
|
||||||
<div
|
<div
|
||||||
v-else-if="ready"
|
v-else-if="ready"
|
||||||
:class="{'task-detail':true, 'open-dialog': hasOpenDialog, 'completed': taskDetail.complete_at}"
|
class="task-detail"
|
||||||
|
:class="taskDetailClass"
|
||||||
:style="taskDetailStyle">
|
:style="taskDetailStyle">
|
||||||
<div v-show="taskDetail.id > 0" class="task-info">
|
<div v-show="taskDetail.id > 0" class="task-info">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
@ -832,6 +833,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
taskDetailClass() {
|
||||||
|
const {taskDetail, hasOpenDialog} = this;
|
||||||
|
return {
|
||||||
|
'open-dialog': hasOpenDialog,
|
||||||
|
'completed': taskDetail.complete_at
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
taskDetailStyle() {
|
taskDetailStyle() {
|
||||||
const {modalMode, windowHeight, hasOpenDialog} = this;
|
const {modalMode, windowHeight, hasOpenDialog} = this;
|
||||||
const height = Math.min(1100, windowHeight)
|
const height = Math.min(1100, windowHeight)
|
||||||
|
|||||||
@ -5,25 +5,13 @@
|
|||||||
:styles="styles"
|
:styles="styles"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:footer-hide="true"
|
:footer-hide="true"
|
||||||
|
:fullscreen="windowPortrait"
|
||||||
:beforeClose="onBeforeClose"
|
:beforeClose="onBeforeClose"
|
||||||
class-name="task-modal">
|
class-name="common-task-modal">
|
||||||
<TaskDetail ref="taskDetail" :task-id="taskId" :open-task="taskData" modalMode/>
|
<TaskDetail ref="taskDetail" :task-id="taskId" :open-task="taskData" modalMode/>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
body {
|
|
||||||
.ivu-modal-wrap {
|
|
||||||
&.task-modal {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.ivu-modal-close {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters, mapState} from "vuex";
|
import {mapGetters, mapState} from "vuex";
|
||||||
import TaskDetail from "./TaskDetail";
|
import TaskDetail from "./TaskDetail";
|
||||||
|
|||||||
@ -1,3 +1,55 @@
|
|||||||
|
.common-task-modal {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.ivu-modal {
|
||||||
|
.ivu-modal-content {
|
||||||
|
.ivu-modal-close {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ivu-modal-fullscreen {
|
||||||
|
.ivu-modal-content {
|
||||||
|
margin-top: calc(var(--status-bar-height) + 46px);
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-top-left-radius: 18px !important;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.ivu-modal-body {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.task-detail {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 20px 0 15px;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
|
.task-info {
|
||||||
|
.head {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-top: 14px;
|
||||||
|
padding-right: 4px;
|
||||||
|
height: 58px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-dialog {
|
||||||
|
padding-bottom: calc(var(--navigation-bar-height) + 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.task-detail {
|
.task-detail {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -594,7 +646,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
margin-left: 5px;
|
margin: 0 5px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user