1.编辑器优化

2024.1.14 sws
master
sws 2024-01-14 20:02:06 +08:00
parent f091ee39bf
commit 1c2b6e5c34
3 changed files with 4 additions and 17 deletions

View File

@ -944,10 +944,7 @@
"path": "form/form",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "发布博文",
"enablePullDownRefresh": false,
//
"disableScroll": true
"navigationBarTitleText": "发布博文"
}
}
]

View File

@ -46,7 +46,7 @@
<view class="form-gorup">
<view class="form-gorup-title padding-right-main">内容<text class="form-group-tips-must">*</text></view>
<view class="margin-top-main sp-editor">
<sp-editor @init="initEditor" @input="rich_text_event" @upinImage="up_in_image_event"></sp-editor>
<sp-editor @input="rich_text_event" @upinImage="up_in_image_event"></sp-editor>
</view>
</view>
</view>
@ -301,18 +301,6 @@
data: new_data,
});
},
/**
* 编辑器就绪
* @param {Object} editor 编辑器实例你可以自定义调用editor实例的方法
* @tutorial editor组件 https://uniapp.dcloud.net.cn/component/editor.html#editor-%E7%BB%84%E4%BB%B6
* @tutorial 相关api https://uniapp.dcloud.net.cn/api/media/editor-context.html
*/
initEditor(editor) {
//
editor.setContents({
html: (this.data || null) !== null ? this.data.content : '',
});
},
//
rich_text_event(e) {

View File

@ -84,6 +84,7 @@
source: 'url("https://sungd.github.io/Pacifico.ttf")',
});
// #endif
onEditorReady();
},
watch: {
templates: function (new_val, old_val) {
@ -277,6 +278,7 @@
width: 100%;
height: 100%;
line-height: 1.5;
overflow-y: auto !important;
}
::v-deep .ql-editor.ql-blank::before {