officialblock 2.0.4 → 2.0.6

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.
@@ -1,10 +1,10 @@
1
1
  var D = Object.defineProperty;
2
2
  var L = (a, u, c) => u in a ? D(a, u, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[u] = c;
3
3
  var r = (a, u, c) => L(a, typeof u != "symbol" ? u + "" : u, c);
4
- import { defineComponent as A, shallowRef as R, ref as b, computed as q, inject as x, watch as M, nextTick as V, onBeforeUnmount as F, createElementBlock as J, openBlock as G, createVNode as w, unref as H, normalizeStyle as P } from "vue";
4
+ import { defineComponent as A, shallowRef as R, ref as p, computed as F, inject as y, watch as C, nextTick as b, onBeforeUnmount as q, createElementBlock as J, openBlock as G, createVNode as I, unref as H, normalizeStyle as P } from "vue";
5
5
  import { Toolbar as Q, Editor as W } from "@wangeditor/editor-for-vue";
6
6
  import { Boot as z } from "@wangeditor/editor";
7
- import { _ as X } from "./index-BZsfPtt0.mjs";
7
+ import { _ as X } from "./index-BehsQJZ_.mjs";
8
8
  const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
9
9
  __name: "index",
10
10
  props: {
@@ -20,39 +20,39 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
20
20
  },
21
21
  emits: ["update:modelValue", "change", "focus", "blur", "created", "upload-image", "upload-video"],
22
22
  setup(a, { expose: u, emit: c }) {
23
- const n = a, d = c, t = R(), i = b(""), k = q(() => typeof n.height == "number" ? `${n.height}px` : n.height), B = x("handleUpload", () => {
24
- }), m = x("fileUrl", null), g = x("chooseName", null), f = b(""), h = b(null), S = (e) => {
25
- if (!B) {
23
+ const n = a, d = c, t = R(), i = p(""), k = F(() => typeof n.height == "number" ? `${n.height}px` : n.height), x = y("handleUpload", () => {
24
+ }), m = y("fileUrl", null), M = y("chooseName", null), f = p(""), h = p(null), V = (e) => {
25
+ if (!x) {
26
26
  console.warn("Upload: handleUpload function not provided by ancestor");
27
27
  return;
28
28
  }
29
29
  if (f.value = e, t.value)
30
30
  try {
31
- const l = t.value.selection;
32
- l && (h.value = {
31
+ const o = t.value.selection;
32
+ o && (h.value = {
33
33
  anchor: {
34
- path: [...l.anchor.path],
35
- offset: l.anchor.offset
34
+ path: [...o.anchor.path],
35
+ offset: o.anchor.offset
36
36
  },
37
37
  focus: {
38
- path: [...l.focus.path],
39
- offset: l.focus.offset
38
+ path: [...o.focus.path],
39
+ offset: o.focus.offset
40
40
  }
41
41
  });
42
- } catch (l) {
43
- console.warn("保存光标位置失败:", l);
42
+ } catch (o) {
43
+ console.warn("保存光标位置失败:", o);
44
44
  }
45
- const o = n.name + "_" + e;
46
- console.log("🚀 富文本编辑器传递name:", o, "props.name:", n.name), B(!0, o);
45
+ const l = n.name + "_" + e;
46
+ x(!0, l);
47
47
  };
48
- M(() => n.name, (e) => {
49
- console.log("🚀 富文本编辑器name变化:", e), m.value = null;
50
- }, { deep: !0, immediate: !0 }), M(
48
+ C(() => n.name, () => {
49
+ m.value = null;
50
+ }, { deep: !0, immediate: !0 }), C(
51
51
  () => [m == null ? void 0 : m.value],
52
52
  ([e]) => {
53
- const o = n.name + "_" + f.value;
54
- console.log("🚀 富文本编辑器获取信息:", g.value, e, o), !(!e || !g.value || g.value !== o) && (console.log("🚀 富文本编辑器ref:", t.value), t.value && V(() => {
55
- var l, v;
53
+ const l = n.name + "_" + f.value;
54
+ !e || !M.value || M.value !== l || t.value && b(() => {
55
+ var o, v;
56
56
  if (t.value) {
57
57
  try {
58
58
  if (t.value.focus(), h.value)
@@ -65,15 +65,15 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
65
65
  console.warn("聚焦编辑器失败:", s);
66
66
  }
67
67
  if (f.value === "img") {
68
- const C = `<img src="${e}" alt="图片" style="max-width: 100%;">`;
69
- (l = t.value) == null || l.dangerouslyInsertHtml(C);
68
+ const g = `<img src="${e}" alt="图片" style="max-width: 100%;">`;
69
+ (o = t.value) == null || o.dangerouslyInsertHtml(g);
70
70
  } else {
71
- const C = `<video src="${e}" controls style="max-width: 100%;"></video>`;
72
- (v = t.value) == null || v.dangerouslyInsertHtml(C);
71
+ const g = `<video src="${e}" controls style="max-width: 100%;"></video>`;
72
+ (v = t.value) == null || v.dangerouslyInsertHtml(g);
73
73
  }
74
74
  h.value = null, f.value = "";
75
75
  }
76
- }));
76
+ });
77
77
  },
78
78
  { immediate: !1 }
79
79
  );
@@ -95,7 +95,7 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
95
95
  return !1;
96
96
  }
97
97
  exec() {
98
- V(() => {
98
+ b(() => {
99
99
  console.log("点击了自定义上传图片菜单"), e("img");
100
100
  });
101
101
  }
@@ -119,13 +119,13 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
119
119
  return !1;
120
120
  }
121
121
  exec() {
122
- V(() => {
122
+ b(() => {
123
123
  console.log("点击了自定义上传视频菜单"), e("video");
124
124
  });
125
125
  }
126
126
  };
127
127
  }
128
- const _ = {
128
+ const B = {
129
129
  toolbarKeys: [
130
130
  // 菜单 key
131
131
  "headerSelect",
@@ -168,40 +168,40 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
168
168
  "codeBlock"
169
169
  //代码块
170
170
  ]
171
- }, K = {
171
+ }, U = {
172
172
  placeholder: n.placeholder,
173
173
  readOnly: n.disabled,
174
174
  maxLength: n.maxLength,
175
175
  MENU_CONF: {}
176
- }, I = Math.random().toString(36).substring(2, 9), p = `CustomImageMenu_${I}`, y = `CustomVideoMenu_${I}`, U = (e) => {
176
+ }, S = Math.random().toString(36).substring(2, 9), _ = `CustomImageMenu_${S}`, w = `CustomVideoMenu_${S}`, K = (e) => {
177
177
  t.value = e;
178
178
  try {
179
- const o = N(S), l = O(S), v = {
180
- key: p,
179
+ const l = N(V), o = O(V), v = {
180
+ key: _,
181
181
  // 使用唯一的 key
182
182
  factory() {
183
- return new o();
183
+ return new l();
184
184
  }
185
185
  }, s = {
186
- key: y,
186
+ key: w,
187
187
  // 使用唯一的 key
188
188
  factory() {
189
- return new l();
189
+ return new o();
190
190
  }
191
191
  };
192
- z.registerMenu(v), z.registerMenu(s), console.log("自定义菜单注册成功:", p, y);
193
- } catch (o) {
194
- console.warn("菜单注册失败:", o);
192
+ z.registerMenu(v), z.registerMenu(s);
193
+ } catch (l) {
194
+ console.warn("菜单注册失败:", l);
195
195
  }
196
- _.insertKeys = {
196
+ B.insertKeys = {
197
197
  index: 0,
198
- keys: [p, y]
198
+ keys: [_, w]
199
199
  }, d("created", e);
200
200
  };
201
- F(() => {
201
+ q(() => {
202
202
  const e = t.value;
203
203
  e != null && e.destroy();
204
- }), M(
204
+ }), C(
205
205
  () => n.modelValue,
206
206
  (e) => {
207
207
  e !== i.value && (i.value = e || "");
@@ -248,21 +248,21 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
248
248
  var e;
249
249
  return (e = t.value) == null ? void 0 : e.enable();
250
250
  }
251
- }), (e, o) => (G(), J("div", Y, [
252
- w(H(Q), {
251
+ }), (e, l) => (G(), J("div", Y, [
252
+ I(H(Q), {
253
253
  class: "editor-toolbar",
254
254
  editor: t.value,
255
- defaultConfig: _,
255
+ defaultConfig: B,
256
256
  mode: a.mode
257
257
  }, null, 8, ["editor", "mode"]),
258
- w(H(W), {
258
+ I(H(W), {
259
259
  class: "editor-content",
260
260
  style: P({ height: k.value }),
261
261
  modelValue: i.value,
262
- "onUpdate:modelValue": o[0] || (o[0] = (l) => i.value = l),
263
- defaultConfig: K,
262
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => i.value = o),
263
+ defaultConfig: U,
264
264
  mode: a.mode,
265
- onOnCreated: U,
265
+ onOnCreated: K,
266
266
  onOnChange: j,
267
267
  onOnDestroyed: E,
268
268
  onOnFocus: T,
@@ -270,7 +270,7 @@ const Y = { class: "rich-text-editor" }, Z = /* @__PURE__ */ A({
270
270
  }, null, 8, ["style", "modelValue", "mode"])
271
271
  ]));
272
272
  }
273
- }), se = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-b85f2258"]]);
273
+ }), se = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-4b9e21ef"]]);
274
274
  export {
275
275
  se as default
276
276
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-DWO03FuU.js");exports.AlummiCommunityList=l.J;exports.AlummiCommunityListPlugin=l.aG;exports.AnimationUtils=l.aQ;exports.ArticleItem=l.j;exports.ArticleItemPlugin=l.ag;exports.ArticleList=l.A;exports.ArticleListPlugin=l.Z;exports.BannerImage=l.B;exports.BannerImagePlugin=l.$;exports.BannerImageWithLink=l.q;exports.BannerImageWithLinkPlugin=l.aq;exports.BannerPage=l.a;exports.BannerPagePlugin=l.a0;exports.BannerQuote=l.i;exports.BannerQuotePlugin=l.af;exports.BasicCollapse=l.x;exports.BasicCollapsePlugin=l.aA;exports.BlessingMessage=l.K;exports.BlessingMessagePlugin=l.aH;exports.BlessingSlider=l.U;exports.BlessingSliderPlugin=l.aI;exports.BtnList=l.b;exports.BtnListPlugin=l.a1;exports.CardCarousel=l.g;exports.CardCarouselArticlesPlugin=l.av;exports.CardCarouselMultiRow=l.h;exports.CardCarouselMultiRowArticles=l.I;exports.CardCarouselMultiRowArticlesPlugin=l.aF;exports.CardCarouselMultiRowPlugin=l.ae;exports.CardCarouselMultiRowPublications=l.Y;exports.CardCarouselMultiRowPublicationsPlugin=l.aM;exports.CardCarouselPlugin=l.ad;exports.CardShowcase=l.V;exports.CardShowcasePlugin=l.aJ;exports.CardShowcaseProfile=l.l;exports.CardShowcaseProfilePlugin=l.al;exports.CarouselLogo=l.t;exports.CarouselLogoPlugin=l.aw;exports.ContactUsInfo=l.r;exports.ContactUsInfoPlugin=l.as;exports.ContactUsList=l.o;exports.ContactUsListPlugin=l.an;exports.CountDown=l.m;exports.CountDownPlugin=l.am;exports.CustomIframe=l.n;exports.CustomIframePlugin=l.ao;exports.CustomSpace=l.C;exports.CustomSpacePlugin=l.a7;exports.Disc=l.w;exports.DiscPlugin=l.az;exports.DonorLinks=l.D;exports.DonorLinksPlugin=l.ac;exports.ExploreLinks=l.W;exports.ExploreLinksPlugin=l.aK;exports.GalleryBlock=l.F;exports.GalleryBlockPlugin=l.aE;exports.GalleryCaptionRound=l.c;exports.GalleryCaptionRoundPlugin=l.a3;exports.GalleryDefault=l.G;exports.GalleryDefaultPlugin=l.a2;exports.GalleryList=l.f;exports.GalleryListPlugin=l.a8;exports.GalleryTimeline=l.d;exports.GalleryTimelineCol=l.e;exports.GalleryTimelineColPlugin=l.a5;exports.GalleryTimelinePlugin=l.a4;exports.HeroSlide=l.H;exports.HeroSlidePlugin=l.a9;exports.LinkList=l.L;exports.LinkListPlugin=l.aa;exports.MapStatic=l.M;exports.MapStaticPlugin=l.au;exports.MediaLogo=l.z;exports.MediaLogoPlugin=l.aC;exports.NewsList=l.N;exports.NewsListPlugin=l.aj;exports.Process=l.P;exports.ProcessPlugin=l.a6;exports.Publications=l.s;exports.PublicationsPlugin=l.at;exports.QuoteText=l.Q;exports.QuoteTextPlugin=l.ab;exports.RegisterForm=l.E;exports.RegisterFormPlugin=l.aD;exports.Resources=l.u;exports.ResourcesPlugin=l.ax;exports.ResourcesTwo=l.v;exports.ResourcesTwoPlugin=l.ay;exports.ResponsiveUtils=l.aP;exports.RibbonBlock=l.R;exports.RibbonBlockPlugin=l.ah;exports.SchoolLayout=l.X;exports.SchoolLayoutPlugin=l.aL;exports.ScrollKeyInfo=l.S;exports.ScrollKeyInfoPlugin=l.ar;exports.StorageUtils=l.aR;exports.TableCollapse=l.y;exports.TableCollapsePlugin=l.aB;exports.TableTwo=l.p;exports.TableTwoPlugin=l.ap;exports.TheHistoryCarousel=l.k;exports.TheHistoryCarouselPlugin=l.ak;exports.ThemeUtils=l.aO;exports.TimelineStory=l.T;exports.TimelineStoryPlugin=l.ai;exports.default=l.O;exports.useTheme=l.aN;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-D8m0Y8bQ.js");exports.AlummiCommunityList=l.J;exports.AlummiCommunityListPlugin=l.aG;exports.AnimationUtils=l.aQ;exports.ArticleItem=l.j;exports.ArticleItemPlugin=l.ag;exports.ArticleList=l.A;exports.ArticleListPlugin=l.Z;exports.BannerImage=l.B;exports.BannerImagePlugin=l.$;exports.BannerImageWithLink=l.q;exports.BannerImageWithLinkPlugin=l.aq;exports.BannerPage=l.a;exports.BannerPagePlugin=l.a0;exports.BannerQuote=l.i;exports.BannerQuotePlugin=l.af;exports.BasicCollapse=l.x;exports.BasicCollapsePlugin=l.aA;exports.BlessingMessage=l.K;exports.BlessingMessagePlugin=l.aH;exports.BlessingSlider=l.U;exports.BlessingSliderPlugin=l.aI;exports.BtnList=l.b;exports.BtnListPlugin=l.a1;exports.CardCarousel=l.g;exports.CardCarouselArticlesPlugin=l.av;exports.CardCarouselMultiRow=l.h;exports.CardCarouselMultiRowArticles=l.I;exports.CardCarouselMultiRowArticlesPlugin=l.aF;exports.CardCarouselMultiRowPlugin=l.ae;exports.CardCarouselMultiRowPublications=l.Y;exports.CardCarouselMultiRowPublicationsPlugin=l.aM;exports.CardCarouselPlugin=l.ad;exports.CardShowcase=l.V;exports.CardShowcasePlugin=l.aJ;exports.CardShowcaseProfile=l.l;exports.CardShowcaseProfilePlugin=l.al;exports.CarouselLogo=l.t;exports.CarouselLogoPlugin=l.aw;exports.ContactUsInfo=l.r;exports.ContactUsInfoPlugin=l.as;exports.ContactUsList=l.o;exports.ContactUsListPlugin=l.an;exports.CountDown=l.m;exports.CountDownPlugin=l.am;exports.CustomIframe=l.n;exports.CustomIframePlugin=l.ao;exports.CustomSpace=l.C;exports.CustomSpacePlugin=l.a7;exports.Disc=l.w;exports.DiscPlugin=l.az;exports.DonorLinks=l.D;exports.DonorLinksPlugin=l.ac;exports.ExploreLinks=l.W;exports.ExploreLinksPlugin=l.aK;exports.GalleryBlock=l.F;exports.GalleryBlockPlugin=l.aE;exports.GalleryCaptionRound=l.c;exports.GalleryCaptionRoundPlugin=l.a3;exports.GalleryDefault=l.G;exports.GalleryDefaultPlugin=l.a2;exports.GalleryList=l.f;exports.GalleryListPlugin=l.a8;exports.GalleryTimeline=l.d;exports.GalleryTimelineCol=l.e;exports.GalleryTimelineColPlugin=l.a5;exports.GalleryTimelinePlugin=l.a4;exports.HeroSlide=l.H;exports.HeroSlidePlugin=l.a9;exports.LinkList=l.L;exports.LinkListPlugin=l.aa;exports.MapStatic=l.M;exports.MapStaticPlugin=l.au;exports.MediaLogo=l.z;exports.MediaLogoPlugin=l.aC;exports.NewsList=l.N;exports.NewsListPlugin=l.aj;exports.Process=l.P;exports.ProcessPlugin=l.a6;exports.Publications=l.s;exports.PublicationsPlugin=l.at;exports.QuoteText=l.Q;exports.QuoteTextPlugin=l.ab;exports.RegisterForm=l.E;exports.RegisterFormPlugin=l.aD;exports.Resources=l.u;exports.ResourcesPlugin=l.ax;exports.ResourcesTwo=l.v;exports.ResourcesTwoPlugin=l.ay;exports.ResponsiveUtils=l.aP;exports.RibbonBlock=l.R;exports.RibbonBlockPlugin=l.ah;exports.SchoolLayout=l.X;exports.SchoolLayoutPlugin=l.aL;exports.ScrollKeyInfo=l.S;exports.ScrollKeyInfoPlugin=l.ar;exports.StorageUtils=l.aR;exports.TableCollapse=l.y;exports.TableCollapsePlugin=l.aB;exports.TableTwo=l.p;exports.TableTwoPlugin=l.ap;exports.TheHistoryCarousel=l.k;exports.TheHistoryCarouselPlugin=l.ak;exports.ThemeUtils=l.aO;exports.TimelineStory=l.T;exports.TimelineStoryPlugin=l.ai;exports.default=l.O;exports.useTheme=l.aN;
@@ -1,4 +1,4 @@
1
- import { J as l, aG as i, aQ as e, j as n, ag as o, A as u, Z as r, B as t, $ as g, q as P, aq as C, a as c, a0 as m, i as L, af as d, x as y, aA as B, K as T, aH as w, U as S, aI as R, b as p, a1 as b, g as f, av as h, h as k, I as G, aF as I, ae as M, Y as A, aM as D, ad as U, V as x, aJ as H, l as Q, al as E, t as F, aw as K, r as N, as as v, o as W, an as j, m as q, am as z, n as J, ao as O, C as V, a7 as X, w as Y, az as Z, D as $, ac as _, W as aa, aK as sa, F as la, aE as ia, c as ea, a3 as na, G as oa, a2 as ua, f as ra, a8 as ta, d as ga, e as Pa, a5 as Ca, a4 as ca, H as ma, a9 as La, L as da, aa as ya, M as Ba, au as Ta, z as wa, aC as Sa, N as Ra, aj as pa, P as ba, a6 as fa, s as ha, at as ka, Q as Ga, ab as Ia, E as Ma, aD as Aa, u as Da, ax as Ua, v as xa, ay as Ha, aP as Qa, R as Ea, ah as Fa, X as Ka, aL as Na, S as va, ar as Wa, aR as ja, y as qa, aB as za, p as Ja, ap as Oa, k as Va, ak as Xa, aO as Ya, T as Za, ai as $a, O as _a, aN as as } from "./index-BZsfPtt0.mjs";
1
+ import { J as l, aG as i, aQ as e, j as n, ag as o, A as u, Z as r, B as t, $ as g, q as P, aq as C, a as c, a0 as m, i as L, af as d, x as y, aA as B, K as T, aH as w, U as S, aI as R, b as p, a1 as b, g as f, av as h, h as k, I as G, aF as I, ae as M, Y as A, aM as D, ad as U, V as x, aJ as H, l as Q, al as E, t as F, aw as K, r as N, as as v, o as W, an as j, m as q, am as z, n as J, ao as O, C as V, a7 as X, w as Y, az as Z, D as $, ac as _, W as aa, aK as sa, F as la, aE as ia, c as ea, a3 as na, G as oa, a2 as ua, f as ra, a8 as ta, d as ga, e as Pa, a5 as Ca, a4 as ca, H as ma, a9 as La, L as da, aa as ya, M as Ba, au as Ta, z as wa, aC as Sa, N as Ra, aj as pa, P as ba, a6 as fa, s as ha, at as ka, Q as Ga, ab as Ia, E as Ma, aD as Aa, u as Da, ax as Ua, v as xa, ay as Ha, aP as Qa, R as Ea, ah as Fa, X as Ka, aL as Na, S as va, ar as Wa, aR as ja, y as qa, aB as za, p as Ja, ap as Oa, k as Va, ak as Xa, aO as Ya, T as Za, ai as $a, O as _a, aN as as } from "./index-BehsQJZ_.mjs";
2
2
  export {
3
3
  l as AlummiCommunityList,
4
4
  i as AlummiCommunityListPlugin,