@white-give/editor-react 1.0.2 → 1.0.4

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.
package/dist/es/index.js CHANGED
@@ -1150,7 +1150,7 @@ const j5 = (t, e) => {
1150
1150
  echarts: {
1151
1151
  // 自定义图表配置
1152
1152
  onSetOptions(t, e) {
1153
- return console.log("onSetOptions", t, e), null;
1153
+ return null;
1154
1154
  }
1155
1155
  },
1156
1156
  page: {
@@ -1166,7 +1166,7 @@ const j5 = (t, e) => {
1166
1166
  async onFileUpload(t) {
1167
1167
  if (!t)
1168
1168
  throw new Error("没有找到要上传的文件");
1169
- return console.log("onUpload", t), await new Promise((e) => setTimeout(e, 3e3)), {
1169
+ return console.log("onFileUpload", t), await new Promise((e) => setTimeout(e, 3e3)), {
1170
1170
  id: Pv(),
1171
1171
  url: t.url ?? URL.createObjectURL(t),
1172
1172
  name: t.name,
@@ -101388,7 +101388,7 @@ function moe(t, e, r) {
101388
101388
  e.titleText && e.titleText !== "" && (n.title = {}, n.title.text = e.titleText, n.title.left = e.titleleft ?? "left");
101389
101389
  let a = [];
101390
101390
  function o() {
101391
- n.legend = {}, n.legend.show = !!e.legend, n.legend[e.legendlocation] = 10, n.legend.left = e.legendleft, n.legend.orient = e.legendorient, n.legend.data = [], a = t.legends, console.log(t, "colNameList"), n.legend.data = t.legends;
101391
+ n.legend = {}, n.legend.show = !!e.legend, n.legend[e.legendlocation] = 10, n.legend.left = e.legendleft, n.legend.orient = e.legendorient, n.legend.data = [], a = t.legends, n.legend.data = t.legends;
101392
101392
  }
101393
101393
  o();
101394
101394
  function s() {
@@ -103654,7 +103654,7 @@ const xVe = (t) => {
103654
103654
  return /* @__PURE__ */ Y(Tu, { as: "span", className: "inline-block mx-[0.3rem] !bg-transparent", children: /* @__PURE__ */ Y(
103655
103655
  "span",
103656
103656
  {
103657
- className: "rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border",
103657
+ className: "rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border select-none",
103658
103658
  style: i,
103659
103659
  children: e.attrs.text
103660
103660
  }
@@ -113242,11 +113242,11 @@ const BGe = ({
113242
113242
  v.key.toUpperCase() === ase.ENTER && d();
113243
113243
  };
113244
113244
  return document.addEventListener("keydown", p), () => {
113245
- document.removeEventListener("keydown", p), t.onUpdateData && (console.log("updateData", c()), t.onUpdateData(c()));
113245
+ document.removeEventListener("keydown", p);
113246
113246
  };
113247
113247
  }, []);
113248
113248
  const h = (p, v, g) => {
113249
- p.preventDefault(), console.log("handlePaste", p.clipboardData, v, g);
113249
+ p.preventDefault();
113250
113250
  };
113251
113251
  return /* @__PURE__ */ Y("div", { className: "white-editor-table-content", ref: s, children: /* @__PURE__ */ Y("table", { children: /* @__PURE__ */ Y("tbody", { children: Array.from({ length: Vj }).map((p, v) => /* @__PURE__ */ Y("tr", { children: Array.from({ length: Hj }).map((g, m) => /* @__PURE__ */ Y(
113252
113252
  "td",
@@ -113260,7 +113260,7 @@ const BGe = ({
113260
113260
  autoComplete: "off",
113261
113261
  onFocus: () => a([v, m]),
113262
113262
  onBlur: () => f(v, m),
113263
- onPaste: (y) => h(y, v, m)
113263
+ onPaste: (y) => h(y)
113264
113264
  }
113265
113265
  )
113266
113266
  },
@@ -113295,7 +113295,6 @@ function qI({
113295
113295
  console.log("图表数据为空");
113296
113296
  return;
113297
113297
  }
113298
- console.log("baseConfig.data", F);
113299
113298
  const V = moe(
113300
113299
  JSON.parse(JSON.stringify(F.data)),
113301
113300
  JSON.parse(JSON.stringify(F.config)),
@@ -113309,7 +113308,7 @@ function qI({
113309
113308
  }, 0);
113310
113309
  }, x = () => {
113311
113310
  const L = { ...v };
113312
- return L.config.seriesType = "bar", L.config.legend = !0, L.config.legendorient = "horizontal", L.config.legendlocation = "top", L.config.legendleft = "center", L.config.titleText = "", L.config.titleleft = "left", L.data = bj[L.config.seriesType], g(L), console.log("newConfig", L), L;
113311
+ return L.config.seriesType = "bar", L.config.legend = !0, L.config.legendorient = "horizontal", L.config.legendlocation = "top", L.config.legendleft = "center", L.config.titleText = "", L.config.titleleft = "left", L.data = bj[L.config.seriesType], g(L), L;
113313
113312
  }, w = async () => {
113314
113313
  if (s(!0), u("type"), r) {
113315
113314
  if (!i) return;
@@ -113358,8 +113357,10 @@ function qI({
113358
113357
  nodeAlign: "center",
113359
113358
  margin: {}
113360
113359
  };
113361
- r ? L.id = f.attrs.id : L.id = Pv(), L.chartConfig = JSON.parse(
113362
- JSON.stringify({ data: v.data, config: v.config })
113360
+ r ? L.id = f.attrs.id : L.id = Pv();
113361
+ let F = v.data;
113362
+ l === "data" && p.current && (F = p.current.getTableData().data), L.chartConfig = JSON.parse(
113363
+ JSON.stringify({ data: F, config: v.config })
113363
113364
  ), r ? i?.commands.updateEcharts(L) : i?.commands.setEcharts(L), s(!1);
113364
113365
  };
113365
113366
  return /* @__PURE__ */ rt(Un, { children: [