diff --git a/package-lock.json b/package-lock.json index a4f3b457..31f5ed48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8608,6 +8608,15 @@ "pify": "^4.0.1" } }, + "halo-editor": { + "version": "2.7.6", + "resolved": "https://registry.npm.taobao.org/halo-editor/download/halo-editor-2.7.6.tgz", + "integrity": "sha1-Rus1ba0bkgrjDboxgbzVmryu8dc=", + "requires": { + "highlight.js": "^9.11.0", + "highlight.js-async-webpack": "^1.0.4" + } + }, "handle-thing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", @@ -8771,7 +8780,7 @@ }, "highlight.js-async-webpack": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/highlight.js-async-webpack/-/highlight.js-async-webpack-1.0.4.tgz", + "resolved": "https://registry.npm.taobao.org/highlight.js-async-webpack/download/highlight.js-async-webpack-1.0.4.tgz", "integrity": "sha1-wGtnv5nwSQRdYrdW5YVbCRLsYWw=" }, "hmac-drbg": { @@ -12042,15 +12051,6 @@ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, - "mavon-editor": { - "version": "2.7.5", - "resolved": "https://registry.npm.taobao.org/mavon-editor/download/mavon-editor-2.7.5.tgz", - "integrity": "sha1-8HVRJCnWHhSpw9i5b5dMsEkoi/g=", - "requires": { - "highlight.js": "^9.11.0", - "highlight.js-async-webpack": "^1.0.4" - } - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", diff --git a/package.json b/package.json index 1d519311..63798532 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "ant-design-vue": "^1.3.15", "axios": "^0.18.0", "enquire.js": "^2.1.6", + "halo-editor": "^2.7.6", "marked": "^0.6.3", - "mavon-editor": "^2.7.5", "moment": "^2.24.0", "nprogress": "^0.2.0", "viser-vue": "^2.4.6", diff --git a/src/components/global.less b/src/components/global.less index badaccb9..1ac88332 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -710,6 +710,17 @@ body { } } +.sheet-thum { + .img { + width: 100%; + cursor: pointer; + border-radius: 4px; + } + .sheet-thum-remove { + margin-top: 16px; + } +} + .ant-calendar-picker{ width: 100%!important; } \ No newline at end of file diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 698b4703..b7ba287c 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -12,7 +12,7 @@
- import CategoryTree from './components/CategoryTree' import TagSelect from './components/TagSelect' -import { mavonEditor } from 'mavon-editor' +import { haloEditor } from 'halo-editor' import AttachmentDrawer from '../attachment/components/AttachmentDrawer' import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer' import CategorySelectTree from './components/CategorySelectTree' import FooterToolBar from '@/components/FooterToolbar' import { mixin, mixinDevice } from '@/utils/mixin.js' import { toolbars } from '@/core/const' -import 'mavon-editor/dist/css/index.css' +import 'halo-editor/dist/css/index.css' import categoryApi from '@/api/category' import postApi from '@/api/post' import optionApi from '@/api/option' @@ -222,7 +222,7 @@ import moment from 'moment' export default { components: { TagSelect, - mavonEditor, + haloEditor, CategoryTree, FooterToolBar, AttachmentDrawer, @@ -381,8 +381,8 @@ export default { var responseObject = response.data if (responseObject.status === 200) { - var MavonEditor = this.$refs.md - MavonEditor.$img2Url(pos, encodeURI(responseObject.data.path)) + var HaloEditor = this.$refs.md + HaloEditor.$img2Url(pos, encodeURI(responseObject.data.path)) this.$message.success('图片上传成功') } else { this.$message.error('图片上传失败:' + responseObject.message) @@ -401,7 +401,6 @@ export default { diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 9d1bc39d..a227dac8 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -11,7 +11,7 @@ />
-