@avilang/practical-ui 0.3.65 → 0.3.66

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31571,6 +31571,8 @@ const xf = ({ delay: e = 300, minPendingTime: t = 500, loadingValue: r = !1 } =
31571
31571
  defaultSlotAsEmpty: { type: Boolean, default: !1 },
31572
31572
  nilType: { type: String },
31573
31573
  // 控制 empty 和 error 状态下的样式
31574
+ nilClass: { type: String },
31575
+ // 定义 empty 和 error 状态下的 class 名
31574
31576
  contentStyle: { type: String, default: "position:relative; min-height:72px;" }
31575
31577
  // 内容的最小高度,避免 loading/empty 状态下高度不确定导致抖动
31576
31578
  },
@@ -31578,7 +31580,10 @@ const xf = ({ delay: e = 300, minPendingTime: t = 500, loadingValue: r = !1 } =
31578
31580
  const t = E(() => ["small", "medium", "large"].includes(e.loadingSize) ? e.loadingSize : "medium"), r = E(() => {
31579
31581
  const y = { position: "absolute", left: "50%", zIndex: 2 };
31580
31582
  return e.loadingTop == null ? y.top = "50%" : y.top = `${e.loadingTop}px`, t.value === "small" ? (y.marginLeft = "-14px", e.loadingTop == null && (y.marginTop = "-14px")) : t.value === "medium" ? (y.marginLeft = "-17px", e.loadingTop == null && (y.marginTop = "-17px")) : t.value === "large" && (y.marginLeft = "-20px", e.loadingTop == null && (y.marginTop = "-20px")), y;
31581
- }), o = E(() => e.nilType === "border" ? "p-promised-empty-border" : e.nilType === "line" ? "p-promised-empty-line" : ""), i = Bn(), a = ie(() => e.promise), { data: s, error: l, isPending: d, isDelayElapsed: u, isResolved: c, isRejected: v } = DB(a, 0), { loading: g, waiting: m } = xf(), h = E(() => !g.value && !d.value && !l.value && b(s.value));
31583
+ }), o = E(() => {
31584
+ let y = (e.nilClass || "").trim();
31585
+ return e.nilType === "border" && (y += " p-promised-empty-border"), e.nilType === "line" && (y += " p-promised-empty-line"), y.trim();
31586
+ }), i = Bn(), a = ie(() => e.promise), { data: s, error: l, isPending: d, isDelayElapsed: u, isResolved: c, isRejected: v } = DB(a, 0), { loading: g, waiting: m } = xf(), h = E(() => !g.value && !d.value && !l.value && b(s.value));
31582
31587
  Me(
31583
31588
  () => d.value && u.value,
31584
31589
  (y) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@avilang/practical-ui",
3
3
  "type": "module",
4
- "version": "0.3.65",
4
+ "version": "0.3.66",
5
5
  "description": "Practical UI components created based on vue3",
6
6
  "main": "dist/index.js",
7
7
  "files": [