@a2simcode/ui 0.0.243 → 0.0.244
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/simcode-ui.es.js
CHANGED
|
@@ -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
|
|
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
|
}
|
|
@@ -14593,6 +14596,7 @@ var Wc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
|
|
|
14593
14596
|
emits: ["update:modelValue", "change"],
|
|
14594
14597
|
setup(e, { emit: t }) {
|
|
14595
14598
|
const n = e, a = t, o = (s, d) => {
|
|
14599
|
+
if (s === void 0) return s;
|
|
14596
14600
|
const f = typeof d;
|
|
14597
14601
|
if (f === typeof s) return s;
|
|
14598
14602
|
if (f === "number") {
|