Change mavonEditor to halo-editor.

pull/40/head
ruibaby 2019-08-18 09:39:59 +08:00
parent 8c6817c08b
commit 7b814dbeb3
5 changed files with 34 additions and 36 deletions

20
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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;
}

View File

@ -12,7 +12,7 @@
</div>
<div id="editor">
<mavon-editor
<halo-editor
ref="md"
v-model="postToStage.originalContent"
:boxShadow="false"
@ -206,14 +206,14 @@
<script>
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 {
<style lang="less" scoped>
.v-note-wrapper {
z-index: 1000;
min-height: 580px;
}
</style>

View File

@ -11,7 +11,7 @@
/>
</div>
<div id="editor">
<mavon-editor
<halo-editor
ref="md"
v-model="sheetToStage.originalContent"
:boxShadow="false"
@ -138,13 +138,13 @@
</template>
<script>
import { mavonEditor } from 'mavon-editor'
import { haloEditor } from 'halo-editor'
import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer'
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 sheetApi from '@/api/sheet'
import themeApi from '@/api/theme'
import optionApi from '@/api/option'
@ -152,7 +152,7 @@ import attachmentApi from '@/api/attachment'
import moment from 'moment'
export default {
components: {
mavonEditor,
haloEditor,
FooterToolBar,
AttachmentDrawer,
AttachmentSelectDrawer
@ -287,8 +287,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)
@ -306,18 +306,6 @@ export default {
</script>
<style lang="less" scoped>
.v-note-wrapper {
z-index: 1000;
min-height: 580px;
}
.sheet-thum {
.img {
width: 100%;
cursor: pointer;
border-radius: 4px;
}
.sheet-thum-remove {
margin-top: 16px;
}
}
</style>