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

   <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;
        }
      }
    },
}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容