适配 手机/平板端

This commit is contained in:
kuaifan 2021-09-21 16:47:21 +08:00
parent 9aa0a5bb79
commit 450cc19477
12 changed files with 80 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.3.26",
"version": "0.3.27",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",

32
public/css/app.css vendored
View File

@ -5314,8 +5314,9 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
@media (max-width: 768px) {
.page-dashboard .dashboard-wrapper {
display: block;
max-width: 86%;
max-height: 96%;
max-height: 86%;
}
.page-dashboard .dashboard-wrapper .dashboard-block {
display: block;
@ -5328,6 +5329,14 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
.page-dashboard .dashboard-wrapper .dashboard-title {
margin-top: 36px;
}
.page-dashboard .dashboard-wrapper .dashboard-list {
padding-bottom: 22px;
}
.page-dashboard .dashboard-wrapper .dashboard-list > li .item-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.page-dashboard .download-app {
display: none;
}
@ -7580,6 +7589,7 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
align-items: flex-end;
padding: 0 28px;
margin-bottom: 20px;
position: relative;
}
.dialog-wrapper .dialog-footer .dialog-newmsg {
@ -7599,7 +7609,7 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
.dialog-wrapper .dialog-footer .dialog-input {
background-color: #F4F5F7;
padding: 10px 12px;
padding: 10px 52px 10px 12px;
border-radius: 10px;
}
@ -7613,6 +7623,18 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
box-shadow: none;
}
.dialog-wrapper .dialog-footer .dialog-send {
position: absolute;
top: 0;
right: 28px;
bottom: 0;
font-size: 18px;
width: 46px;
display: flex;
align-items: center;
justify-content: center;
}
.dialog-wrapper .dialog-footer .chat-upload {
display: none;
width: 0;
@ -7713,6 +7735,9 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
padding: 0 20px;
margin-bottom: 16px;
}
.dialog-wrapper .dialog-footer .dialog-send {
right: 20px;
}
}
.file-content {
@ -10078,6 +10103,9 @@ body .ivu-drawer-bottom .ivu-drawer-content .ivu-drawer-close .ivu-icon {
}
@media (max-width: 768px) {
.task-detail .task-info .scroller {
overflow-x: auto;
}
.task-detail .task-dialog .no-dialog .no-input {
position: relative;
padding-right: 52px;

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@
<ScrollerY
ref="scroller"
class="dialog-scroller overlay-y"
:auto-bottom="autoBottom"
:auto-bottom="autoBottom && !inputFocus"
@on-scroll="chatScroll"
static>
<div ref="manageList" class="dialog-list">
@ -71,6 +71,9 @@
@on-keydown="chatKeydown"
@on-input-paste="pasteDrag"
:placeholder="$L('输入消息...')" />
<div v-if="msgText" class="dialog-send" @click="sendMsg">
<Icon type="md-send" />
</div>
<DialogUpload
ref="chatUpload"
class="chat-upload"
@ -108,6 +111,7 @@ export default {
autoInterval: null,
dialogDrag: false,
inputFocus: false,
msgText: '',
msgNew: 0,
@ -208,6 +212,9 @@ export default {
text: this.msgText,
},
});
if (this.$store.state.windowMax768) {
this.$refs.input.blur();
}
this.autoBottom = true;
this.onActive();
//
@ -339,10 +346,12 @@ export default {
},
onEventFocus(e) {
this.inputFocus = true;
this.$emit("on-focus", e)
},
onEventblur(e) {
this.inputFocus = false;
this.$emit("on-blur", e)
},

View File

@ -510,7 +510,7 @@ export default {
return false;
}
}
return task.task_user.find(({userid}) => userid == userId);
return task.task_user && task.task_user.find(({userid}) => userid == userId);
});
return array.sort((a, b) => {
if (a.p_level != b.p_level) {

View File

@ -268,6 +268,7 @@
align-items: flex-end;
padding: 0 28px;
margin-bottom: 20px;
position: relative;
.dialog-newmsg {
display: none;
height: 30px;
@ -284,7 +285,7 @@
}
.dialog-input {
background-color: #F4F5F7;
padding: 10px 12px;
padding: 10px 52px 10px 12px;
border-radius: 10px;
.ivu-input {
border: 0;
@ -295,6 +296,17 @@
}
}
}
.dialog-send {
position: absolute;
top: 0;
right: 28px;
bottom: 0;
font-size: 18px;
width: 46px;
display: flex;
align-items: center;
justify-content: center;
}
.chat-upload {
display: none;
width: 0;
@ -384,6 +396,9 @@
.dialog-footer {
padding: 0 20px;
margin-bottom: 16px;
.dialog-send {
right: 20px;
}
}
}
}

View File

@ -586,6 +586,11 @@
@media (max-width: 768px) {
.task-detail {
.task-info {
.scroller {
overflow-x: auto;
}
}
.task-dialog {
.no-dialog {
.no-input {

View File

@ -185,8 +185,9 @@
@media (max-width: 768px) {
.page-dashboard {
.dashboard-wrapper {
display: block;
max-width: 86%;
max-height: 96%;
max-height: 86%;
.dashboard-block {
display: block;
margin-top: 10px;
@ -198,6 +199,16 @@
.dashboard-title {
margin-top: 36px;
}
.dashboard-list {
padding-bottom: 22px;
> li {
.item-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
}
}
}
.download-app {
display: none;