no message

This commit is contained in:
kuaifan 2021-06-25 10:48:04 +08:00
parent aba5206b5c
commit 75340ef301
4 changed files with 43 additions and 13 deletions

View File

@ -32,12 +32,14 @@ Vue.component('UserAvatar', UserAvatar);
import {
Avatar,
Tooltip,
Popover,
Dropdown,
DropdownMenu,
DropdownItem,
} from 'element-ui';
Vue.component('EAvatar', Avatar);
Vue.component('ETooltip', Tooltip);
Vue.component('EPopover', Popover);
Vue.component('EDropdown', Dropdown);
Vue.component('EDropdownMenu', DropdownMenu);
Vue.component('EDropdownItem', DropdownItem);

View File

@ -285,7 +285,16 @@
<Loading v-else class="file-load"/>
<a class="file-name" :href="file.path||'javascript:;'" target="_blank">{{file.name}}</a>
<div class="file-size">{{$A.bytesToSize(file.size)}}</div>
<i class="iconfont file-delete" @click="deleteFile(file.id)">&#xe6ea;</i>
<EPopover v-model="file._deling" class="file-delete">
<div class="task-detail-delete-file-popover">
<p>{{$L('你确定要删除这个文件吗?')}}</p>
<div class="buttons">
<Button size="small" type="text" @click="file._deling=false">取消</Button>
<Button size="small" type="primary" @click="deleteFile(file)">确定</Button>
</div>
</div>
<i slot="reference" :class="['iconfont', file._deling ? 'deling' : '']">&#xe6ea;</i>
</EPopover>
</li>
</ul>
<ul class="item-content">
@ -1093,13 +1102,14 @@ export default {
});
},
deleteFile(file_id) {
this.$store.dispatch("forgetTaskFile", file_id)
deleteFile(file) {
this.$set(file, '_deling', false);
this.$store.dispatch("forgetTaskFile", file.id)
//
this.$store.dispatch("call", {
url: 'project/task/filedelete',
data: {
file_id,
file_id: file.id,
},
}).catch(({msg}) => {
$A.modalError(msg);

View File

@ -8,6 +8,7 @@ $--dropdown-menuItem-hover-color: #606266;
@import "~element-ui/packages/theme-chalk/src/common/transition";
@import "~element-ui/packages/theme-chalk/src/avatar";
@import "~element-ui/packages/theme-chalk/src/tooltip";
@import "~element-ui/packages/theme-chalk/src/popover";
@import "~element-ui/packages/theme-chalk/src/dropdown";
@import "~element-ui/packages/theme-chalk/src/dropdown-menu";
@import "~element-ui/packages/theme-chalk/src/dropdown-item";

View File

@ -183,19 +183,26 @@
color: #bbbbbb;
}
.file-delete {
display: none;
padding-left: 12px;
font-size: 14px;
cursor: pointer;
color: #aaaaaa;
transition: color 0.3s;
&:hover {
color: #ff0000;
.iconfont {
display: none;
font-size: 14px;
color: #aaaaaa;
transition: color 0.3s;
cursor: pointer;
&:hover {
color: #ff0000;
}
&.deling {
display: inline-block;
}
}
}
&:hover {
.file-delete {
display: inline-block;
.iconfont {
display: inline-block;
}
}
}
}
@ -277,7 +284,6 @@
.subtask-avatar {
height: 26px;
line-height: 26px;
margin-top: -2px;
cursor: pointer;
}
.ivu-icon-ios-loading {
@ -540,6 +546,17 @@
}
}
.task-detail-delete-file-popover {
max-width: 200px;
.buttons {
text-align: right;
margin-top: 12px;
.ivu-btn-small {
font-size: 12px
}
}
}
.task-detail-avatar-buttons {
margin-top: 12px;
margin-bottom: 4px;