@yzsf2e/render-core 1.0.2-alpha.179 → 1.0.2-alpha.180
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/render-core.mjs +41 -34
- package/dist/render-core.umd.js +3 -3
- package/package.json +1 -1
package/dist/render-core.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import { CloseOutlined as Fu, ShrinkOutlined as Lu, ArrowsAltOutlined as $u, Hol
|
|
|
5
5
|
import { useI18n as Ua } from "vue-i18n";
|
|
6
6
|
import { useRouter as Wu } from "vue-router";
|
|
7
7
|
/*!
|
|
8
|
-
* @yzsf2e/render-core v1.0.2-alpha.
|
|
8
|
+
* @yzsf2e/render-core v1.0.2-alpha.180 Tue Jul 08 2025 17:31:13 GMT+0800 (中国标准时间)
|
|
9
9
|
* (c) 2023 @yzsf2e.
|
|
10
10
|
*/
|
|
11
|
-
const Ku = "@yzsf2e/render-core", Xu = "1.0.2-alpha.
|
|
11
|
+
const Ku = "@yzsf2e/render-core", Xu = "1.0.2-alpha.180", Yu = "dist/render-core", Gu = "dist/render-core", Zu = [
|
|
12
12
|
"dist"
|
|
13
13
|
], Ju = {
|
|
14
14
|
dev: "storybook dev -p 6006",
|
|
@@ -7710,16 +7710,31 @@ const Uv = /* @__PURE__ */ ur(Ov, [["render", zv]]), { Item: Hv, useForm: Vv } =
|
|
|
7710
7710
|
},
|
|
7711
7711
|
emits: ["search", "changeExpand", "update:current", "resetSearch"],
|
|
7712
7712
|
setup(f, { emit: k, expose: t }) {
|
|
7713
|
-
const { t: b } = yr(), g = 6, u = 3, { config: o, immediateQuery: a } = pr(f), n = ze("pageName", ""), e = Kt(
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7713
|
+
const { t: b } = yr(), g = 6, u = 3, { config: o, immediateQuery: a } = pr(f), n = ze("pageName", ""), e = Kt(() => o.value.reduce((F, I) => {
|
|
7714
|
+
var D;
|
|
7715
|
+
return ((D = I.otherProps) == null ? void 0 : D.columnWidth) == 2 ? F += 2 : F += 1, F;
|
|
7716
|
+
}, 0)), r = Kt(() => s.value || !l.value ? (g - e.value % g) * 4 : 24), l = Kt(
|
|
7717
|
+
() => e.value > g * u
|
|
7718
|
+
), i = Kt(() => {
|
|
7719
|
+
var D;
|
|
7720
|
+
let F = 999999, I = 0;
|
|
7721
|
+
for (let B = 0; B < o.value.length; B++)
|
|
7722
|
+
if (((D = o.value[B].otherProps) == null ? void 0 : D.columnWidth) == 2 ? I += 2 : I += 1, I > g * u) {
|
|
7723
|
+
F = B - 1;
|
|
7724
|
+
break;
|
|
7725
|
+
} else if (I === g * u) {
|
|
7726
|
+
F = B;
|
|
7727
|
+
break;
|
|
7728
|
+
}
|
|
7729
|
+
return F;
|
|
7730
|
+
}), s = gt(!l.value), { formState: h, dispatchFormState: d } = si(), c = or(o.value.reduce((F, I) => (I.fieldName && I.required && (F[I.fieldName] = [{ required: !0, message: `${I.label} ${b("cannotBeEmpty") || "不能为空"}` }]), F), {})), { resetFields: p, validate: m, validateInfos: x } = Vv(h[n], c, {
|
|
7731
|
+
onValidate: (F, I, D) => D == null ? void 0 : D.forEach((B) => Be.error(B))
|
|
7717
7732
|
});
|
|
7718
7733
|
ve(
|
|
7719
7734
|
() => f.defaultQuery,
|
|
7720
|
-
(
|
|
7735
|
+
(F) => {
|
|
7721
7736
|
Qe(() => {
|
|
7722
|
-
|
|
7737
|
+
d(F, n), f.current === 1 ? k("search") : k("update:current", 1);
|
|
7723
7738
|
});
|
|
7724
7739
|
},
|
|
7725
7740
|
{
|
|
@@ -7727,39 +7742,31 @@ const Uv = /* @__PURE__ */ ur(Ov, [["render", zv]]), { Item: Hv, useForm: Vv } =
|
|
|
7727
7742
|
immediate: a.value
|
|
7728
7743
|
}
|
|
7729
7744
|
);
|
|
7730
|
-
const
|
|
7731
|
-
|
|
7732
|
-
console.log("[@yzsf2e/render-core]",
|
|
7745
|
+
const C = () => {
|
|
7746
|
+
m().then(() => f.current === 1 ? k("search") : k("update:current", 1)).catch((F) => {
|
|
7747
|
+
console.log("[@yzsf2e/render-core]", F);
|
|
7733
7748
|
});
|
|
7734
|
-
},
|
|
7735
|
-
ve(
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
var I;
|
|
7739
|
-
return ((I = F.otherProps) == null ? void 0 : I.columnWidth) == 2 ? P += 2 : P += 1, P;
|
|
7740
|
-
}, 0);
|
|
7741
|
-
return r.value || !e.value ? (g - M % g) * 4 : 24;
|
|
7742
|
-
});
|
|
7743
|
-
function C(M) {
|
|
7744
|
-
return M == 2 ? {
|
|
7749
|
+
}, M = (F) => Array.isArray(F) ? F.filter((I) => ![void 0, null].includes(I)).length > 0 : !!F;
|
|
7750
|
+
ve(s, () => k("changeExpand"));
|
|
7751
|
+
function P(F) {
|
|
7752
|
+
return F == 2 ? {
|
|
7745
7753
|
span: 8,
|
|
7746
7754
|
labelCol: { span: 4 },
|
|
7747
7755
|
wrapperCol: { span: 20 }
|
|
7748
7756
|
} : { span: 4 };
|
|
7749
7757
|
}
|
|
7750
|
-
return t({ resetFields:
|
|
7751
|
-
expand:
|
|
7758
|
+
return t({ resetFields: p, validate: m }), {
|
|
7759
|
+
expand: s,
|
|
7752
7760
|
pageName: n,
|
|
7753
|
-
formState:
|
|
7754
|
-
serachSpan:
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
AVAILIABLE_EXPAND_LINE: u,
|
|
7758
|
-
CONDITION_COUNT_PER_LINE: g,
|
|
7761
|
+
formState: h,
|
|
7762
|
+
serachSpan: r,
|
|
7763
|
+
maxShowIndex: i,
|
|
7764
|
+
validateInfos: x,
|
|
7759
7765
|
customMaterialsMap: io,
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7766
|
+
showAvailiableTrigger: l,
|
|
7767
|
+
columnWidthGenerator: P,
|
|
7768
|
+
onSubmit: C,
|
|
7769
|
+
getItemActive: M
|
|
7763
7770
|
};
|
|
7764
7771
|
}
|
|
7765
7772
|
});
|
|
@@ -7815,7 +7822,7 @@ function Wv(f, k, t, b, g, u) {
|
|
|
7815
7822
|
}),
|
|
7816
7823
|
_: 2
|
|
7817
7824
|
}, 1032, ["span"])), [
|
|
7818
|
-
[Fa, f.expand ||
|
|
7825
|
+
[Fa, f.expand || p <= f.maxShowIndex]
|
|
7819
7826
|
]);
|
|
7820
7827
|
}), 128)),
|
|
7821
7828
|
Lt(e, { span: f.serachSpan }, {
|