pxx-vue-quill 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,13 +7,13 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-20T10:40:06.224Z
10
+ * Date: 2025-08-21T03:23:56.124Z
11
11
  */
12
12
  import Quill from 'quill';
13
13
  export { default as Quill } from 'quill';
14
14
  import Delta from 'quill-delta';
15
15
  export { default as Delta } from 'quill-delta';
16
- import { defineComponent, onMounted, onBeforeUnmount, ref, watch, nextTick, h } from 'vue';
16
+ import { defineComponent, onMounted, onBeforeUnmount, ref, computed, watch, nextTick, h } from 'vue';
17
17
  import BlotFormatter from 'quill-blot-formatter';
18
18
 
19
19
  const toolbarOptions = {
@@ -62,7 +62,11 @@ const QuillEditor = defineComponent({
62
62
  minHeight: {
63
63
  type: Number,
64
64
  required: false,
65
- default: 90,
65
+ default: 40,
66
+ },
67
+ needBorder: {
68
+ type: Boolean,
69
+ default: true,
66
70
  },
67
71
  theme: {
68
72
  type: String,
@@ -125,6 +129,11 @@ const QuillEditor = defineComponent({
125
129
  let quill;
126
130
  let options;
127
131
  const editor = ref();
132
+ const editorStyleFilter = computed(() => {
133
+ return {
134
+ minHeight: `${props.minHeight}px`,
135
+ };
136
+ });
128
137
  // Register Module if not already registered
129
138
  const registerModule = (moduleName, module) => {
130
139
  // For Quill 1.x, we can't check if module is already registered
@@ -398,12 +407,13 @@ const QuillEditor = defineComponent({
398
407
  getText,
399
408
  setText,
400
409
  reinit,
410
+ editorStyleFilter,
401
411
  };
402
412
  },
403
413
  render() {
404
414
  var _a, _b;
405
415
  return [
406
- h('div', { class: 'quill-editor-container', style: { minHeight: `${this.$props.minHeight}px` } }, [
416
+ h('div', { class: `quill-editor-container ${this.$props.needBorder ? 'need-border' : ''}`, style: this.editorStyleFilter }, [
407
417
  (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
408
418
  h('div', { ref: 'editor', ...this.$attrs }),
409
419
  ]),
@@ -7,6 +7,6 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-20T10:40:06.224Z
10
+ * Date: 2025-08-21T03:23:56.124Z
11
11
  */
12
- import e from"quill";export{default as Quill}from"quill";import t from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as o,onMounted as l,onBeforeUnmount as n,ref as r,watch as i,nextTick as a,h as s}from"vue";import d from"quill-blot-formatter";const u={full:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["image"]]},c=o({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1,default:"请输入内容"},minHeight:{type:Number,required:!1,default:90},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,validator:e=>!!e&&("string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(u).indexOf(e)))},modules:{type:Object,required:!1,default:()=>({name:"blotFormatter",module:d})},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready","ocr","math"],setup:(o,s)=>{let d,c;l((()=>{p()})),n((()=>{d=null}));const m=r(),g=(t,o)=>{e.register(t,o)},p=()=>{var t,l;if(!m.value)return;d=new e(m.value,c);const n=null===(t=null==d?void 0:d.getModule("toolbar"))||void 0===t?void 0:t.container;n&&(n.style.display="none");const r=e.import("ui/icons");if(r.ocr='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M3.0000245140625,2.6000244140625L5.5000243140625,2.6000244140625C5.8313951140625,2.6000244140625,6.1000242140625,2.3313953240625,6.1000242140625,2.0000244340625C6.1000242140625,1.6686535440624999,5.8313951140625,1.4000244140625,5.5000243140625,1.4000244140625L3.0000245140625,1.4000244140625Q2.3372827740625,1.4000244140625,1.8686535940625,1.8686535940625Q1.4000244140625,2.3372827740625,1.4000244140625,3.0000245140625L1.4000244140625,5.5000243140625C1.4000244140625,5.8313951140625,1.6686535440624999,6.1000242140625,2.0000244340625,6.1000242140625C2.3313953240625,6.1000242140625,2.6000244140625,5.8313951140625,2.6000244140625,5.5000243140625L2.6000244140625,3.0000245140625Q2.6000244140625,2.6000244140625,3.0000245140625,2.6000244140625ZM12.5000244140625,1.4000244140625L15.0000244140625,1.4000244140625Q15.6627664140625,1.4000244140625,16.1313954140625,1.8686538940625Q16.6000244140625,2.3372834940625,16.6000244140625,3.0000245140625L16.6000244140625,5.5000243140625C16.6000244140625,5.6591539140625,16.5368104140625,5.8117661140625,16.424288414062502,5.9242883140625C16.3117674140625,6.0368099140625,16.1591544140625,6.1000242140625,16.0000244140625,6.1000242140625C15.6686534140625,6.1000242140625,15.4000244140625,5.8313951140625,15.4000244140625,5.5000243140625L15.4000234140625,3.0000245140625Q15.4000234140625,2.6000244140625,15.0000244140625,2.6000244140625L12.5000244140625,2.6000244140625C12.1686534140625,2.6000244140625,11.9000244140625,2.3313953240625,11.9000244140625,2.0000244340625C11.9000244140625,1.6686535440624999,12.1686534140625,1.4000244140625,12.5000244140625,1.4000244140625ZM8.6239776140625,6.4719930140625C8.5439777140625,6.1512432140625,8.3999777140625,5.7421179140625,8.2479777140625,5.4212432140625L9.4959774140625,5.052368214062501C9.6959782140625,5.4293680140625,9.9199772140625,5.9346180140625,9.9999771140625,6.2714929140625L9.3519778140625,6.4719930140625L12.7119784140625,6.4719930140625L12.7119784140625,7.6079931140625L11.5039774140625,7.6079931140625C11.1279774140625,8.6968679140625,10.6159782140625,9.6014929140625,9.9599781140625,10.3461180140625C10.7599773140625,10.9224930140625,11.7279774140625,11.3468685140625,12.8879774140625,11.6029934140625C12.6239774140625,11.8592434140625,12.2799774140625,12.3716184140625,12.1039784140625,12.6918684140625C10.8719778140625,12.3716184140625,9.8719778140625,11.8752434140625,9.0479779140625,11.2107429140625C8.175977714062501,11.8992434140625,7.1199779140625,12.4036184140625,5.8559775140625,12.7558684140625C5.7279777140625,12.4757434140625,5.3759775140625,11.9312434140625,5.1519775140625,11.6591184140625C6.3759775140625,11.3868685140625,7.3839779140625,10.9706182140625,8.1839781140625,10.3781185140625C7.5199776140625,9.6094932140625,7.0079775140625,8.6888685140625,6.5919776140625,7.6079931140625L5.3279776140625,7.6079931140625L5.3279776140625,6.4719930140625L8.6239776140625,6.4719930140625ZM7.7999778140625,7.6079931140625C8.1119776140625,8.344617814062499,8.5359778140625,9.0011186140625,9.0719776140625,9.5694933140625C9.5439777140625,9.0251179140625,9.9199772140625,8.3766184140625,10.1919784140625,7.6079931140625L7.7999778140625,7.6079931140625ZM2.6000244140625,12.5000244140625L2.6000244140625,15.0000244140625Q2.6000244140625,15.4000234140625,3.0000245140625,15.4000234140625L5.5000243140625,15.4000234140625C5.8313951140625,15.4000244140625,6.1000242140625,15.6686534140625,6.1000242140625,16.0000244140625C6.1000242140625,16.3313964140625,5.8313951140625,16.6000254140625,5.5000243140625,16.6000254140625L5.4989548140625,16.6000244140625L3.0000245140625,16.6000244140625Q2.3372834940625,16.6000244140625,1.8686538940625,16.1313954140625Q1.4000244140625,15.6627664140625,1.4000244140625,15.0000244140625L1.4000244140625,12.5000244140625C1.4000244140625,12.1686534140625,1.6686535440624999,11.9000244140625,2.0000244340625,11.9000244140625C2.3313953240625,11.9000244140625,2.6000244140625,12.1686534140625,2.6000244140625,12.5000244140625ZM16.6000244140625,12.5010944140625L16.6000244140625,15.0000244140625Q16.6000244140625,15.6627654140625,16.1313954140625,16.1313954140625Q15.6627654140625,16.6000244140625,15.0000244140625,16.6000244140625L12.5000244140625,16.6000244140625C12.3408944140625,16.6000244140625,12.1882824140625,16.5368104140625,12.0757594140625,16.424288414062502C11.9632384140625,16.3117664140625,11.9000244140625,16.1591544140625,11.9000244140625,16.0000244140625C11.9000244140625,15.6686534140625,12.1686534140625,15.4000244140625,12.5000244140625,15.4000244140625L15.0000244140625,15.4000234140625Q15.4000234140625,15.4000234140625,15.4000234140625,15.0000244140625L15.4000234140625,12.5000244140625C15.4000244140625,12.1686534140625,15.6686534140625,11.9000244140625,16.0000244140625,11.9000244140625C16.3313964140625,11.9000244140625,16.6000254140625,12.1686534140625,16.6000254140625,12.5000244140625L16.6000244140625,12.5010944140625Z" fill-rule="evenodd" fill="#333333" fill-opacity="1"/></g></g></svg>',r.math='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>',c=h(),o.modules)if(Array.isArray(o.modules))for(const e of o.modules)g(`modules/${e.name}`,e.module);else g(`modules/${o.modules.name}`,o.modules.module);d=new e(m.value,c),x(o.content),d.on("text-change",y),d.on("selection-change",L),d.on("editor-change",C),"bubble"!==o.theme&&m.value.classList.remove("ql-bubble"),"snow"!==o.theme&&m.value.classList.remove("ql-snow"),null===(l=d.getModule("toolbar"))||void 0===l||l.container.addEventListener("mousedown",(e=>{e.preventDefault()})),s.emit("ready",d)},h=()=>{const e={};if(""!==o.theme&&(e.theme=o.theme),o.readOnly&&(e.readOnly=o.readOnly),o.placeholder&&(e.placeholder=o.placeholder),o.toolbar&&""!==o.toolbar&&(e.modules={toolbar:{container:[...u.full,["ocr"],[{math:!0}]],handlers:{ocr:function(){console.log("ocr"),s.emit("ocr")},math:function(){s.emit("math")}}}}),o.modules){const t=(()=>{var e,t;const l={};if(Array.isArray(o.modules))for(const n of o.modules)l[n.name]=null!==(e=n.options)&&void 0!==e?e:{};else l[o.modules.name]=null!==(t=o.modules.options)&&void 0!==t?t:{};return l})();e.modules=Object.assign({},e.modules,t)}return Object.assign({},o.globalOptions,o.options,e)},Q=e=>"object"==typeof e&&e?e.slice():e;let v;const f=e=>{if(typeof v==typeof e){if(e===v)return!0;if("object"==typeof e&&e&&"object"==typeof v&&v)return t=v.diff(e),!Object.values(t.ops).some((e=>!e.retain||1!==Object.keys(e).length))}var t;return!1},y=(e,t,l)=>{v=Q(w()),f(o.content)||s.emit("update:content",v),s.emit("textChange",{delta:e,oldContents:t,source:l})},b=r(),L=(e,t,o)=>{var l;b.value=!!(null==d?void 0:d.hasFocus());const n=null===(l=null==d?void 0:d.getModule("toolbar"))||void 0===l?void 0:l.container;n&&(n.style.display=b.value?"flex":"none"),s.emit("selectionChange",{range:e,oldRange:t,source:o})};i(b,(e=>{s.emit(e?"focus":"blur",m)}));const C=(...e)=>{"text-change"===e[0]&&s.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&s.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},w=(e,t)=>"html"===o.contentType?T():"text"===o.contentType?M(e,t):null==d?void 0:d.getContents(e,t),x=(e,l="api")=>{const n=e||("delta"===o.contentType?new t:"");"html"===o.contentType?q(n):"text"===o.contentType?O(n,l):null==d||d.setContents(n,l),v=Q(n)},M=(e,t)=>{var o;return null!==(o=null==d?void 0:d.getText(e,t))&&void 0!==o?o:""},O=(e,t="api")=>{null==d||d.setText(e,t)},T=()=>{var e;return null!==(e=null==d?void 0:d.root.innerHTML)&&void 0!==e?e:""},q=e=>{d&&(d.root.innerHTML=e)};return i((()=>o.content),(e=>{if(!d||!e||f(e))return;const t=d.getSelection();t&&a((()=>null==d?void 0:d.setSelection(t))),x(e)}),{deep:!0}),i((()=>o.enable),(e=>{d&&d.enable(e)})),{editor:m,getEditor:()=>m.value,getToolbar:()=>{var e;return null===(e=null==d?void 0:d.getModule("toolbar"))||void 0===e?void 0:e.container},getQuill:()=>{if(d)return d;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:w,setContents:x,getHTML:T,setHTML:q,pasteHTML:(e,t="api")=>{const o=null==d?void 0:d.clipboard.convert(e);o&&(null==d||d.setContents(o,t))},focus:()=>{null==d||d.focus()},getText:M,setText:O,reinit:()=>{a((()=>{var e;!s.slots.toolbar&&d&&(null===(e=d.getModule("toolbar"))||void 0===e||e.container.remove()),p()}))}}},render(){var e,t;return[s("div",{class:"quill-editor-container",style:{minHeight:`${this.$props.minHeight}px`}},[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),s("div",{ref:"editor",...this.$attrs})])]}});export{c as QuillEditor};
12
+ import e from"quill";export{default as Quill}from"quill";import t from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as o,onMounted as l,onBeforeUnmount as n,ref as r,computed as i,watch as a,nextTick as s,h as d}from"vue";import u from"quill-blot-formatter";const c={full:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["image"]]},m=o({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1,default:"请输入内容"},minHeight:{type:Number,required:!1,default:40},needBorder:{type:Boolean,default:!0},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,validator:e=>!!e&&("string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(c).indexOf(e)))},modules:{type:Object,required:!1,default:()=>({name:"blotFormatter",module:u})},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready","ocr","math"],setup:(o,d)=>{let u,m;l((()=>{Q()})),n((()=>{u=null}));const g=r(),p=i((()=>({minHeight:`${o.minHeight}px`}))),h=(t,o)=>{e.register(t,o)},Q=()=>{var t,l;if(!g.value)return;u=new e(g.value,m);const n=null===(t=null==u?void 0:u.getModule("toolbar"))||void 0===t?void 0:t.container;n&&(n.style.display="none");const r=e.import("ui/icons");if(r.ocr='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M3.0000245140625,2.6000244140625L5.5000243140625,2.6000244140625C5.8313951140625,2.6000244140625,6.1000242140625,2.3313953240625,6.1000242140625,2.0000244340625C6.1000242140625,1.6686535440624999,5.8313951140625,1.4000244140625,5.5000243140625,1.4000244140625L3.0000245140625,1.4000244140625Q2.3372827740625,1.4000244140625,1.8686535940625,1.8686535940625Q1.4000244140625,2.3372827740625,1.4000244140625,3.0000245140625L1.4000244140625,5.5000243140625C1.4000244140625,5.8313951140625,1.6686535440624999,6.1000242140625,2.0000244340625,6.1000242140625C2.3313953240625,6.1000242140625,2.6000244140625,5.8313951140625,2.6000244140625,5.5000243140625L2.6000244140625,3.0000245140625Q2.6000244140625,2.6000244140625,3.0000245140625,2.6000244140625ZM12.5000244140625,1.4000244140625L15.0000244140625,1.4000244140625Q15.6627664140625,1.4000244140625,16.1313954140625,1.8686538940625Q16.6000244140625,2.3372834940625,16.6000244140625,3.0000245140625L16.6000244140625,5.5000243140625C16.6000244140625,5.6591539140625,16.5368104140625,5.8117661140625,16.424288414062502,5.9242883140625C16.3117674140625,6.0368099140625,16.1591544140625,6.1000242140625,16.0000244140625,6.1000242140625C15.6686534140625,6.1000242140625,15.4000244140625,5.8313951140625,15.4000244140625,5.5000243140625L15.4000234140625,3.0000245140625Q15.4000234140625,2.6000244140625,15.0000244140625,2.6000244140625L12.5000244140625,2.6000244140625C12.1686534140625,2.6000244140625,11.9000244140625,2.3313953240625,11.9000244140625,2.0000244340625C11.9000244140625,1.6686535440624999,12.1686534140625,1.4000244140625,12.5000244140625,1.4000244140625ZM8.6239776140625,6.4719930140625C8.5439777140625,6.1512432140625,8.3999777140625,5.7421179140625,8.2479777140625,5.4212432140625L9.4959774140625,5.052368214062501C9.6959782140625,5.4293680140625,9.9199772140625,5.9346180140625,9.9999771140625,6.2714929140625L9.3519778140625,6.4719930140625L12.7119784140625,6.4719930140625L12.7119784140625,7.6079931140625L11.5039774140625,7.6079931140625C11.1279774140625,8.6968679140625,10.6159782140625,9.6014929140625,9.9599781140625,10.3461180140625C10.7599773140625,10.9224930140625,11.7279774140625,11.3468685140625,12.8879774140625,11.6029934140625C12.6239774140625,11.8592434140625,12.2799774140625,12.3716184140625,12.1039784140625,12.6918684140625C10.8719778140625,12.3716184140625,9.8719778140625,11.8752434140625,9.0479779140625,11.2107429140625C8.175977714062501,11.8992434140625,7.1199779140625,12.4036184140625,5.8559775140625,12.7558684140625C5.7279777140625,12.4757434140625,5.3759775140625,11.9312434140625,5.1519775140625,11.6591184140625C6.3759775140625,11.3868685140625,7.3839779140625,10.9706182140625,8.1839781140625,10.3781185140625C7.5199776140625,9.6094932140625,7.0079775140625,8.6888685140625,6.5919776140625,7.6079931140625L5.3279776140625,7.6079931140625L5.3279776140625,6.4719930140625L8.6239776140625,6.4719930140625ZM7.7999778140625,7.6079931140625C8.1119776140625,8.344617814062499,8.5359778140625,9.0011186140625,9.0719776140625,9.5694933140625C9.5439777140625,9.0251179140625,9.9199772140625,8.3766184140625,10.1919784140625,7.6079931140625L7.7999778140625,7.6079931140625ZM2.6000244140625,12.5000244140625L2.6000244140625,15.0000244140625Q2.6000244140625,15.4000234140625,3.0000245140625,15.4000234140625L5.5000243140625,15.4000234140625C5.8313951140625,15.4000244140625,6.1000242140625,15.6686534140625,6.1000242140625,16.0000244140625C6.1000242140625,16.3313964140625,5.8313951140625,16.6000254140625,5.5000243140625,16.6000254140625L5.4989548140625,16.6000244140625L3.0000245140625,16.6000244140625Q2.3372834940625,16.6000244140625,1.8686538940625,16.1313954140625Q1.4000244140625,15.6627664140625,1.4000244140625,15.0000244140625L1.4000244140625,12.5000244140625C1.4000244140625,12.1686534140625,1.6686535440624999,11.9000244140625,2.0000244340625,11.9000244140625C2.3313953240625,11.9000244140625,2.6000244140625,12.1686534140625,2.6000244140625,12.5000244140625ZM16.6000244140625,12.5010944140625L16.6000244140625,15.0000244140625Q16.6000244140625,15.6627654140625,16.1313954140625,16.1313954140625Q15.6627654140625,16.6000244140625,15.0000244140625,16.6000244140625L12.5000244140625,16.6000244140625C12.3408944140625,16.6000244140625,12.1882824140625,16.5368104140625,12.0757594140625,16.424288414062502C11.9632384140625,16.3117664140625,11.9000244140625,16.1591544140625,11.9000244140625,16.0000244140625C11.9000244140625,15.6686534140625,12.1686534140625,15.4000244140625,12.5000244140625,15.4000244140625L15.0000244140625,15.4000234140625Q15.4000234140625,15.4000234140625,15.4000234140625,15.0000244140625L15.4000234140625,12.5000244140625C15.4000244140625,12.1686534140625,15.6686534140625,11.9000244140625,16.0000244140625,11.9000244140625C16.3313964140625,11.9000244140625,16.6000254140625,12.1686534140625,16.6000254140625,12.5000244140625L16.6000244140625,12.5010944140625Z" fill-rule="evenodd" fill="#333333" fill-opacity="1"/></g></g></svg>',r.math='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>',m=v(),o.modules)if(Array.isArray(o.modules))for(const e of o.modules)h(`modules/${e.name}`,e.module);else h(`modules/${o.modules.name}`,o.modules.module);u=new e(g.value,m),O(o.content),u.on("text-change",L),u.on("selection-change",w),u.on("editor-change",x),"bubble"!==o.theme&&g.value.classList.remove("ql-bubble"),"snow"!==o.theme&&g.value.classList.remove("ql-snow"),null===(l=u.getModule("toolbar"))||void 0===l||l.container.addEventListener("mousedown",(e=>{e.preventDefault()})),d.emit("ready",u)},v=()=>{const e={};if(""!==o.theme&&(e.theme=o.theme),o.readOnly&&(e.readOnly=o.readOnly),o.placeholder&&(e.placeholder=o.placeholder),o.toolbar&&""!==o.toolbar&&(e.modules={toolbar:{container:[...c.full,["ocr"],[{math:!0}]],handlers:{ocr:function(){console.log("ocr"),d.emit("ocr")},math:function(){d.emit("math")}}}}),o.modules){const t=(()=>{var e,t;const l={};if(Array.isArray(o.modules))for(const n of o.modules)l[n.name]=null!==(e=n.options)&&void 0!==e?e:{};else l[o.modules.name]=null!==(t=o.modules.options)&&void 0!==t?t:{};return l})();e.modules=Object.assign({},e.modules,t)}return Object.assign({},o.globalOptions,o.options,e)},f=e=>"object"==typeof e&&e?e.slice():e;let y;const b=e=>{if(typeof y==typeof e){if(e===y)return!0;if("object"==typeof e&&e&&"object"==typeof y&&y)return t=y.diff(e),!Object.values(t.ops).some((e=>!e.retain||1!==Object.keys(e).length))}var t;return!1},L=(e,t,l)=>{y=f(M()),b(o.content)||d.emit("update:content",y),d.emit("textChange",{delta:e,oldContents:t,source:l})},C=r(),w=(e,t,o)=>{var l;C.value=!!(null==u?void 0:u.hasFocus());const n=null===(l=null==u?void 0:u.getModule("toolbar"))||void 0===l?void 0:l.container;n&&(n.style.display=C.value?"flex":"none"),d.emit("selectionChange",{range:e,oldRange:t,source:o})};a(C,(e=>{d.emit(e?"focus":"blur",g)}));const x=(...e)=>{"text-change"===e[0]&&d.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&d.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},M=(e,t)=>"html"===o.contentType?j():"text"===o.contentType?T(e,t):null==u?void 0:u.getContents(e,t),O=(e,l="api")=>{const n=e||("delta"===o.contentType?new t:"");"html"===o.contentType?F(n):"text"===o.contentType?q(n,l):null==u||u.setContents(n,l),y=f(n)},T=(e,t)=>{var o;return null!==(o=null==u?void 0:u.getText(e,t))&&void 0!==o?o:""},q=(e,t="api")=>{null==u||u.setText(e,t)},j=()=>{var e;return null!==(e=null==u?void 0:u.root.innerHTML)&&void 0!==e?e:""},F=e=>{u&&(u.root.innerHTML=e)};return a((()=>o.content),(e=>{if(!u||!e||b(e))return;const t=u.getSelection();t&&s((()=>null==u?void 0:u.setSelection(t))),O(e)}),{deep:!0}),a((()=>o.enable),(e=>{u&&u.enable(e)})),{editor:g,getEditor:()=>g.value,getToolbar:()=>{var e;return null===(e=null==u?void 0:u.getModule("toolbar"))||void 0===e?void 0:e.container},getQuill:()=>{if(u)return u;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:M,setContents:O,getHTML:j,setHTML:F,pasteHTML:(e,t="api")=>{const o=null==u?void 0:u.clipboard.convert(e);o&&(null==u||u.setContents(o,t))},focus:()=>{null==u||u.focus()},getText:T,setText:q,reinit:()=>{s((()=>{var e;!d.slots.toolbar&&u&&(null===(e=u.getModule("toolbar"))||void 0===e||e.container.remove()),Q()}))},editorStyleFilter:p}},render(){var e,t;return[d("div",{class:"quill-editor-container "+(this.$props.needBorder?"need-border":""),style:this.editorStyleFilter},[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),d("div",{ref:"editor",...this.$attrs})])]}});export{m as QuillEditor};
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-20T10:40:06.224Z
10
+ * Date: 2025-08-21T03:23:56.124Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -18784,11 +18784,11 @@
18784
18784
  value: true
18785
18785
  });
18786
18786
 
18787
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18787
+ var _createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18788
18788
 
18789
18789
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18790
18790
 
18791
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18791
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18792
18792
 
18793
18793
  var LEFT_ALIGN = 'left';
18794
18794
  var CENTER_ALIGN = 'center';
@@ -18799,7 +18799,7 @@
18799
18799
  var _this = this,
18800
18800
  _alignments;
18801
18801
 
18802
- _classCallCheck(this, DefaultAligner);
18802
+ _classCallCheck$1(this, DefaultAligner);
18803
18803
 
18804
18804
  this.applyStyle = options.aligner.applyStyle;
18805
18805
  this.alignAttribute = options.attribute;
@@ -18827,7 +18827,7 @@
18827
18827
  }), _alignments);
18828
18828
  }
18829
18829
 
18830
- _createClass(DefaultAligner, [{
18830
+ _createClass$1(DefaultAligner, [{
18831
18831
  key: 'getAlignments',
18832
18832
  value: function getAlignments() {
18833
18833
  var _this2 = this;
@@ -19130,190 +19130,182 @@
19130
19130
  return AlignAction;
19131
19131
  }
19132
19132
 
19133
- var ResizeAction = {};
19134
-
19135
- var hasRequiredResizeAction;
19133
+ var ResizeAction$1 = {};
19136
19134
 
19137
- function requireResizeAction () {
19138
- if (hasRequiredResizeAction) return ResizeAction;
19139
- hasRequiredResizeAction = 1;
19140
-
19141
- Object.defineProperty(ResizeAction, "__esModule", {
19142
- value: true
19143
- });
19135
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19136
+ value: true
19137
+ });
19144
19138
 
19145
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19139
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19146
19140
 
19147
- var _Action2 = requireAction();
19141
+ var _Action2 = requireAction();
19148
19142
 
19149
- var _Action3 = _interopRequireDefault(_Action2);
19143
+ var _Action3 = _interopRequireDefault(_Action2);
19150
19144
 
19151
- var _BlotFormatter = requireBlotFormatter();
19145
+ var _BlotFormatter = requireBlotFormatter();
19152
19146
 
19153
- _interopRequireDefault(_BlotFormatter);
19147
+ _interopRequireDefault(_BlotFormatter);
19154
19148
 
19155
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19149
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19156
19150
 
19157
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19151
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19158
19152
 
19159
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19153
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19160
19154
 
19161
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19155
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19162
19156
 
19163
- var ResizeAction$1 = function (_Action) {
19164
- _inherits(ResizeAction, _Action);
19157
+ var ResizeAction = function (_Action) {
19158
+ _inherits(ResizeAction, _Action);
19165
19159
 
19166
- function ResizeAction(formatter) {
19167
- _classCallCheck(this, ResizeAction);
19160
+ function ResizeAction(formatter) {
19161
+ _classCallCheck(this, ResizeAction);
19168
19162
 
19169
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19163
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19170
19164
 
19171
- _this.onMouseDown = function (event) {
19172
- if (!(event.target instanceof HTMLElement)) {
19173
- return;
19174
- }
19175
- _this.dragHandle = event.target;
19176
- _this.setCursor(_this.dragHandle.style.cursor);
19165
+ _this.onMouseDown = function (event) {
19166
+ if (!(event.target instanceof HTMLElement)) {
19167
+ return;
19168
+ }
19169
+ _this.dragHandle = event.target;
19170
+ _this.setCursor(_this.dragHandle.style.cursor);
19177
19171
 
19178
- if (!_this.formatter.currentSpec) {
19179
- return;
19180
- }
19172
+ if (!_this.formatter.currentSpec) {
19173
+ return;
19174
+ }
19181
19175
 
19182
- var target = _this.formatter.currentSpec.getTargetElement();
19183
- if (!target) {
19184
- return;
19185
- }
19176
+ var target = _this.formatter.currentSpec.getTargetElement();
19177
+ if (!target) {
19178
+ return;
19179
+ }
19186
19180
 
19187
- var rect = target.getBoundingClientRect();
19181
+ var rect = target.getBoundingClientRect();
19188
19182
 
19189
- _this.dragStartX = event.clientX;
19190
- _this.preDragWidth = rect.width;
19191
- _this.targetRatio = rect.height / rect.width;
19183
+ _this.dragStartX = event.clientX;
19184
+ _this.preDragWidth = rect.width;
19185
+ _this.targetRatio = rect.height / rect.width;
19192
19186
 
19193
- document.addEventListener('mousemove', _this.onDrag);
19194
- document.addEventListener('mouseup', _this.onMouseUp);
19195
- };
19187
+ document.addEventListener('mousemove', _this.onDrag);
19188
+ document.addEventListener('mouseup', _this.onMouseUp);
19189
+ };
19196
19190
 
19197
- _this.onDrag = function (event) {
19198
- if (!_this.formatter.currentSpec) {
19199
- return;
19200
- }
19191
+ _this.onDrag = function (event) {
19192
+ if (!_this.formatter.currentSpec) {
19193
+ return;
19194
+ }
19201
19195
 
19202
- var target = _this.formatter.currentSpec.getTargetElement();
19203
- if (!target) {
19204
- return;
19205
- }
19196
+ var target = _this.formatter.currentSpec.getTargetElement();
19197
+ if (!target) {
19198
+ return;
19199
+ }
19206
19200
 
19207
- var deltaX = event.clientX - _this.dragStartX;
19208
- var newWidth = 0;
19201
+ var deltaX = event.clientX - _this.dragStartX;
19202
+ var newWidth = 0;
19209
19203
 
19210
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19211
- newWidth = Math.round(_this.preDragWidth - deltaX);
19212
- } else {
19213
- newWidth = Math.round(_this.preDragWidth + deltaX);
19214
- }
19204
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19205
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19206
+ } else {
19207
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19208
+ }
19215
19209
 
19216
- var newHeight = _this.targetRatio * newWidth;
19210
+ var newHeight = _this.targetRatio * newWidth;
19217
19211
 
19218
- target.setAttribute('width', '' + newWidth);
19219
- target.setAttribute('height', '' + newHeight);
19212
+ target.setAttribute('width', '' + newWidth);
19213
+ target.setAttribute('height', '' + newHeight);
19220
19214
 
19221
- _this.formatter.update();
19222
- };
19215
+ _this.formatter.update();
19216
+ };
19223
19217
 
19224
- _this.onMouseUp = function () {
19225
- _this.setCursor('');
19226
- document.removeEventListener('mousemove', _this.onDrag);
19227
- document.removeEventListener('mouseup', _this.onMouseUp);
19228
- };
19218
+ _this.onMouseUp = function () {
19219
+ _this.setCursor('');
19220
+ document.removeEventListener('mousemove', _this.onDrag);
19221
+ document.removeEventListener('mouseup', _this.onMouseUp);
19222
+ };
19229
19223
 
19230
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19231
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19232
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19233
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19234
- _this.dragHandle = null;
19235
- _this.dragStartX = 0;
19236
- _this.preDragWidth = 0;
19237
- _this.targetRatio = 0;
19238
- return _this;
19239
- }
19224
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19225
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19226
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19227
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19228
+ _this.dragHandle = null;
19229
+ _this.dragStartX = 0;
19230
+ _this.preDragWidth = 0;
19231
+ _this.targetRatio = 0;
19232
+ return _this;
19233
+ }
19240
19234
 
19241
- _createClass(ResizeAction, [{
19242
- key: 'onCreate',
19243
- value: function onCreate() {
19244
- this.formatter.overlay.appendChild(this.topLeftHandle);
19245
- this.formatter.overlay.appendChild(this.topRightHandle);
19246
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19247
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19235
+ _createClass(ResizeAction, [{
19236
+ key: 'onCreate',
19237
+ value: function onCreate() {
19238
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19239
+ this.formatter.overlay.appendChild(this.topRightHandle);
19240
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19241
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19248
19242
 
19249
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19250
- }
19251
- }, {
19252
- key: 'onDestroy',
19253
- value: function onDestroy() {
19254
- this.setCursor('');
19255
- this.formatter.overlay.removeChild(this.topLeftHandle);
19256
- this.formatter.overlay.removeChild(this.topRightHandle);
19257
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19258
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19259
- }
19260
- }, {
19261
- key: 'createHandle',
19262
- value: function createHandle(position, cursor) {
19263
- var box = document.createElement('div');
19264
- box.classList.add(this.formatter.options.resize.handleClassName);
19265
- box.setAttribute('data-position', position);
19266
- box.style.cursor = cursor;
19267
-
19268
- if (this.formatter.options.resize.handleStyle) {
19269
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19270
- }
19243
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19244
+ }
19245
+ }, {
19246
+ key: 'onDestroy',
19247
+ value: function onDestroy() {
19248
+ this.setCursor('');
19249
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19250
+ this.formatter.overlay.removeChild(this.topRightHandle);
19251
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19252
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19253
+ }
19254
+ }, {
19255
+ key: 'createHandle',
19256
+ value: function createHandle(position, cursor) {
19257
+ var box = document.createElement('div');
19258
+ box.classList.add(this.formatter.options.resize.handleClassName);
19259
+ box.setAttribute('data-position', position);
19260
+ box.style.cursor = cursor;
19261
+
19262
+ if (this.formatter.options.resize.handleStyle) {
19263
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19264
+ }
19271
19265
 
19272
- box.addEventListener('mousedown', this.onMouseDown);
19266
+ box.addEventListener('mousedown', this.onMouseDown);
19273
19267
 
19274
- return box;
19275
- }
19276
- }, {
19277
- key: 'repositionHandles',
19278
- value: function repositionHandles(handleStyle) {
19279
- var handleXOffset = '0px';
19280
- var handleYOffset = '0px';
19281
- if (handleStyle) {
19282
- if (handleStyle.width) {
19283
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19284
- }
19285
- if (handleStyle.height) {
19286
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19287
- }
19288
- }
19268
+ return box;
19269
+ }
19270
+ }, {
19271
+ key: 'repositionHandles',
19272
+ value: function repositionHandles(handleStyle) {
19273
+ var handleXOffset = '0px';
19274
+ var handleYOffset = '0px';
19275
+ if (handleStyle) {
19276
+ if (handleStyle.width) {
19277
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19278
+ }
19279
+ if (handleStyle.height) {
19280
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19281
+ }
19282
+ }
19289
19283
 
19290
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19291
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19292
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19293
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19294
- }
19295
- }, {
19296
- key: 'setCursor',
19297
- value: function setCursor(value) {
19298
- if (document.body) {
19299
- document.body.style.cursor = value;
19300
- }
19284
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19285
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19286
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19287
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19288
+ }
19289
+ }, {
19290
+ key: 'setCursor',
19291
+ value: function setCursor(value) {
19292
+ if (document.body) {
19293
+ document.body.style.cursor = value;
19294
+ }
19301
19295
 
19302
- if (this.formatter.currentSpec) {
19303
- var target = this.formatter.currentSpec.getOverlayElement();
19304
- if (target) {
19305
- target.style.cursor = value;
19306
- }
19307
- }
19308
- }
19309
- }]);
19296
+ if (this.formatter.currentSpec) {
19297
+ var target = this.formatter.currentSpec.getOverlayElement();
19298
+ if (target) {
19299
+ target.style.cursor = value;
19300
+ }
19301
+ }
19302
+ }
19303
+ }]);
19310
19304
 
19311
- return ResizeAction;
19312
- }(_Action3.default);
19305
+ return ResizeAction;
19306
+ }(_Action3.default);
19313
19307
 
19314
- ResizeAction.default = ResizeAction$1;
19315
- return ResizeAction;
19316
- }
19308
+ ResizeAction$1.default = ResizeAction;
19317
19309
 
19318
19310
  var DeleteAction = {};
19319
19311
 
@@ -19420,7 +19412,7 @@
19420
19412
 
19421
19413
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19422
19414
 
19423
- var _ResizeAction = requireResizeAction();
19415
+ var _ResizeAction = ResizeAction$1;
19424
19416
 
19425
19417
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19426
19418
 
@@ -19913,7 +19905,7 @@
19913
19905
  }
19914
19906
  });
19915
19907
 
19916
- var _ResizeAction = requireResizeAction();
19908
+ var _ResizeAction = ResizeAction$1;
19917
19909
 
19918
19910
  Object.defineProperty(exports, 'ResizeAction', {
19919
19911
  enumerable: true,
@@ -19993,7 +19985,11 @@
19993
19985
  minHeight: {
19994
19986
  type: Number,
19995
19987
  required: false,
19996
- default: 90,
19988
+ default: 40,
19989
+ },
19990
+ needBorder: {
19991
+ type: Boolean,
19992
+ default: true,
19997
19993
  },
19998
19994
  theme: {
19999
19995
  type: String,
@@ -20056,6 +20052,11 @@
20056
20052
  let quill;
20057
20053
  let options;
20058
20054
  const editor = vue.ref();
20055
+ const editorStyleFilter = vue.computed(() => {
20056
+ return {
20057
+ minHeight: `${props.minHeight}px`,
20058
+ };
20059
+ });
20059
20060
  // Register Module if not already registered
20060
20061
  const registerModule = (moduleName, module) => {
20061
20062
  // For Quill 1.x, we can't check if module is already registered
@@ -20329,12 +20330,13 @@
20329
20330
  getText,
20330
20331
  setText,
20331
20332
  reinit,
20333
+ editorStyleFilter,
20332
20334
  };
20333
20335
  },
20334
20336
  render() {
20335
20337
  var _a, _b;
20336
20338
  return [
20337
- vue.h('div', { class: 'quill-editor-container', style: { minHeight: `${this.$props.minHeight}px` } }, [
20339
+ vue.h('div', { class: `quill-editor-container ${this.$props.needBorder ? 'need-border' : ''}`, style: this.editorStyleFilter }, [
20338
20340
  (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
20339
20341
  vue.h('div', { ref: 'editor', ...this.$attrs }),
20340
20342
  ]),