perf: 任务群聊中拖拽文件或者照片时并未有确认窗口

This commit is contained in:
kuaifan 2022-01-25 15:54:36 +08:00
parent b05db6d458
commit 7f14a82053
9 changed files with 30 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.7.10",
"version": "0.7.13",
"description": "DooTask is task management system.",
"main": "main.js",
"license": "MIT",

View File

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

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

File diff suppressed because one or more lines are too long

View File

@ -344,8 +344,21 @@ export default {
const postFiles = Array.prototype.slice.call(files);
if (postFiles.length > 0) {
e.preventDefault();
postFiles.forEach((file) => {
this.$refs.chatUpload.upload(file);
this.pasteFile = [];
this.pasteItem = [];
postFiles.some(file => {
let reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = ({target}) => {
this.pasteFile.push(file)
this.pasteItem.push({
type: $A.getMiddle(file.type, null, '/'),
name: file.name,
size: file.size,
result: target.result
})
this.pasteShow = true
}
});
}
},

View File

@ -445,10 +445,18 @@
}
.dialog-wrapper-paste {
margin-top: -4px;
img {
max-width: 100%;
max-height: 1000px;
}
> div,
> img {
display: flex;
flex-direction: column;
padding: 0;
margin: 4px 0;
}
}
@media (max-width: 768px) {