guhongwei %!s(int64=2) %!d(string=hai) anos
pai
achega
ae039abf15
Modificáronse 2 ficheiros con 4 adicións e 3 borrados
  1. 3 2
      commpents/hg-editor/hg-editor.js
  2. 1 1
      pagesMatch/matchAdmin/match/add.wxml

+ 3 - 2
commpents/hg-editor/hg-editor.js

@@ -40,11 +40,12 @@ Component({
      * 组件的方法列表
      */
     methods: {
-        _onEditorReady: async function () {
+        _onEditorReady: function () {
             const that = this;
             that.createSelectorQuery().select('#editor').context(function (res) {
                 that.editorCtx = res.context;
-                let html = that.data.name;
+                let { name } = that.data;
+                let html = name;
                 if (html) that.editorCtx.setContents({ html })
             }).exec()
         },

+ 1 - 1
pagesMatch/matchAdmin/match/add.wxml

@@ -72,7 +72,7 @@
                 </view>
                 <view class="content">
                     <view class="value">
-                        <hg-editor placeholder="请输入赛事规程" name="{{form.regular}}" bind:ready="onEditorReady" bind:input="inputChange"> </hg-editor>
+                        <hg-editor placeholder="请输入赛事规程" name="{{form.regular}}" bind:input="inputChange"> </hg-editor>
                     </view>
                 </view>
                 <view class="content">