officialblock 3.2.7 → 3.2.8

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.
@@ -2834,7 +2834,7 @@ const aC = ["innerHTML"], sC = ["innerHTML"], iC = /* @__PURE__ */ ve({
2834
2834
  },
2835
2835
  emits: ["update:show"],
2836
2836
  setup(t, { emit: e }) {
2837
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
2837
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
2838
2838
  animation: 200,
2839
2839
  group: "item",
2840
2840
  disabled: !1,
@@ -5691,7 +5691,7 @@ const aC = ["innerHTML"], sC = ["innerHTML"], iC = /* @__PURE__ */ ve({
5691
5691
  },
5692
5692
  emits: ["update:show"],
5693
5693
  setup(t, { emit: e }) {
5694
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
5694
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
5695
5695
  animation: 200,
5696
5696
  group: "gallerys",
5697
5697
  // 链接专用分组
@@ -7327,7 +7327,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
7327
7327
  },
7328
7328
  emits: ["update:show"],
7329
7329
  setup(t, { emit: e }) {
7330
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
7330
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
7331
7331
  animation: 200,
7332
7332
  group: "gallerys",
7333
7333
  // 链接专用分组
@@ -8743,7 +8743,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
8743
8743
  },
8744
8744
  emits: ["update:show"],
8745
8745
  setup(t, { emit: e }) {
8746
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
8746
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
8747
8747
  animation: 200,
8748
8748
  group: "btns",
8749
8749
  // 链接专用分组
@@ -9614,7 +9614,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
9614
9614
  }
9615
9615
  },
9616
9616
  setup(t) {
9617
- const e = et(() => import("vuedraggable")), n = et(() => import("./index-upVs81QV.mjs")), a = N(!1), s = W(() => d.locale === "sc" ? `按钮(最多${d.maxNum}个)` : d.locale === "hk" ? `按鈕(最多${d.maxNum}個)` : `Buttons(max ${d.maxNum})`), i = W(() => ({
9617
+ const e = et(() => import("vuedraggable")), n = et(() => import("./index-bszz-Wsq.mjs")), a = N(!1), s = W(() => d.locale === "sc" ? `按钮(最多${d.maxNum}个)` : d.locale === "hk" ? `按鈕(最多${d.maxNum}個)` : `Buttons(max ${d.maxNum})`), i = W(() => ({
9618
9618
  animation: 200,
9619
9619
  group: "buttons",
9620
9620
  // 按钮专用分组
@@ -11724,7 +11724,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
11724
11724
  },
11725
11725
  emits: ["update:show"],
11726
11726
  setup(t, { emit: e }) {
11727
- const n = et(() => import("./index-upVs81QV.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
11727
+ const n = et(() => import("./index-bszz-Wsq.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
11728
11728
  i("update:show", !1);
11729
11729
  };
11730
11730
  return (o, d) => {
@@ -13396,7 +13396,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
13396
13396
  },
13397
13397
  emits: ["update:show"],
13398
13398
  setup(t, { emit: e }) {
13399
- const n = et(() => import("./index-upVs81QV.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
13399
+ const n = et(() => import("./index-bszz-Wsq.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
13400
13400
  i("update:show", !1);
13401
13401
  };
13402
13402
  return (o, d) => {
@@ -13623,7 +13623,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
13623
13623
  },
13624
13624
  emits: ["update:show"],
13625
13625
  setup(t, { emit: e }) {
13626
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
13626
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
13627
13627
  animation: 200,
13628
13628
  group: "links",
13629
13629
  // 链接专用分组
@@ -14036,7 +14036,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
14036
14036
  },
14037
14037
  emits: ["update:show"],
14038
14038
  setup(t, { emit: e }) {
14039
- const n = et(() => import("./index-upVs81QV.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
14039
+ const n = et(() => import("./index-bszz-Wsq.mjs")), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
14040
14040
  i("update:show", !1);
14041
14041
  };
14042
14042
  return (o, d) => {
@@ -14583,7 +14583,7 @@ const Xx = { class: "gallery-container gallery-timeline container-content" }, Jx
14583
14583
  },
14584
14584
  emits: ["update:show"],
14585
14585
  setup(t, { emit: e }) {
14586
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
14586
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
14587
14587
  animation: 200,
14588
14588
  group: "gallerys",
14589
14589
  // 链接专用分组
@@ -16362,7 +16362,7 @@ const hn = k1(), CI = k1(), xI = ["onClick"], DI = /* @__PURE__ */ ve({
16362
16362
  },
16363
16363
  emits: ["update:show"],
16364
16364
  setup(t, { emit: e }) {
16365
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
16365
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
16366
16366
  animation: 200,
16367
16367
  group: "gallerys",
16368
16368
  // 链接专用分组
@@ -17664,7 +17664,7 @@ const hn = k1(), CI = k1(), xI = ["onClick"], DI = /* @__PURE__ */ ve({
17664
17664
  emits: ["update:show"],
17665
17665
  setup(t, { emit: e }) {
17666
17666
  const n = et(
17667
- () => import("./index-upVs81QV.mjs")
17667
+ () => import("./index-bszz-Wsq.mjs")
17668
17668
  ), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
17669
17669
  i("update:show", !1);
17670
17670
  };
@@ -19279,7 +19279,7 @@ const hn = k1(), CI = k1(), xI = ["onClick"], DI = /* @__PURE__ */ ve({
19279
19279
  setup(t, { emit: e }) {
19280
19280
  var V;
19281
19281
  const n = et(() => import("vuedraggable")), a = et(
19282
- () => import("./index-upVs81QV.mjs")
19282
+ () => import("./index-bszz-Wsq.mjs")
19283
19283
  ), s = W(() => ({
19284
19284
  animation: 200,
19285
19285
  group: "linkList",
@@ -21781,7 +21781,7 @@ const zU = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAJYCAYAAAApNz8GAA
21781
21781
  emits: ["update:show"],
21782
21782
  setup(t, { emit: e }) {
21783
21783
  const n = et(
21784
- () => import("./index-upVs81QV.mjs")
21784
+ () => import("./index-bszz-Wsq.mjs")
21785
21785
  ), a = et(() => import("vuedraggable")), s = t, { t: i } = Ce(() => s.locale), l = N(!1), o = N(/* @__PURE__ */ new Set()), d = N(/* @__PURE__ */ new Set());
21786
21786
  je(
21787
21787
  () => {
@@ -25011,7 +25011,7 @@ const zU = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAJYCAYAAAApNz8GAA
25011
25011
  },
25012
25012
  emits: ["update:show"],
25013
25013
  setup(t, { emit: e }) {
25014
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
25014
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
25015
25015
  animation: 200,
25016
25016
  group: "data",
25017
25017
  // 专用分组
@@ -25344,7 +25344,7 @@ const zU = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAJYCAYAAAApNz8GAA
25344
25344
  },
25345
25345
  emits: ["update:show"],
25346
25346
  setup(t, { emit: e }) {
25347
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
25347
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
25348
25348
  animation: 200,
25349
25349
  group: "data",
25350
25350
  // 专用分组
@@ -28796,7 +28796,7 @@ const Iq = /* @__PURE__ */ Hi(Pq), Sq = { class: "setting-content" }, Mq = { cla
28796
28796
  emits: ["update:show"],
28797
28797
  setup(t, { emit: e }) {
28798
28798
  const n = et(
28799
- () => import("./index-upVs81QV.mjs")
28799
+ () => import("./index-bszz-Wsq.mjs")
28800
28800
  ), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
28801
28801
  i("update:show", !1);
28802
28802
  };
@@ -28913,7 +28913,8 @@ const Iq = /* @__PURE__ */ Hi(Pq), Sq = { class: "setting-content" }, Mq = { cla
28913
28913
  h(c(n), {
28914
28914
  modelValue: t.data.data.description,
28915
28915
  "onUpdate:modelValue": d[4] || (d[4] = (p) => t.data.data.description = p),
28916
- name: "CustomText_editor_description"
28916
+ name: "CustomText_editor_description",
28917
+ class: "custom-text-editor"
28917
28918
  }, null, 8, ["modelValue"])
28918
28919
  ])
28919
28920
  ]),
@@ -28921,7 +28922,7 @@ const Iq = /* @__PURE__ */ Hi(Pq), Sq = { class: "setting-content" }, Mq = { cla
28921
28922
  }, 8, ["visible"]);
28922
28923
  };
28923
28924
  }
28924
- }), uK = /* @__PURE__ */ pe(dK, [["__scopeId", "data-v-d963ff49"]]), cK = ["id"], hK = ["innerHTML"], gK = ["innerHTML"], fK = /* @__PURE__ */ ve({
28925
+ }), uK = /* @__PURE__ */ pe(dK, [["__scopeId", "data-v-b3be3cfb"]]), cK = ["id"], hK = ["innerHTML"], gK = ["innerHTML"], fK = /* @__PURE__ */ ve({
28925
28926
  name: "CustomText",
28926
28927
  __name: "index",
28927
28928
  props: {
@@ -29053,7 +29054,7 @@ const Iq = /* @__PURE__ */ Hi(Pq), Sq = { class: "setting-content" }, Mq = { cla
29053
29054
  emits: ["update:show"],
29054
29055
  setup(t, { emit: e }) {
29055
29056
  const n = et(
29056
- () => import("./index-upVs81QV.mjs")
29057
+ () => import("./index-bszz-Wsq.mjs")
29057
29058
  ), a = t, { t: s } = Ce(() => a.locale), i = e, l = () => {
29058
29059
  i("update:show", !1);
29059
29060
  };
@@ -35792,7 +35793,7 @@ const rZ = {
35792
35793
  },
35793
35794
  emits: ["update:show"],
35794
35795
  setup(t, { emit: e }) {
35795
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
35796
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
35796
35797
  animation: 200,
35797
35798
  group: "programmes",
35798
35799
  // 链接专用分组
@@ -77640,7 +77641,7 @@ const Ige = /* @__PURE__ */ Hi(Pge), Sge = { class: "setting-content" }, Mge = {
77640
77641
  },
77641
77642
  emits: ["update:show"],
77642
77643
  setup(t, { emit: e }) {
77643
- const n = et(() => import("vuedraggable")), a = et(() => import("./index-upVs81QV.mjs")), s = N(!1), i = W(() => ({
77644
+ const n = et(() => import("vuedraggable")), a = et(() => import("./index-bszz-Wsq.mjs")), s = N(!1), i = W(() => ({
77644
77645
  animation: 200,
77645
77646
  group: "gallerys",
77646
77647
  disabled: !1,
@@ -1 +1 @@
1
- "use strict";var N=Object.defineProperty;var O=(u,r,i)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i;var c=(u,r,i)=>O(u,typeof r!="symbol"?r+"":r,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),M=require("@wangeditor/editor-for-vue"),A=require("@wangeditor/editor"),T=require("./index-Bb6xC0mV.js"),L=t.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"Please input content..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(u,{expose:r,emit:i}){const a=u,m=i,o=t.shallowRef(),d=t.ref(""),V=t.computed(()=>typeof a.height=="number"?`${a.height}px`:a.height),C=t.inject("handleUpload",()=>{}),F=t.inject("fileUrl",null),y=t.inject("chooseName",null),f=t.ref(""),h=t.ref(null),p=e=>{if(!C){console.warn("Upload: handleUpload function not provided by ancestor");return}if(f.value=e,o.value)try{const l=o.value.selection;l&&(h.value={anchor:{path:[...l.anchor.path],offset:l.anchor.offset},focus:{path:[...l.focus.path],offset:l.focus.offset}})}catch(l){console.warn("保存光标位置失败:",l)}const n=a.name+"_"+e;C(!0,n)};t.watch(()=>a.name,()=>{F.value=null},{deep:!0,immediate:!0}),t.watch(()=>[F==null?void 0:F.value],([e])=>{const n=a.name+"_"+f.value;!e||!y.value||y.value!==n||o.value&&t.nextTick(()=>{var l,v;if(o.value){try{if(o.value.focus(),h.value)try{o.value.select(h.value)}catch(s){console.warn("恢复光标位置失败,使用默认位置:",s)}}catch(s){console.warn("聚焦编辑器失败:",s)}if(f.value==="img"){const g=`<img src="${e}" alt="图片" style="max-width: 100%;">`;(l=o.value)==null||l.dangerouslyInsertHtml(g)}else{const g=`<video src="${e}" controls style="max-width: 100%;"></video>`;(v=o.value)==null||v.dangerouslyInsertHtml(g)}h.value=null,f.value=""}})},{immediate:!1});function S(e){return class{constructor(){c(this,"title");c(this,"tag");c(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){t.nextTick(()=>{console.log("点击了自定义上传图片菜单"),e("img")})}}}function w(e){return class{constructor(){c(this,"title");c(this,"tag");c(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){t.nextTick(()=>{console.log("点击了自定义上传视频菜单"),e("video")})}}}const D={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},E=["#0032A0","#FF0044","#FF8200","#001E60","#E3E3E6","#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E8E8E8","#F5F5F5","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],k={placeholder:a.placeholder,readOnly:a.disabled,maxLength:a.maxLength,MENU_CONF:{color:{colors:E},bgColor:{colors:E}},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},b=Math.random().toString(36).substring(2,9),B=`CustomImageMenu_${b}`,x=`CustomVideoMenu_${b}`,I=e=>{o.value=e;try{const n=S(p),l=w(p),v={key:B,factory(){return new n}},s={key:x,factory(){return new l}};A.Boot.registerMenu(v),A.Boot.registerMenu(s)}catch(n){console.warn("菜单注册失败:",n)}D.insertKeys={index:0,keys:[B,x]},m("created",e)};t.onBeforeUnmount(()=>{const e=o.value;e!=null&&e.destroy()}),t.watch(()=>a.modelValue,e=>{e!==d.value&&(d.value=e||"")},{immediate:!0});const z=e=>{m("update:modelValue",d.value),m("change",e)},H=()=>{o.value=void 0},j=e=>{m("focus",e)},K=e=>{m("blur",e)};return r({editor:o,getHtml:()=>d.value,getText:()=>{var e;return((e=o.value)==null?void 0:e.getText())||""},isEmpty:()=>{var e;return((e=o.value)==null?void 0:e.isEmpty())||!0},clear:()=>{var e;return(e=o.value)==null?void 0:e.clear()},focus:()=>{var e;return(e=o.value)==null?void 0:e.focus()},blur:()=>{var e;return(e=o.value)==null?void 0:e.blur()},disable:()=>{var e;return(e=o.value)==null?void 0:e.disable()},enable:()=>{var e;return(e=o.value)==null?void 0:e.enable()}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["rich-text-editor",e.class])},[t.createVNode(t.unref(M.Toolbar),{class:"editor-toolbar",editor:o.value,defaultConfig:D,mode:u.mode},null,8,["editor","mode"]),t.createVNode(t.unref(M.Editor),{class:"editor-content",style:t.normalizeStyle({height:V.value}),modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=l=>d.value=l),defaultConfig:k,mode:u.mode,onOnCreated:I,onOnChange:z,onOnDestroyed:H,onOnFocus:j,onOnBlur:K},null,8,["style","modelValue","mode"])],2))}}),U=T._(L,[["__scopeId","data-v-c243ccd3"]]);exports.default=U;
1
+ "use strict";var N=Object.defineProperty;var O=(u,r,i)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i;var c=(u,r,i)=>O(u,typeof r!="symbol"?r+"":r,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),M=require("@wangeditor/editor-for-vue"),A=require("@wangeditor/editor"),T=require("./index-DuM_83fz.js"),L=t.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"Please input content..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(u,{expose:r,emit:i}){const a=u,m=i,o=t.shallowRef(),d=t.ref(""),V=t.computed(()=>typeof a.height=="number"?`${a.height}px`:a.height),C=t.inject("handleUpload",()=>{}),F=t.inject("fileUrl",null),y=t.inject("chooseName",null),f=t.ref(""),h=t.ref(null),p=e=>{if(!C){console.warn("Upload: handleUpload function not provided by ancestor");return}if(f.value=e,o.value)try{const l=o.value.selection;l&&(h.value={anchor:{path:[...l.anchor.path],offset:l.anchor.offset},focus:{path:[...l.focus.path],offset:l.focus.offset}})}catch(l){console.warn("保存光标位置失败:",l)}const n=a.name+"_"+e;C(!0,n)};t.watch(()=>a.name,()=>{F.value=null},{deep:!0,immediate:!0}),t.watch(()=>[F==null?void 0:F.value],([e])=>{const n=a.name+"_"+f.value;!e||!y.value||y.value!==n||o.value&&t.nextTick(()=>{var l,v;if(o.value){try{if(o.value.focus(),h.value)try{o.value.select(h.value)}catch(s){console.warn("恢复光标位置失败,使用默认位置:",s)}}catch(s){console.warn("聚焦编辑器失败:",s)}if(f.value==="img"){const g=`<img src="${e}" alt="图片" style="max-width: 100%;">`;(l=o.value)==null||l.dangerouslyInsertHtml(g)}else{const g=`<video src="${e}" controls style="max-width: 100%;"></video>`;(v=o.value)==null||v.dangerouslyInsertHtml(g)}h.value=null,f.value=""}})},{immediate:!1});function S(e){return class{constructor(){c(this,"title");c(this,"tag");c(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){t.nextTick(()=>{console.log("点击了自定义上传图片菜单"),e("img")})}}}function w(e){return class{constructor(){c(this,"title");c(this,"tag");c(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){t.nextTick(()=>{console.log("点击了自定义上传视频菜单"),e("video")})}}}const D={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},E=["#0032A0","#FF0044","#FF8200","#001E60","#E3E3E6","#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E8E8E8","#F5F5F5","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],k={placeholder:a.placeholder,readOnly:a.disabled,maxLength:a.maxLength,MENU_CONF:{color:{colors:E},bgColor:{colors:E}},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},b=Math.random().toString(36).substring(2,9),B=`CustomImageMenu_${b}`,x=`CustomVideoMenu_${b}`,I=e=>{o.value=e;try{const n=S(p),l=w(p),v={key:B,factory(){return new n}},s={key:x,factory(){return new l}};A.Boot.registerMenu(v),A.Boot.registerMenu(s)}catch(n){console.warn("菜单注册失败:",n)}D.insertKeys={index:0,keys:[B,x]},m("created",e)};t.onBeforeUnmount(()=>{const e=o.value;e!=null&&e.destroy()}),t.watch(()=>a.modelValue,e=>{e!==d.value&&(d.value=e||"")},{immediate:!0});const z=e=>{m("update:modelValue",d.value),m("change",e)},H=()=>{o.value=void 0},j=e=>{m("focus",e)},K=e=>{m("blur",e)};return r({editor:o,getHtml:()=>d.value,getText:()=>{var e;return((e=o.value)==null?void 0:e.getText())||""},isEmpty:()=>{var e;return((e=o.value)==null?void 0:e.isEmpty())||!0},clear:()=>{var e;return(e=o.value)==null?void 0:e.clear()},focus:()=>{var e;return(e=o.value)==null?void 0:e.focus()},blur:()=>{var e;return(e=o.value)==null?void 0:e.blur()},disable:()=>{var e;return(e=o.value)==null?void 0:e.disable()},enable:()=>{var e;return(e=o.value)==null?void 0:e.enable()}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["rich-text-editor",e.class])},[t.createVNode(t.unref(M.Toolbar),{class:"editor-toolbar",editor:o.value,defaultConfig:D,mode:u.mode},null,8,["editor","mode"]),t.createVNode(t.unref(M.Editor),{class:"editor-content",style:t.normalizeStyle({height:V.value}),modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=l=>d.value=l),defaultConfig:k,mode:u.mode,onOnCreated:I,onOnChange:z,onOnDestroyed:H,onOnFocus:j,onOnBlur:K},null,8,["style","modelValue","mode"])],2))}}),U=T._(L,[["__scopeId","data-v-c243ccd3"]]);exports.default=U;