解决quill-editor富文本修改页面自动获取焦点问题

2022-07-21  本文已影响0人  倩仔6
   <quill-editor
          ref="purposeEditor"
          v-model="scope.form[scope.row.prop]"
          :disabled="activeDisabled"
          @change="onGoalEditorChange"
          :options="purposeOption"
          @click.native="onGoalClick"
        ></quill-editor>

·》注意重点:
@click.native="onGoalClick"

export default {
  data() {
    return { 
      goalInit: true,
       }
  },

  mounted() {
      this.$refs.contentEditor.quill.enable(false);
    },
methods: {
    onGoalClick() {
      if (this.goalInit) {
        this.$refs.purposeEditor.quill.enable(true);
        this.$refs.purposeEditor.quill.focus();
        this.goalInit = false;
        }
      }
    },
}

上一篇下一篇

猜你喜欢

热点阅读