((typeof self !== 'undefined' ? self : this)["webpackJsonpportal_management_std"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpportal_management_std"] || []).push([[16],{

/***/ "45e2":
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__("2350")(false);
// imports


// module
exports.push([module.i, "[data-v-82ce997e] .ql-snow .blot-formatter__toolbar{display:none}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"12px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"12px\"]:before{content:\"12px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"14px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"14px\"]:before{content:\"14px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"16px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"16px\"]:before{content:\"16px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"18px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"18px\"]:before{content:\"18px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"22px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"22px\"]:before{content:\"22px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"26px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"26px\"]:before{content:\"26px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"30px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"30px\"]:before{content:\"30px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"36px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"36px\"]:before{content:\"36px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"42px\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"42px\"]:before{content:\"42px\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight{width:50px}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"1\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"1\"]:before{content:\"1\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"1.5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"1.5\"]:before{content:\"1.5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"1.8\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"1.8\"]:before{content:\"1.8\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"2\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"2\"]:before{content:\"2\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"3\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"3\"]:before{content:\"3\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"4\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"4\"]:before{content:\"4\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value=\"5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value=\"5\"]:before{content:\"5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing{width:50px}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"0\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"0\"]:before{content:\"0\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"0.25\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"0.25\"]:before{content:\"0.25\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"0.5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"0.5\"]:before{content:\"0.5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"1\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"1\"]:before{content:\"1\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"1.5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"1.5\"]:before{content:\"1.5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"2\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"2\"]:before{content:\"2\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"2.5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"2.5\"]:before{content:\"2.5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"3\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"3\"]:before{content:\"3\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"4\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"4\"]:before{content:\"4\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-item[data-value=\"5\"]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-letterspacing .ql-picker-label[data-value=\"5\"]:before{content:\"5\"}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SourceHanSansCN-Regular]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SourceHanSansCN-Regular]:before{content:\"\\601D\\6E90\\9ED1\\4F53\";font-family:SourceHanSansCN-Regular}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]:before{content:\"\\5B8B\\4F53\";font-family:SimSun}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]:before{content:\"\\9ED1\\4F53\";font-family:SimHei}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]:before{content:\"\\5FAE\\8F6F\\96C5\\9ED1\";font-family:Microsoft YaHei}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]:before{content:\"\\6977\\4F53\";font-family:KaiTi}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]:before{content:\"\\4EFF\\5B8B\";font-family:FangSong}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]:before{content:\"Arial\";font-family:Arial}[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]:before,[data-v-82ce997e] .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]:before{content:\"sans-serif\";font-family:\"sans-serif\"}", ""]);

// exports


/***/ }),

/***/ "606b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"29850416-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/RichtextEditor.vue?vue&type=template&id=82ce997e&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('keep-alive',[_c('div',{staticClass:"detail-w"},[_c('div',{staticClass:"editor"}),_c('el-upload',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"upload",staticClass:"w-80px h-80px border-1 border-dashed border-hex-d9d9d9 rounded-6px cursor-pointer relative overflow-hidden flex justify-center items-center avatar-uploader",attrs:{"action":"","before-upload":_vm.getFileContent,"http-request":_vm.uploadImage,"show-file-list":false,"accept":_vm.accept}}),_c('el-dialog',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"small-dialog",attrs:{"title":"查看图片信息","visible":_vm.dialogVisible,"close-on-click-modal":false,"append-to-body":true},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},_vm._l((_vm.imgList),function(item,index){return _c('el-row',{key:index,staticClass:"h-200px mb-20px",attrs:{"gutter":15}},[_c('el-col',{staticClass:"h-full border-color-default border-1px",attrs:{"span":12}},[_c('el-image',{staticClass:"w-full h-full",attrs:{"src":item.url,"preview-src-list":[item.url],"fit":"contain"}})],1),_c('el-col',{attrs:{"span":12}},[_c('div',[_vm._v("宽度："),_c('el-input',{attrs:{"size":"small","readonly":""},model:{value:(item.width),callback:function ($$v) {_vm.$set(item, "width", $$v)},expression:"item.width"}})],1),_c('div',{staticClass:"mt-15px"},[_vm._v("\n            高度："),_c('el-input',{attrs:{"size":"small","readonly":""},model:{value:(item.height),callback:function ($$v) {_vm.$set(item, "height", $$v)},expression:"item.height"}})],1)])],1)}),1)],1)])}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/RichtextEditor.vue?vue&type=template&id=82ce997e&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__("c7eb");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("3835");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("bee2");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d4ec");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/callSuper.js + 4 modules
var callSuper = __webpack_require__("8f33");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("262e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.at.js
var es_array_at = __webpack_require__("33d1");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
var es_array_push = __webpack_require__("14d9");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.at-alternative.js
var es_string_at_alternative = __webpack_require__("ea98");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
var es_string_match = __webpack_require__("466d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.repeat.js
var es_string_repeat = __webpack_require__("38cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
var es_string_trim = __webpack_require__("498a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// EXTERNAL MODULE: ./node_modules/@wiz-api/file-management/lib/file-management.umd.js
var file_management_umd = __webpack_require__("3c33");

// EXTERNAL MODULE: ./node_modules/quill/dist/quill.js
var quill = __webpack_require__("9339");
var quill_default = /*#__PURE__*/__webpack_require__.n(quill);

// EXTERNAL MODULE: ./node_modules/quill/dist/quill.snow.css
var quill_snow = __webpack_require__("8096");

// EXTERNAL MODULE: ./node_modules/quill-better-table/dist/quill-better-table.js
var quill_better_table = __webpack_require__("883c");
var quill_better_table_default = /*#__PURE__*/__webpack_require__.n(quill_better_table);

// EXTERNAL MODULE: ./node_modules/quill-better-table/dist/quill-better-table.css
var dist_quill_better_table = __webpack_require__("64cf");

// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib??ref--12-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/RichtextEditor.vue?vue&type=script&lang=js




















//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//






// import BlotFormatter from 'quill-blot-formatter'

/* eslint-disable */
var fileApi = new file_management_umd["FileApi"]();
quill_default.a.register({
  'modules/better-table': quill_better_table_default.a
});
var titleConfig = {
  'ql-bold': '加粗',
  'ql-color': '颜色',
  'ql-font': '字体',
  'ql-code': '插入代码',
  'ql-italic': '斜体',
  'ql-link': '添加链接',
  'ql-background': '颜色',
  'ql-size': '字体大小',
  'ql-strike': '删除线',
  'ql-script': '上标/下标',
  'ql-underline': '下划线',
  'ql-blockquote': '引用',
  'ql-header': '标题',
  'ql-indent': '缩进',
  'ql-list': '列表',
  // 'ql-align': '文本对齐',
  'ql-direction': '文本方向',
  'ql-code-block': '代码块',
  'ql-formula': '公式',
  'ql-image': '图片',
  'ql-video': '视频',
  'ql-clean': '清除字体样式',
  'ql-upload': '文件',
  'ql-table': '插入表格',
  'ql-table-insert-row': '插入行',
  'ql-table-insert-column': '插入列',
  'ql-table-delete-row': '删除行',
  'ql-table-delete-column': '删除列',
  'ql-lineheight': '行高',
  'ql-letterspacing': '字距',
  'ql-typography': '智能排版',
  'ql-image-size': '查看图片信息'
};
var fontSizeStyle = quill_default.a.import('attributors/style/size');
fontSizeStyle.whitelist = ['12px', '14px', '16px', '18px', '22px', '26px', '30px', '36px', '42px'];
quill_default.a.register(fontSizeStyle, true);

// 设置行高
var Parchment = quill_default.a.import('parchment');
var RichtextEditorvue_type_script_lang_js_StyleAttributor = /*#__PURE__*/function (_Parchment$Attributor) {
  function StyleAttributor() {
    Object(classCallCheck["a" /* default */])(this, StyleAttributor);
    return Object(callSuper["a" /* default */])(this, StyleAttributor, arguments);
  }
  Object(inherits["a" /* default */])(StyleAttributor, _Parchment$Attributor);
  return Object(createClass["a" /* default */])(StyleAttributor);
}(Parchment.Attributor);
var lineHeightStyle = new RichtextEditorvue_type_script_lang_js_StyleAttributor('lineheight', 'ql-lineheight', {
  scope: Parchment.Scope.INLINE,
  whitelist: ['1', '1.5', '1.8', '2', '3', '4', '5']
});
quill_default.a.register({
  'formats/lineHeight': lineHeightStyle
}, true);

// 设置字距
var letterSpacingStyle = new RichtextEditorvue_type_script_lang_js_StyleAttributor('letterspacing', 'ql-letterspacing', {
  scope: Parchment.Scope.INLINE,
  whitelist: ['0', '0.25', '0.5', '1', '1.5', '2', '2.5', '3', '4', '5']
});
quill_default.a.register({
  'formats/letterspacing': letterSpacingStyle
}, true);

// 设置字体
var fonts = ['SourceHanSansCN-Regular', 'SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial', 'sans-serif'];
var Font = quill_default.a.import('formats/font');
Font.whitelist = fonts;
quill_default.a.register(Font, true);
// 图片缩放
// Quill.register('modules/blotFormatter', BlotFormatter)
/* harmony default export */ var RichtextEditorvue_type_script_lang_js = ({
  name: 'Editor',
  props: {
    content: null
  },
  data: function data() {
    var _this = this;
    var that = this;
    return {
      dialogVisible: false,
      imgList: [],
      accept: 'jpg,png',
      imageFile: '',
      file1: '',
      fileId: '',
      currentStrLength: 0,
      // 当前字数长度
      quill: null,
      options: {
        preserveWhitespace: true,
        theme: 'snow',
        modules: {
          toolbar: {
            container: [['bold', 'italic', 'underline', 'strike'], ['blockquote', 'code-block'],
            // 引用，代码块
            [{
              size: fontSizeStyle.whitelist
            }],
            // 字体大小
            [{
              header: [1, 2, 3, 4, 5, 6, false]
            }],
            // 几级标题
            [{
              lineheight: ['1', '1.5', '1.8', '2', '3', '4', '5']
            }],
            // 行高
            [{
              letterspacing: ['0', '0.25', '0.5', '1', '1.5', '2', '2.5', '3', '4', '5']
            }],
            // 字距
            [{
              list: 'ordered'
            }, {
              list: 'bullet'
            }], [{
              indent: '-1'
            }, {
              indent: '+1'
            }], [{
              color: []
            }, {
              background: []
            }], [{
              font: fonts
            }],
            // [{ align: [] }],
            [{
              align: ''
            }, {
              align: 'center'
            }, {
              align: 'right'
            }, {
              align: 'justify'
            }], ['clean'], ['image'],
            // 上传图片、上传视频
            [{
              table: 'TD'
            }
            // { 'table-insert-row': 'TIR' },
            // { 'table-insert-column': 'TIC' },
            // { 'table-delete-row': 'TDR' },
            // { 'table-delete-column': 'TDC' },
            ], ['typography'], ['image-size']],
            handlers: {
              image: function image(value) {
                if (value) {
                  that.handleMockUpload();
                } else {
                  that.quill.format('image', false);
                }
              },
              table: function table(val) {
                this.quill.getModule('better-table').insertTable(2, 3);
              },
              typography: function typography() {
                var _document$querySelect;
                var richText = (_document$querySelect = document.querySelector('.ql-editor')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.children;
                _.forEach(richText, function (item, index) {
                  if (item.nodeName === 'P') {
                    if (item.children.length === 0) {
                      if (!item.isDesc) {
                        var tabSize = window.getComputedStyle(item).tabSize || 0;
                        // 获取当前段落的前导空格
                        var currentIndent = item.innerHTML.match(/^\s*/)[0];
                        // 获取当前段落制表符（从word复制缩进段落可能会存在制表符）
                        var tabSizeIndent = item.innerHTML.match(/^\t*/)[0];
                        var spacesToAdd = 4 - currentIndent.length - tabSizeIndent.length * tabSize;
                        if (spacesToAdd > 0) {
                          var indent = ' '.repeat(spacesToAdd);
                          item.innerHTML = indent + item.innerHTML;
                        }
                        item.setAttribute('ql-lineheight', '1.8');
                      }
                    } else if (item.children[0].nodeName === 'SPAN' || item.children[0].nodeName === 'STRONG') {
                      var span = item.children[0];
                      if (span.children.length === 0) {
                        if (!item.isDesc) {
                          var _tabSize = window.getComputedStyle(item).tabSize || 0;
                          // 获取当前段落的前导空格
                          var _currentIndent = span.innerHTML.match(/^\s*/)[0];
                          // 获取当前段落制表符（从word复制缩进段落可能会存在制表符）
                          var _tabSizeIndent = item.innerHTML.match(/^\t*/)[0];
                          var _spacesToAdd = 4 - _currentIndent.length - _tabSizeIndent.length * _tabSize;
                          if (_spacesToAdd > 0) {
                            var _indent = ' '.repeat(_spacesToAdd);
                            span.innerHTML = _indent + span.innerHTML;
                          }
                          item.setAttribute('ql-lineheight', '1.8');
                        }
                      }
                    }
                    _.forEach(item.children, function (child) {
                      if (child.nodeName === 'IMG' || child.nodeName === 'SPAN' && child.children.length && child.children[0].nodeName === 'IMG') {
                        item.classList.add('ql-align-center');
                        var nextNode = richText[index + 1];
                        if (nextNode && nextNode.innerText.length < 20) {
                          nextNode.classList.add('ql-align-center');
                          nextNode.isDesc = true;
                        }
                      }
                    });
                  }
                });
                that.$nextTick(function () {
                  that.$emit('typography');
                });
              },
              'image-size': function imageSize() {
                var imgNodeList = _this.quill.container.getElementsByTagName('img');
                _this.imgList = [];
                _.forEach(imgNodeList, function (item) {
                  _this.imgList.push({
                    width: item.offsetWidth,
                    height: item.offsetHeight,
                    url: item.getAttribute('src')
                  });
                });
                if (_this.imgList.length) {
                  _this.dialogVisible = true;
                } else {
                  _this.$message.warning('未获取到图片');
                }
              }
              // 'table-insert-row': function() {
              //   this.quill.getModule('table').insertRowBelow()
              // },
              // 'table-insert-column': function() {
              //   this.quill.getModule('table').insertColumnRight()
              // },
              // 'table-delete-row': function() {
              //   this.quill.getModule('table').deleteRow()
              // },
              // 'table-delete-column': function() {
              //   this.quill.getModule('table').deleteColumn()
              // },
            }
          },
          table: false,
          'better-table': {
            operationMenu: {
              items: {
                insertColumnRight: {
                  text: '右边插入一列'
                },
                insertColumnLeft: {
                  text: '左边插入一列'
                },
                insertRowUp: {
                  text: '上边插入一行'
                },
                insertRowDown: {
                  text: '下边插入一行'
                },
                mergeCells: {
                  text: '合并单元格'
                },
                unmergeCells: {
                  text: '拆分单元格'
                },
                deleteColumn: {
                  text: '删除列'
                },
                deleteRow: {
                  text: '删除行'
                },
                deleteTable: {
                  text: '删除表格'
                }
              },
              color: {
                colors: ['green', 'red', 'yellow', 'blue', 'white'],
                text: '背景色:'
              }
            }
          }
          // blotFormatter: {
          //   toolbar: {
          //     mainClassName: 'blot-formatter__toolbar',
          //   },
          // },
        },
        placeholder: ''
      }
    };
  },
  computed: {
    fileUrl: function fileUrl() {
      var fileServer = Wiz.GetModuleServer('file-management');
      return "".concat(fileServer, "/api/file-management/files/public/image/");
    }
  },
  methods: {
    addQuillTitle: function addQuillTitle() {
      var oToolBar = document.querySelector('.ql-toolbar');
      if (!oToolBar) return;
      var aButton = oToolBar.querySelectorAll('button');
      var aSelect = oToolBar.querySelectorAll('select');
      aButton.forEach(function (item) {
        if (item.className === 'ql-align') {
          switch (item.value) {
            case 'center':
              item.title = '居中对齐';
              break;
            case 'right':
              item.title = '居右对齐';
              break;
            case 'justify':
              item.title = '两端对齐';
              break;
            default:
              item.title = '居左对齐';
              break;
          }
        } else if (item.className === 'ql-script') {
          item.value === 'sub' ? item.title = '下标' : item.title = '上标';
        } else if (item.className === 'ql-indent') {
          item.value === '+1' ? item.title = '向右缩进' : item.title = '向左缩进';
        } else {
          item.title = titleConfig[item.classList[0]];
        }
      });
      aSelect.forEach(function (item) {
        item.parentNode.title = titleConfig[item.classList[0]];
      });
    },
    getContentData: function getContentData() {
      return this.quill.getContents();
    },
    handleMockUpload: function handleMockUpload() {
      this.$refs.upload.$el.querySelector('input[type="file"]').click();
    },
    // 获取上传的内容
    getFileContent: function getFileContent(file) {
      if (!this.accept.includes(file.name.split('.').at(-1).toLowerCase())) {
        this.$message.warning("\u8BF7\u4E0A\u4F20\u56FE\u7247\u683C\u5F0F\u6587\u4EF6, ".concat(this.accept));
        return false;
      }
      this.file1 = file;
      return true;
    },
    uploadImage: function uploadImage() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$fileApi$upload, _yield$fileApi$upload2, err, res, item;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return fileApi.upload({
                files: [_this2.file1],
                authLevel: 2
              });
            case 2:
              _yield$fileApi$upload = _context.sent;
              _yield$fileApi$upload2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$upload, 2);
              err = _yield$fileApi$upload2[0];
              res = _yield$fileApi$upload2[1];
              if (!err) {
                item = res && res[0] || {};
                _this2.fileId = item.id;
                _this2.handleUploadImageSuccess(_this2.fileId);
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    handleUploadImageSuccess: function handleUploadImageSuccess(fileId) {
      if (!fileId) return;
      this.value = "".concat(this.fileUrl).concat(fileId);
      var quill = this.quill;
      var length = quill.getSelection().index;
      // 插入图片 res.info为服务器返回的图片地址
      quill.insertEmbed(length, 'image', this.value);
      // 调整光标到最后
      quill.setSelection(length + 1);
    }
  },
  mounted: function mounted() {
    var _this3 = this;
    var dom = this.$el.querySelector('.editor');
    dom.style.minHeight = '200px'; // 设置富文本高度
    this.quill = new quill_default.a(dom, this.options);
    this.$nextTick(function () {
      _this3.$el.querySelector('.ql-editor').innerHTML = _this3.content || '';
    });
    this.quill.on('text-change', function () {
      _this3.$emit('change', _this3.quill.root.innerHTML);
    });
    this.quill.on('selection-change', function () {
      // 隐藏图片缩放对齐框
      var resizeImgTool = _this3.$el.querySelector('.blot-formatter__overlay');
      if (resizeImgTool) {
        resizeImgTool.style.display = 'none';
      }
    });
    this.quill.root.addEventListener('keydown', function (event) {
      // 解决段落空格缩进后回车换行无缩进问题
      if (event.keyCode === 13) {
        // 按下回车键
        var range = _this3.quill.getSelection();
        var currentLine = _this3.quill.getLine(range.index);
        var lineText = _this3.quill.getLine(range.index - 1)[0].domNode.textContent;
        // 判断当前光标所在的位置是否在段落的开头，并且前面有空格
        if (range.index === currentLine[0].offset() && lineText.trim() === '') {
          // 获取前面空格的数量
          var indent = lineText.match(/^\s*/);
          // 在新的段落中插入相同数量的空格
          _this3.quill.insertText(range.index, indent[0]);
          // 阻止默认的回车键行为
          event.preventDefault();
        }
      } else if (event.keyCode === 8) {
        if (['', '\n', '\t'].includes(_this3.quill.root.innerText)) {
          _this3.quill.root.innerHTML = '';
        }
      }
    });
    this.$el.querySelector('.ql-typography').innerHTML = '<i class="iconfont icon-yxr-wheelbaseMeasurement text-12px text-[#000] block"></i>';
    this.$el.querySelector('.ql-image-size').innerHTML = '<i class="iconfont icon-yxr-firstPersonRoaming text-12px text-[#000] block"></i>';
    // this.$el.querySelector(
    //   '.ql-table-insert-row'
    // ).innerHTML = `<svg t="1591862376726" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6306" width="18" height="200"><path d="M500.8 604.779L267.307 371.392l-45.227 45.27 278.741 278.613L779.307 416.66l-45.248-45.248z" p-id="6307"></path></svg>`
    // this.$el.querySelector(
    //   '.ql-table-insert-column'
    // ).innerHTML = `<svg t="1591862238963" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6509" width="18" height="200"><path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="6510"></path></svg>`
    // this.$el.querySelector(
    //   '.ql-table-delete-row'
    // ).innerHTML = `<svg t="1591862253524" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6632" width="18" height="200"><path d="M500.8 461.909333L267.306667 695.296l-45.226667-45.269333 278.741333-278.613334L779.306667 650.026667l-45.248 45.226666z" p-id="6633"></path></svg>`
    // this.$el.querySelector(
    //   '.ql-table-delete-column'
    // ).innerHTML = `<svg t="1591862261059" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6755" width="18" height="200"><path d="M641.28 278.613333l-45.226667-45.226666-278.634666 278.762666 278.613333 278.485334 45.248-45.269334-233.365333-233.237333z" p-id="6756"></path></svg>`
    this.addQuillTitle();
  },
  activated: function activated() {
    this.quill.setContents({});
  }
});
// CONCATENATED MODULE: ./src/components/RichtextEditor.vue?vue&type=script&lang=js
 /* harmony default export */ var components_RichtextEditorvue_type_script_lang_js = (RichtextEditorvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/RichtextEditor.vue?vue&type=style&index=0&id=82ce997e&prod&lang=scss&scoped=true
var RichtextEditorvue_type_style_index_0_id_82ce997e_prod_lang_scss_scoped_true = __webpack_require__("a101");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/RichtextEditor.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_RichtextEditorvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "82ce997e",
  null
  
)

/* harmony default export */ var RichtextEditor = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "a101":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RichtextEditor_vue_vue_type_style_index_0_id_82ce997e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d038");
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RichtextEditor_vue_vue_type_style_index_0_id_82ce997e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RichtextEditor_vue_vue_type_style_index_0_id_82ce997e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "d038":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("45e2");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("a4c225e2", content, true, {"sourceMap":false,"shadowMode":false});

/***/ })

}]);
//# sourceMappingURL=portal-management-std.umd.16.js.map