@mooncellwiki/prts-design-vue 0.1.2 → 0.1.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.
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  active?: boolean;
8
8
  /** 最小单位:min 到分(默认,每分钟刷新)· sec 到秒 */
9
9
  precision?: "min" | "sec";
10
- /** 最多显示几格,从最大的单位数起:2 → 「03 days 14 hrs」/ 不足一天时「14 hrs 27 min」(首页幻灯片);不写则一直显示到 precision */
10
+ /** 最多显示几格,从最大的单位数起:2 → 「03 days 14 hrs」/ 不足一天时「14 hrs 27 mins」(首页幻灯片);不写则一直显示到 precision */
11
11
  parts?: number;
12
12
  };
13
13
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -8,7 +8,7 @@ type __VLS_Props = {
8
8
  titleTag?: TitleTag;
9
9
  /** 标题栏反转(亮色下黑底白字、暗色下白底黑字,同 .ak-inverse):公告这类要跳出来的区域 */
10
10
  inverse?: boolean;
11
- /** 可折叠:点标题栏收起 / 展开正文(右端出现 V 形箭头);需要有标题 */
11
+ /** 可折叠:点标题栏收起 / 展开正文(右端出现开合记号:收起 + / 展开 −);需要有标题 */
12
12
  collapsible?: boolean;
13
13
  };
14
14
  type __VLS_Slots = {
package/dist/index.js CHANGED
@@ -6384,13 +6384,13 @@ var AkCountdown_default = /* @__PURE__ */ defineComponent({
6384
6384
  {
6385
6385
  ms: 864e5,
6386
6386
  mod: Infinity,
6387
- unit: "days",
6387
+ unit: "day",
6388
6388
  zh: "天"
6389
6389
  },
6390
6390
  {
6391
6391
  ms: 36e5,
6392
6392
  mod: 24,
6393
- unit: "hrs",
6393
+ unit: "hr",
6394
6394
  zh: "小时"
6395
6395
  },
6396
6396
  {
@@ -6418,6 +6418,8 @@ var AkCountdown_default = /* @__PURE__ */ defineComponent({
6418
6418
  });
6419
6419
  const spoken = computed(() => `剩余 ${cells.value.map((c) => `${c.value} ${c.zh}`).join(" ")}`);
6420
6420
  const pad2 = (n) => String(n).padStart(2, "0");
6421
+ /** 单位都是缩写 + 复数 s,数值为 1 时用单数:01 day / 01 hr / 01 min / 01 sec */
6422
+ const label = (c) => c.value === 1 ? c.unit : `${c.unit}s`;
6421
6423
  return (_ctx, _cache) => {
6422
6424
  return remaining.value > 0 ? (openBlock(), createElementBlock("span", {
6423
6425
  key: 0,
@@ -6428,7 +6430,7 @@ var AkCountdown_default = /* @__PURE__ */ defineComponent({
6428
6430
  return openBlock(), createElementBlock("span", {
6429
6431
  key: c.unit,
6430
6432
  "aria-hidden": "true"
6431
- }, [createElementVNode("b", null, toDisplayString(pad2(c.value)), 1), createElementVNode("small", null, toDisplayString(c.unit), 1)]);
6433
+ }, [createElementVNode("b", null, toDisplayString(pad2(c.value)), 1), createElementVNode("small", null, toDisplayString(label(c)), 1)]);
6432
6434
  }), 128))], 8, _hoisted_1$2)) : createCommentVNode("", true);
6433
6435
  };
6434
6436
  }