Skip to content

Commit

Permalink
perf: 任务群聊中拖拽文件或者照片时并未有确认窗口
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jan 25, 2022
1 parent b05db6d commit 7f14a82
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.7.10",
"version": "0.7.13",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",
Expand Down
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/build/146.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/build/161.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/build/43.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/build/893.js

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions resources/assets/js/pages/manage/components/DialogWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
}
},
Expand Down
8 changes: 8 additions & 0 deletions resources/assets/sass/pages/components/dialog-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7f14a82

Please sign in to comment.