From 90a563b07477b9fec0512b282c142191c393141f Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 14 Dec 2019 14:15:42 +0800 Subject: [PATCH] refactor: save shortcuts. --- package-lock.json | 6 +++--- package.json | 2 +- src/components/global.less | 14 +++++++++++++- src/views/attachment/AttachmentList.vue | 14 +------------- src/views/post/PostEdit.vue | 3 +-- src/views/sheet/SheetEdit.vue | 3 +-- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 66578a5a..1eb41434 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7697,9 +7697,9 @@ } }, "halo-editor": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/halo-editor/-/halo-editor-2.8.1.tgz", - "integrity": "sha512-GsuSmkgkemDVF2x20EGr0KbqJPIlXWeToMmi6QyesEOyexbWojTlR2dN2oDzZIyMjM4Nvpvcnpu5bdjNTKXzWA==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/halo-editor/-/halo-editor-2.8.2.tgz", + "integrity": "sha512-Pjptx1y/gmSRKVwtNrv850t9XY5Aw15CLPg9t/oa86DgFtXNXnGYPxAqWl+AmK9pOAzUFnB8aqHSeJmW0+6HkQ==", "requires": { "highlight.js": "^9.11.0", "highlight.js-async-webpack": "^1.0.4" diff --git a/package.json b/package.json index 4cc5c4a2..0e048bcb 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "enquire.js": "^2.1.6", "filepond": "^4.7.2", "filepond-plugin-image-preview": "^4.5.0", - "halo-editor": "^2.8.1", + "halo-editor": "^2.8.2", "marked": "^0.7.0", "moment": "^2.24.0", "verte": "^0.0.12", diff --git a/src/components/global.less b/src/components/global.less index 202da809..f2a5363f 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -720,7 +720,8 @@ body { float: left; } -.attach-thumb,.photo-thumb { +.attach-thumb, +.photo-thumb { width: 100%; padding-bottom: 56%; } @@ -855,4 +856,15 @@ body { border-right: 1px solid #fff3f3; background-color: #ffffff; } +} + +.select-attachment-checkbox { + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + z-index: 10; } \ No newline at end of file diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index 6f83a401..ed9ad97a 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -290,16 +290,4 @@ export default { } } } - - + \ No newline at end of file diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index aec13d55..ade78d03 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -19,8 +19,7 @@ :ishljs="true" :autofocus="false" @imgAdd="handleAttachmentUpload" - @keydown.ctrl.83.native="handleSaveDraft" - @keydown.meta.83.native="handleSaveDraft" + @save="handleSaveDraft" /> diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 657fbce4..648b77f9 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -18,8 +18,7 @@ :ishljs="true" :autofocus="false" @imgAdd="handleAttachmentUpload" - @keydown.ctrl.83.native="handleSaveDraft" - @keydown.meta.83.native="handleSaveDraft" + @save="handleSaveDraft" />