Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-10-26 11:31:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d98c8033c9d773db9bae0c2b5fa8660728c6a1ca
d98c8033
1 parent
72a03e66
🐞 fix: 富文本控件获取数据优化
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
src/components/activity-editor.vue
src/components/activity-editor.vue
View file @
d98c803
<!--
* @Date: 2022-09-26 21:52:25
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-
18 18:43:55
* @LastEditTime: 2022-10-
26 11:31:30
* @FilePath: /swx/src/components/activity-editor.vue
* @Description: 文件描述
-->
...
...
@@ -64,20 +64,20 @@ export default {
editorCtx: ''
}
},
watch: {
htmlContent (val) {
// 如果有传值,还原重新编辑
this.editorCtx.setContents({
html: val
})
}
},
methods: {
_onEditorReady: function () {
const that = this;
Taro.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context
}).exec();
// 如果有传值,还原重新编辑
if (this.htmlContent) {
setTimeout(() => {
this.editorCtx.setContents({
html: this.htmlContent
})
}, 1000);
}
},
//插入图片
_addImage: function (event) {
...
...
Please
register
or
login
to post a comment