Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fix: post edit page. (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Mar 6, 2021
1 parent 895bd70 commit 1bb9a28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
26 changes: 1 addition & 25 deletions src/views/post/PostEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
@onSaveDraft="handleSaveDraft(true)"
@onContentChange="onContentChange"
/>

<!-- <RichTextEditor
v-else
:originalContent="postToStage.originalContent"
@onContentChange="onContentChange"
/> -->
</div>
</a-col>
</a-row>
Expand All @@ -59,14 +53,12 @@

<script>
import { mixin, mixinDevice } from '@/mixins/mixin.js'
// import { mapGetters } from 'vuex'
import { datetimeFormat } from '@/utils/datetime'
import PostSettingDrawer from './components/PostSettingDrawer'
import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import MarkdownEditor from '@/components/Editor/MarkdownEditor'
import { PageView } from '@/layouts'
// import RichTextEditor from '@/components/editor/RichTextEditor'
import postApi from '@/api/post'
export default {
Expand All @@ -76,7 +68,6 @@ export default {
AttachmentDrawer,
MarkdownEditor,
PageView
// RichTextEditor
},
data() {
return {
Expand Down Expand Up @@ -149,22 +140,6 @@ export default {
}
return '当前页面数据未保存,确定要离开吗?'
}
// if (!this.postToStage.editorType) {
// this.postToStage.editorType = this.options.default_editor
// }
},
watch: {
temporaryContent(newValue) {
if (newValue) {
this.contentChanges++
}
}
},
computed: {
temporaryContent() {
return this.postToStage.originalContent
}
// ...mapGetters(['options'])
},
methods: {
handleSaveDraft(draftOnly = false) {
Expand Down Expand Up @@ -269,6 +244,7 @@ export default {
this.contentChanges = 0
},
onContentChange(val) {
this.contentChanges++
this.postToStage.originalContent = val
},
onRefreshPostFromSetting(post) {
Expand Down
26 changes: 1 addition & 25 deletions src/views/sheet/SheetEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
@onSaveDraft="handleSaveDraft(true)"
@onContentChange="onContentChange"
/>

<!-- <RichTextEditor
v-else
:originalContent="sheetToStage.originalContent"
@onContentChange="onContentChange"
/> -->
</div>
</a-col>
</a-row>
Expand All @@ -55,13 +49,11 @@

<script>
import { mixin, mixinDevice } from '@/mixins/mixin.js'
// import { mapGetters } from 'vuex'
import { datetimeFormat } from '@/utils/datetime'
import { PageView } from '@/layouts'
import SheetSettingDrawer from './components/SheetSettingDrawer'
import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import MarkdownEditor from '@/components/Editor/MarkdownEditor'
// import RichTextEditor from '@/components/editor/RichTextEditor'
import sheetApi from '@/api/sheet'
export default {
Expand All @@ -70,7 +62,6 @@ export default {
AttachmentDrawer,
SheetSettingDrawer,
MarkdownEditor
// RichTextEditor
},
mixins: [mixin, mixinDevice],
data() {
Expand Down Expand Up @@ -140,22 +131,6 @@ export default {
}
return '当前页面数据未保存,确定要离开吗?'
}
// if (!this.sheetToStage.editorType) {
// this.sheetToStage.editorType = this.options.default_editor
// }
},
watch: {
temporaryContent(newValue) {
if (newValue) {
this.contentChanges++
}
}
},
computed: {
temporaryContent() {
return this.sheetToStage.originalContent
}
// ...mapGetters(['options'])
},
methods: {
handleSaveDraft(draftOnly = false) {
Expand Down Expand Up @@ -256,6 +231,7 @@ export default {
this.contentChanges = 0
},
onContentChange(val) {
this.contentChanges++
this.sheetToStage.originalContent = val
},
onRefreshSheetFromSetting(sheet) {
Expand Down

0 comments on commit 1bb9a28

Please sign in to comment.