officialblock 2.0.4 → 2.0.7

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.
@@ -427,7 +427,7 @@ const qs = { class: "button-text" }, Ks = { class: "link-text" }, Xs = /* @__PUR
427
427
  },
428
428
  emits: ["update:show"],
429
429
  setup(e, { emit: u }) {
430
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
430
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
431
431
  animation: 200,
432
432
  group: "item",
433
433
  disabled: !1,
@@ -2776,7 +2776,7 @@ const qs = { class: "button-text" }, Ks = { class: "link-text" }, Xs = /* @__PUR
2776
2776
  },
2777
2777
  emits: ["update:show"],
2778
2778
  setup(e, { emit: u }) {
2779
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
2779
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
2780
2780
  animation: 200,
2781
2781
  group: "gallerys",
2782
2782
  // 链接专用分组
@@ -4354,7 +4354,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
4354
4354
  },
4355
4355
  emits: ["update:show"],
4356
4356
  setup(e, { emit: u }) {
4357
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
4357
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
4358
4358
  animation: 200,
4359
4359
  group: "gallerys",
4360
4360
  // 链接专用分组
@@ -5234,7 +5234,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
5234
5234
  },
5235
5235
  emits: ["update:show"],
5236
5236
  setup(e, { emit: u }) {
5237
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
5237
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
5238
5238
  animation: 200,
5239
5239
  group: "btns",
5240
5240
  // 链接专用分组
@@ -5978,7 +5978,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
5978
5978
  }
5979
5979
  },
5980
5980
  setup(e) {
5981
- const u = Le(() => import("vuedraggable")), l = Le(() => import("./index-C2I8wj4a.mjs")), n = U(!1), i = N(() => ({
5981
+ const u = Le(() => import("vuedraggable")), l = Le(() => import("./index-DGEjlopB.mjs")), n = U(!1), i = N(() => ({
5982
5982
  animation: 200,
5983
5983
  group: "buttons",
5984
5984
  // 按钮专用分组
@@ -7967,7 +7967,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
7967
7967
  },
7968
7968
  emits: ["update:show"],
7969
7969
  setup(e, { emit: u }) {
7970
- const l = Le(() => import("./index-C2I8wj4a.mjs")), n = u, i = () => {
7970
+ const l = Le(() => import("./index-DGEjlopB.mjs")), n = u, i = () => {
7971
7971
  n("update:show", !1);
7972
7972
  };
7973
7973
  return (s, r) => {
@@ -9343,7 +9343,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
9343
9343
  },
9344
9344
  emits: ["update:show"],
9345
9345
  setup(e, { emit: u }) {
9346
- const l = Le(() => import("./index-C2I8wj4a.mjs")), n = u, i = () => {
9346
+ const l = Le(() => import("./index-DGEjlopB.mjs")), n = u, i = () => {
9347
9347
  n("update:show", !1);
9348
9348
  };
9349
9349
  return (s, r) => {
@@ -9513,7 +9513,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
9513
9513
  },
9514
9514
  emits: ["update:show"],
9515
9515
  setup(e, { emit: u }) {
9516
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
9516
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
9517
9517
  animation: 200,
9518
9518
  group: "links",
9519
9519
  // 链接专用分组
@@ -9839,7 +9839,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
9839
9839
  },
9840
9840
  emits: ["update:show"],
9841
9841
  setup(e, { emit: u }) {
9842
- const l = Le(() => import("./index-C2I8wj4a.mjs")), n = u, i = () => {
9842
+ const l = Le(() => import("./index-DGEjlopB.mjs")), n = u, i = () => {
9843
9843
  n("update:show", !1);
9844
9844
  };
9845
9845
  return (s, r) => {
@@ -10308,7 +10308,7 @@ const pu = { class: "gallery-timeline" }, vu = { class: "gallery-timeline__list"
10308
10308
  },
10309
10309
  emits: ["update:show"],
10310
10310
  setup(e, { emit: u }) {
10311
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
10311
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
10312
10312
  animation: 200,
10313
10313
  group: "gallerys",
10314
10314
  // 链接专用分组
@@ -12097,7 +12097,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
12097
12097
  },
12098
12098
  emits: ["update:show"],
12099
12099
  setup(e, { emit: u }) {
12100
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
12100
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
12101
12101
  animation: 200,
12102
12102
  group: "gallerys",
12103
12103
  // 链接专用分组
@@ -13251,7 +13251,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
13251
13251
  },
13252
13252
  emits: ["update:show"],
13253
13253
  setup(e, { emit: u }) {
13254
- const l = Le(() => import("./index-C2I8wj4a.mjs")), n = u, i = U({
13254
+ const l = Le(() => import("./index-DGEjlopB.mjs")), n = u, i = U({
13255
13255
  title: "",
13256
13256
  content: "",
13257
13257
  imgSrc: "https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"
@@ -14586,7 +14586,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
14586
14586
  setup(e, { emit: u }) {
14587
14587
  var M;
14588
14588
  const l = Le(() => import("vuedraggable")), n = Le(
14589
- () => import("./index-C2I8wj4a.mjs")
14589
+ () => import("./index-DGEjlopB.mjs")
14590
14590
  ), i = N(() => ({
14591
14591
  animation: 200,
14592
14592
  group: "links",
@@ -14945,7 +14945,8 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
14945
14945
  n("handleClick", b);
14946
14946
  }, f = () => {
14947
14947
  var m;
14948
- if (l.modelValue && l.modelValue.list && l.modelValue.list.length) return;
14948
+ if (l.modelValue && l.modelValue.list && l.modelValue.list.length)
14949
+ return;
14949
14950
  const b = {
14950
14951
  id: ((m = l.modelValue) == null ? void 0 : m.id) || z(),
14951
14952
  type: "ScrollKeyInfo",
@@ -15213,7 +15214,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
15213
15214
  ], 64);
15214
15215
  };
15215
15216
  }
15216
- }), fs = /* @__PURE__ */ ae(Gy, [["__scopeId", "data-v-56c2dfb7"]]), qy = { class: "seting-box" }, Ky = ["src"], Xy = { class: "item-uplaod flex items-center" }, Qy = { key: 0 }, Zy = /* @__PURE__ */ le({
15217
+ }), fs = /* @__PURE__ */ ae(Gy, [["__scopeId", "data-v-5e278bf4"]]), qy = { class: "seting-box" }, Ky = ["src"], Xy = { class: "item-uplaod flex items-center" }, Qy = { key: 0 }, Zy = /* @__PURE__ */ le({
15217
15218
  __name: "setting",
15218
15219
  props: {
15219
15220
  show: {
@@ -16611,7 +16612,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
16611
16612
  },
16612
16613
  emits: ["update:show"],
16613
16614
  setup(e, { emit: u }) {
16614
- const l = Le(() => import("./index-C2I8wj4a.mjs")), n = Le(() => import("vuedraggable")), i = e, s = U(!1), r = U(/* @__PURE__ */ new Set()), h = U(/* @__PURE__ */ new Set());
16615
+ const l = Le(() => import("./index-DGEjlopB.mjs")), n = Le(() => import("vuedraggable")), i = e, s = U(!1), r = U(/* @__PURE__ */ new Set()), h = U(/* @__PURE__ */ new Set());
16615
16616
  De(
16616
16617
  () => {
16617
16618
  var C;
@@ -19786,7 +19787,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
19786
19787
  },
19787
19788
  emits: ["update:show"],
19788
19789
  setup(e, { emit: u }) {
19789
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
19790
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
19790
19791
  animation: 200,
19791
19792
  group: "data",
19792
19793
  // 专用分组
@@ -20063,7 +20064,7 @@ const Xt = ss(), ag = ss(), ng = { class: "list-sort" }, og = ["onClick"], sg =
20063
20064
  },
20064
20065
  emits: ["update:show"],
20065
20066
  setup(e, { emit: u }) {
20066
- const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-C2I8wj4a.mjs")), i = U(!1), s = N(() => ({
20067
+ const l = Le(() => import("vuedraggable")), n = Le(() => import("./index-DGEjlopB.mjs")), i = U(!1), s = N(() => ({
20067
20068
  animation: 200,
20068
20069
  group: "data",
20069
20070
  // 专用分组
@@ -0,0 +1 @@
1
+ "use strict";var U=Object.defineProperty;var K=(u,r,i)=>r in u?U(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i;var c=(u,r,i)=>K(u,typeof r!="symbol"?r+"":r,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),B=require("@wangeditor/editor-for-vue"),w=require("@wangeditor/editor"),q=require("./index-D8m0Y8bQ.js"),E={class:"rich-text-editor"},$=t.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"请输入内容..."},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,f=i,o=t.shallowRef(),d=t.ref(""),I=t.computed(()=>typeof a.height=="number"?`${a.height}px`:a.height),p=t.inject("handleUpload",()=>{}),m=t.inject("fileUrl",null),C=t.inject("chooseName",null),h=t.ref(""),v=t.ref(null),b=e=>{if(!p){console.warn("Upload: handleUpload function not provided by ancestor");return}if(h.value=e,o.value)try{const n=o.value.selection;n&&(v.value={anchor:{path:[...n.anchor.path],offset:n.anchor.offset},focus:{path:[...n.focus.path],offset:n.focus.offset}})}catch(n){console.warn("保存光标位置失败:",n)}const l=a.name+"_"+e;p(!0,l)};t.watch(()=>a.name,()=>{m.value=null},{deep:!0,immediate:!0}),t.watch(()=>[m==null?void 0:m.value],([e])=>{const l=a.name+"_"+h.value;!e||!C.value||C.value!==l||o.value&&t.nextTick(()=>{var n,g;if(o.value){try{if(o.value.focus(),v.value)try{o.value.select(v.value)}catch(s){console.warn("恢复光标位置失败,使用默认位置:",s)}}catch(s){console.warn("聚焦编辑器失败:",s)}if(h.value==="img"){const y=`<img src="${e}" alt="图片" style="max-width: 100%;">`;(n=o.value)==null||n.dangerouslyInsertHtml(y)}else{const y=`<video src="${e}" controls style="max-width: 100%;"></video>`;(g=o.value)==null||g.dangerouslyInsertHtml(y)}v.value=null,h.value=""}})},{immediate:!1});function _(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 k(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 x={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","undo","redo","clearStyle","codeBlock"]},H={placeholder:a.placeholder,readOnly:a.disabled,maxLength:a.maxLength,MENU_CONF:{}},M=Math.random().toString(36).substring(2,9),V=`CustomImageMenu_${M}`,S=`CustomVideoMenu_${M}`,j=e=>{o.value=e;try{const l=_(b),n=k(b),g={key:V,factory(){return new l}},s={key:S,factory(){return new n}};w.Boot.registerMenu(g),w.Boot.registerMenu(s)}catch(l){console.warn("菜单注册失败:",l)}x.insertKeys={index:0,keys:[V,S]},f("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=>{f("update:modelValue",d.value),f("change",e)},N=()=>{o.value=void 0},O=e=>{f("focus",e)},T=e=>{f("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,l)=>(t.openBlock(),t.createElementBlock("div",E,[t.createVNode(t.unref(B.Toolbar),{class:"editor-toolbar",editor:o.value,defaultConfig:x,mode:u.mode},null,8,["editor","mode"]),t.createVNode(t.unref(B.Editor),{class:"editor-content",style:t.normalizeStyle({height:I.value}),modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=n=>d.value=n),defaultConfig:H,mode:u.mode,onOnCreated:j,onOnChange:z,onOnDestroyed:N,onOnFocus:O,onOnBlur:T},null,8,["style","modelValue","mode"])]))}}),D=q._($,[["__scopeId","data-v-4b9e21ef"]]);exports.default=D;