@a2simcode/ui 0.0.243 → 0.0.245

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.
@@ -9,6 +9,7 @@ export declare class JCompEditor {
9
9
  container: HTMLElement | null;
10
10
  /** 当前编辑值 */
11
11
  currentValue: any;
12
+ currentCompType: string;
12
13
  readValueFromDom(wrap: HTMLElement): string | undefined;
13
14
  /**
14
15
  * 编辑器启动时调用
@@ -5572,6 +5572,7 @@ var Dp = class {
5572
5572
  wrapContainer = null;
5573
5573
  container = null;
5574
5574
  currentValue = null;
5575
+ currentCompType = "";
5575
5576
  readValueFromDom(e) {
5576
5577
  const t = e.querySelector('input, textarea, [contenteditable="true"]');
5577
5578
  if (t) {
@@ -5597,7 +5598,9 @@ var Dp = class {
5597
5598
  return await this.createEditor(e);
5598
5599
  }
5599
5600
  async createEditor(e) {
5600
- const { container: t, referencePosition: n, col: a, row: o, table: i } = e, r = i.getBodyField(a, o), l = i.options?.columns || [], c = this.findColumnByField(l, r), s = c?._compConfig || {}, d = L(i.getCellOriginRecord(a, o) || {});
5601
+ const { container: t, referencePosition: n, col: a, row: o, table: i } = e;
5602
+ this.currentCompType = "";
5603
+ const r = i.getBodyField(a, o), l = i.options?.columns || [], c = this.findColumnByField(l, r), s = c?._compConfig || {}, d = L(i.getCellOriginRecord(a, o) || {});
5601
5604
  if (!t) return !1;
5602
5605
  let f = c?._compType;
5603
5606
  if (d.value._compTypeByRender && d.value._compTypeByRender[r] && (f = d.value._compTypeByRender[r], !Vc(f)))
@@ -5609,7 +5612,7 @@ var Dp = class {
5609
5612
  const g = c?.style?.textAlign;
5610
5613
  u.style.display = "flex", u.style.alignItems = "center", u.style.justifyContent = g === "center" ? "center" : g === "right" ? "flex-end" : "flex-start", u.style.paddingLeft = g === "center" ? "0" : "11px";
5611
5614
  }
5612
- this.wrapContainer = u, this.container = t, this.container && this.container.appendChild(u), s.autoFocus = !0, this.currentValue = void 0;
5615
+ this.wrapContainer = u, this.container = t, this.container && this.container.appendChild(u), s.autoFocus = !0, this.currentValue = void 0, this.currentCompType = f;
5613
5616
  const p = Ei(Fc, {
5614
5617
  id: r,
5615
5618
  type: f,
@@ -5628,7 +5631,7 @@ var Dp = class {
5628
5631
  return p.appContext = i._getAppContext(), p.appContext.provides = i._getProvides(), Ti(p, u), n?.rect && this.adjustPosition(n.rect), !0;
5629
5632
  }
5630
5633
  getValue() {
5631
- if (this.wrapContainer) {
5634
+ if (this.wrapContainer && this.currentCompType === "j-input") {
5632
5635
  const e = this.readValueFromDom(this.wrapContainer);
5633
5636
  e !== void 0 && (this.currentValue = e);
5634
5637
  }
@@ -6894,6 +6897,7 @@ var Yp = /* @__PURE__ */ me({
6894
6897
  checked: Y.length > 0
6895
6898
  });
6896
6899
  }
6900
+ o.heightMode === "auto" && (x.value = y.getAllRowsHeight());
6897
6901
  }
6898
6902
  }, lt = () => y ? y.records : [];
6899
6903
  At(() => {
@@ -14593,6 +14597,7 @@ var Wc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
14593
14597
  emits: ["update:modelValue", "change"],
14594
14598
  setup(e, { emit: t }) {
14595
14599
  const n = e, a = t, o = (s, d) => {
14600
+ if (s === void 0) return s;
14596
14601
  const f = typeof d;
14597
14602
  if (f === typeof s) return s;
14598
14603
  if (f === "number") {