@ftlab/one-vue3 0.4.4 → 0.4.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.4.6] - 2026-11-26
4
+
5
+ ### Fixed
6
+ - **`utils` 导出的 dayjs 丢失插件注册**:`utils/date.ts` 顶部原本是 6 条独立的 `dayjs.extend(utc/timezone/weekOfYear/isoWeek/duration/customParseFormat)` 语句,而 `package.json` 的 `sideEffects` 只列了 CSS 文件(等于声明所有 JS 无副作用),消费方打包器会把 `dist/utils.js` 折叠成 `dayjs` 的再导出并**连带丢掉这些 extend** → 消费方拿到没有 `tz`/`utc` 的裸 dayjs,日期组件报 `x.default.tz is not a function`(ccms-web 1.1.4 线上事故;只在"消费方仅从 utils 导入 `{ dayjs }`"时触发,dataview-web / oms-admin-web 未触发)
7
+ - 修法:注册移入 `withPlugins()` 并作为导出值的初始化(`const dayjs = withPlugins(baseDayjs)`),只要用到 `{ dayjs }` 注册必执行,不再依赖 sideEffects 与 tree-shaking 行为;同时把 `dist/utils*.js` 补进 `sideEffects`
8
+
9
+ ## [v0.4.5] - 2026-11-26
10
+
11
+ ### Fixed
12
+ - **侧栏 logo 区与 topbar 底边对不齐**(多个接入系统复现):`FtlSidebar` 的 `.sidebar-container-header-title` 写死 `height: 36px`,`FtlNavbar` 是 56px,两者天生差 20px;接入方只能各自硬编码补(ccms 补成侧栏 52px / topbar 60px,仍差 8px)。现在两边共用同一个高度变量 `--ftl-topbar-height`(默认 56px),logo 区底边与 topbar 底边落在同一条线上
13
+ - `FtlNavbar` 原为 `height: 56px` + `padding: 10px 20px`,内容区只剩 35px;使用方自带的页签条(32px/40px)居中后底线悬在 topbar 底边框上方。现改为 `padding: 0 20px`,内容区高度 `height - 1px`
14
+
15
+ ### Changed
16
+ - 新增顶层 CSS 变量 `--ftl-topbar-height`(默认 56px),由 `FtlNavbar` 与 `FtlSidebar` 的 logo 区共同读取;使用方可写 `:root { --ftl-topbar-height: 60px }` 统一调整,**不要再单独覆盖 `.navbar-box` / `.sidebar-container-header` 的高度**,否则两边又会错开
17
+ - `FtlNavbar` 其它元素居中位置不变(原 `10 + (H-21)/2` 与新 `(H-1)/2` 相等),现有接入方升级后视觉无变化
18
+ - 页签贴底的正确用法:把页签/菜单高度设为 `calc(var(--ftl-topbar-height, 56px) - 1px)`,其底线即与 topbar 底边框重合(ccms-web 的 MultiTab 已按此调整)
19
+ - 内容区的 `padding-top` 也应写 `var(--ftl-topbar-height, 56px)`,不要写死像素(包 demo 已改)
20
+ - 显式声明 `box-sizing: border-box`,避免没有全局重置的宿主把高度算成 56+20+1=77px
21
+
3
22
  ## [v0.4.4] - 2026-11-26
4
23
 
5
24
  ### Changed
@@ -187,5 +187,5 @@ var R = { class: "f-c" }, z = { class: "f-c" }, B = { class: "ml15 cp f-c" }, V
187
187
  ], 4);
188
188
  };
189
189
  }
190
- })), U = /*#__PURE__*/ r(H, [["__scopeId", "data-v-76ec61cd"]]);
190
+ })), U = /*#__PURE__*/ r(H, [["__scopeId", "data-v-5c2c6191"]]);
191
191
  export { U as t };
package/dist/FtlNavbar.js CHANGED
@@ -1 +1 @@
1
- export { t as default } from "./FtlNavbar-SsenWatk.js";
1
+ export { t as default } from "./FtlNavbar-pXDOAN8l.js";
@@ -166,5 +166,5 @@ var j = /*#__PURE__*/ t(/* @__PURE__ */ m({
166
166
  ]);
167
167
  };
168
168
  }
169
- })), z = /*#__PURE__*/ t(R, [["__scopeId", "data-v-5cf4ef34"]]);
169
+ })), z = /*#__PURE__*/ t(R, [["__scopeId", "data-v-bc90968e"]]);
170
170
  export { z as t };
@@ -1 +1 @@
1
- export { t as default } from "./FtlSidebar-BuNhUZHt.js";
1
+ export { t as default } from "./FtlSidebar-ClB1wxoa.js";
package/dist/ftlOne.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as e } from "./FtlNavbar-SsenWatk.js";
2
- import { t } from "./FtlSidebar-BuNhUZHt.js";
1
+ import { t as e } from "./FtlNavbar-pXDOAN8l.js";
2
+ import { t } from "./FtlSidebar-ClB1wxoa.js";
3
3
  import { t as n } from "./FtlPasswordDialog-Dj_vS0mC.js";
4
4
  import { t as r } from "./FtlMultipleChoose-D8o09guU.js";
5
5
  // package/index.ts
package/dist/style.css CHANGED
@@ -1,2 +1,2 @@
1
- .app-item[data-v-54faffb2]{justify-content:space-between;align-items:center;width:100%;padding:5px 0;display:flex}.app-item-img[data-v-54faffb2]{width:30px;height:30px;margin-right:12px}.system-select-dropdown::-webkit-scrollbar{width:0}.system-select-dropdown{max-height:250px;overflow-x:hidden;overflow-y:auto}.system-select-dropdown .el-dropdown-menu__item.is-disabled{color:#606266}.system-select-dropdown .el-dropdown-menu__item:focus,.system-select-dropdown .el-dropdown-menu__item:not(.is-disabled):hover{color:#000;background-color:#f9f9fa;font-weight:700}.keep-left{left:0!important}.dot[data-v-5886c311]{background:red;border-radius:50%;width:5px;height:5px;position:absolute;transform:translate(10px,-8px)}.message-card__text[data-v-5886c311]{color:var(--ftlOne-message-text-color,#999);font-size:12px}[data-v-45841d07] .el-input__wrapper{border:none;border-radius:0;height:24px!important;box-shadow:none!important;background:0 0!important;padding-left:5px!important;line-height:24px!important}.show-content[data-v-45841d07]{position:relative}.show-content-popover[data-v-45841d07]{z-index:2000;color:#606266;word-break:break-all;background:#fff;border:1px solid #e6ebf5;border-radius:4px;width:320px;padding:12px;font-size:14px;line-height:1.4;position:absolute;top:40px;box-shadow:0 2px 12px rgba(0,0,0,.1)}.show-content-popover-content[data-v-45841d07]{height:250px;padding:10px;overflow:auto}.show-content-popover-content .innerInfo[data-v-45841d07],.show-content-popover-content .showInfo[data-v-45841d07]{align-items:center;display:flex}.show-content-popover-content .innerInfo .number[data-v-45841d07],.show-content-popover-content .showInfo .number[data-v-45841d07]{text-align:right;color:#bec1c7;width:40px;font-size:12px;display:inline-block}.input-cotainer[data-v-45841d07]{z-index:200;border:1px solid #dadde4;border-radius:5px;justify-content:space-between;align-items:center;width:300px;height:28px;padding:2px 10px 1px 2px;display:flex;position:relative}.input-cotainer-content[data-v-45841d07]{width:225px;height:26px;overflow-y:auto}.input-cotainer-content .innerInfo[data-v-45841d07],.input-cotainer-content .showInfo[data-v-45841d07]{align-items:center;height:26px;line-height:26px;display:flex;overflow:hidden}.input-cotainer-content .innerInfo .number[data-v-45841d07],.input-cotainer-content .showInfo .number[data-v-45841d07]{text-align:right;color:#bec1c7;width:30px;font-size:12px}.input-cotainer-content[data-v-45841d07]::-webkit-scrollbar{width:4px;height:4px}.input-cotainer-tool[data-v-45841d07]{align-items:flex-start;display:flex}.input-cotainer-tool-count[data-v-45841d07]{border-radius:0 0 0 10px;margin-right:3px;padding:0 8px;font-size:10px;line-height:14px}.input-cotainer-tool-icon[data-v-45841d07]{display:flex}.input-height-large[data-v-45841d07]{height:var(--el-component-size-large)!important}.input-height-large .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size-large) - 2px)!important}.input-height-large .innerInfo[data-v-45841d07],.input-height-large .showInfo[data-v-45841d07]{height:calc(var(--el-component-size-large) - 2px)!important;line-height:calc(var(--el-component-size-large) - 2px)!important}.input-height-small[data-v-45841d07]{height:var(--el-component-size-small)!important}.input-height-small .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size-small) - 2px)!important}.input-height-small .innerInfo[data-v-45841d07],.input-height-small .showInfo[data-v-45841d07]{height:calc(var(--el-component-size-small) - 2px)!important;line-height:calc(var(--el-component-size-small) - 2px)!important}.input-height-default[data-v-45841d07]{height:var(--el-component-size)!important}.input-height-default .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size) - 2px)!important}.input-height-default .innerInfo[data-v-45841d07],.input-height-default .showInfo[data-v-45841d07]{height:calc(var(--el-component-size) - 2px)!important;line-height:calc(var(--el-component-size) - 2px)!important}.func-area[data-v-45841d07]{justify-content:space-between;align-items:center;margin-top:10px;display:flex}.require_label[data-v-6006d849]:before{content:"*";color:#f36c6c;margin-right:4px}.ftlOne-changePasswordDialog[data-v-6006d849] .el-form-item__label{justify-content:flex-end}.ftlOne-changePasswordDialog[data-v-6006d849] .el-form .el-input{max-width:100%}.ftlOne-changePasswordDialog[data-v-6006d849] .el-input__wrapper{width:100%}.navbar-box[data-v-76ec61cd]{-webkit-backdrop-filter:saturate(50%)blur(8px);backdrop-filter:saturate(50%)blur(8px);z-index:100;border-bottom:1px solid #e6e6e6;height:56px;padding:10px 20px;position:fixed}.one-sidebar__iconPark[data-v-4680c4dc]{visibility:visible!important;width:19px!important;height:19px!important;overflow:unset!important;display:flex!important}.sidebar-container[data-v-5cf4ef34]{flex-direction:column;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:100vh;display:flex}.sidebar-container-header[data-v-5cf4ef34]{justify-content:center;align-items:center;display:flex}.sidebar-container-header-title[data-v-5cf4ef34]{align-items:center;height:36px;display:flex}.sidebar-container-header-title .title[data-v-5cf4ef34]{height:100%;margin-left:5px;font-size:22px;font-weight:600}.sidebar-container-header-title-right[data-v-5cf4ef34]{text-align:center;margin-left:10px}.sidebar-container-header-title .environment[data-v-5cf4ef34]{font-size:12px;font-style:italic;font-weight:700}.el-menu-vertical-demo[data-v-5cf4ef34]{flex:1;height:auto;min-height:0;overflow-x:hidden;overflow-y:auto}.el-menu-vertical-demo[data-v-5cf4ef34]::-webkit-scrollbar{width:0}.el-menu-vertical-demo[data-v-5cf4ef34]:not(.el-menu--collapse){width:240px}.sidebar-version[data-v-5cf4ef34]{letter-spacing:.2px;color:inherit;opacity:.65;background-color:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;flex:0 0 24px;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex;overflow:hidden}.dialog__title[data-v-0003507a]{text-align:center;margin-bottom:20px;font-size:20px;line-height:30px}
1
+ .app-item[data-v-54faffb2]{justify-content:space-between;align-items:center;width:100%;padding:5px 0;display:flex}.app-item-img[data-v-54faffb2]{width:30px;height:30px;margin-right:12px}.system-select-dropdown::-webkit-scrollbar{width:0}.system-select-dropdown{max-height:250px;overflow-x:hidden;overflow-y:auto}.system-select-dropdown .el-dropdown-menu__item.is-disabled{color:#606266}.system-select-dropdown .el-dropdown-menu__item:focus,.system-select-dropdown .el-dropdown-menu__item:not(.is-disabled):hover{color:#000;background-color:#f9f9fa;font-weight:700}.keep-left{left:0!important}.dot[data-v-5886c311]{background:red;border-radius:50%;width:5px;height:5px;position:absolute;transform:translate(10px,-8px)}.message-card__text[data-v-5886c311]{color:var(--ftlOne-message-text-color,#999);font-size:12px}[data-v-45841d07] .el-input__wrapper{border:none;border-radius:0;height:24px!important;box-shadow:none!important;background:0 0!important;padding-left:5px!important;line-height:24px!important}.show-content[data-v-45841d07]{position:relative}.show-content-popover[data-v-45841d07]{z-index:2000;color:#606266;word-break:break-all;background:#fff;border:1px solid #e6ebf5;border-radius:4px;width:320px;padding:12px;font-size:14px;line-height:1.4;position:absolute;top:40px;box-shadow:0 2px 12px rgba(0,0,0,.1)}.show-content-popover-content[data-v-45841d07]{height:250px;padding:10px;overflow:auto}.show-content-popover-content .innerInfo[data-v-45841d07],.show-content-popover-content .showInfo[data-v-45841d07]{align-items:center;display:flex}.show-content-popover-content .innerInfo .number[data-v-45841d07],.show-content-popover-content .showInfo .number[data-v-45841d07]{text-align:right;color:#bec1c7;width:40px;font-size:12px;display:inline-block}.input-cotainer[data-v-45841d07]{z-index:200;border:1px solid #dadde4;border-radius:5px;justify-content:space-between;align-items:center;width:300px;height:28px;padding:2px 10px 1px 2px;display:flex;position:relative}.input-cotainer-content[data-v-45841d07]{width:225px;height:26px;overflow-y:auto}.input-cotainer-content .innerInfo[data-v-45841d07],.input-cotainer-content .showInfo[data-v-45841d07]{align-items:center;height:26px;line-height:26px;display:flex;overflow:hidden}.input-cotainer-content .innerInfo .number[data-v-45841d07],.input-cotainer-content .showInfo .number[data-v-45841d07]{text-align:right;color:#bec1c7;width:30px;font-size:12px}.input-cotainer-content[data-v-45841d07]::-webkit-scrollbar{width:4px;height:4px}.input-cotainer-tool[data-v-45841d07]{align-items:flex-start;display:flex}.input-cotainer-tool-count[data-v-45841d07]{border-radius:0 0 0 10px;margin-right:3px;padding:0 8px;font-size:10px;line-height:14px}.input-cotainer-tool-icon[data-v-45841d07]{display:flex}.input-height-large[data-v-45841d07]{height:var(--el-component-size-large)!important}.input-height-large .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size-large) - 2px)!important}.input-height-large .innerInfo[data-v-45841d07],.input-height-large .showInfo[data-v-45841d07]{height:calc(var(--el-component-size-large) - 2px)!important;line-height:calc(var(--el-component-size-large) - 2px)!important}.input-height-small[data-v-45841d07]{height:var(--el-component-size-small)!important}.input-height-small .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size-small) - 2px)!important}.input-height-small .innerInfo[data-v-45841d07],.input-height-small .showInfo[data-v-45841d07]{height:calc(var(--el-component-size-small) - 2px)!important;line-height:calc(var(--el-component-size-small) - 2px)!important}.input-height-default[data-v-45841d07]{height:var(--el-component-size)!important}.input-height-default .input-cotainer-content[data-v-45841d07]{height:calc(var(--el-component-size) - 2px)!important}.input-height-default .innerInfo[data-v-45841d07],.input-height-default .showInfo[data-v-45841d07]{height:calc(var(--el-component-size) - 2px)!important;line-height:calc(var(--el-component-size) - 2px)!important}.func-area[data-v-45841d07]{justify-content:space-between;align-items:center;margin-top:10px;display:flex}.require_label[data-v-6006d849]:before{content:"*";color:#f36c6c;margin-right:4px}.ftlOne-changePasswordDialog[data-v-6006d849] .el-form-item__label{justify-content:flex-end}.ftlOne-changePasswordDialog[data-v-6006d849] .el-form .el-input{max-width:100%}.ftlOne-changePasswordDialog[data-v-6006d849] .el-input__wrapper{width:100%}.navbar-box[data-v-5c2c6191]{box-sizing:border-box;height:var(--ftl-topbar-height,56px);-webkit-backdrop-filter:saturate(50%)blur(8px);backdrop-filter:saturate(50%)blur(8px);z-index:100;border-bottom:1px solid #e6e6e6;padding:0 20px;position:fixed}.one-sidebar__iconPark[data-v-4680c4dc]{visibility:visible!important;width:19px!important;height:19px!important;overflow:unset!important;display:flex!important}.sidebar-container[data-v-bc90968e]{flex-direction:column;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:100vh;display:flex}.sidebar-container-header[data-v-bc90968e]{box-sizing:border-box;height:var(--ftl-topbar-height,56px);justify-content:center;align-items:center;display:flex}.sidebar-container-header-title[data-v-bc90968e]{align-items:center;height:100%;display:flex}.sidebar-container-header-title .title[data-v-bc90968e]{height:100%;margin-left:5px;font-size:22px;font-weight:600}.sidebar-container-header-title-right[data-v-bc90968e]{text-align:center;margin-left:10px}.sidebar-container-header-title .environment[data-v-bc90968e]{font-size:12px;font-style:italic;font-weight:700}.el-menu-vertical-demo[data-v-bc90968e]{flex:1;height:auto;min-height:0;overflow-x:hidden;overflow-y:auto}.el-menu-vertical-demo[data-v-bc90968e]::-webkit-scrollbar{width:0}.el-menu-vertical-demo[data-v-bc90968e]:not(.el-menu--collapse){width:240px}.sidebar-version[data-v-bc90968e]{letter-spacing:.2px;color:inherit;opacity:.65;background-color:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;flex:0 0 24px;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex;overflow:hidden}.dialog__title[data-v-0003507a]{text-align:center;margin-bottom:20px;font-size:20px;line-height:30px}
2
2
  /*$vite$:1*/
package/dist/utils.js CHANGED
@@ -538,21 +538,23 @@ var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescr
538
538
  };
539
539
  }));
540
540
  })), v = /* @__PURE__ */ d(f(), 1), y = /* @__PURE__ */ d(p(), 1), b = /* @__PURE__ */ d(m(), 1), x = /* @__PURE__ */ d(h(), 1), S = /* @__PURE__ */ d(g(), 1), C = /* @__PURE__ */ d(_(), 1);
541
- n.extend(y.default), n.extend(v.default), n.extend(b.default), n.extend(x.default), n.extend(S.default), n.extend(C.default);
542
- var w = "YYYY-MM-DD HH:mm:ss", T = (e) => {
541
+ function w(e) {
542
+ return e.extend(v.default), e.extend(y.default), e.extend(b.default), e.extend(x.default), e.extend(S.default), e.extend(C.default), e;
543
+ }
544
+ var T = w(n), E = "YYYY-MM-DD HH:mm:ss", D = (e) => {
543
545
  let t = new Date(e);
544
546
  if (!isNaN(t.getTime())) {
545
547
  let e = t.getFullYear(), n = t.getMonth() + 1;
546
548
  return t.getDate() === 29 && n === 2 ? e % 4 == 0 && e % 100 != 0 || e % 400 == 0 : !0;
547
549
  }
548
550
  return !isNaN(t.getTime());
549
- }, E = (e, t, r = "") => !e || !T(e) ? r : n(e).utc().tz("Asia/Shanghai").format(t || w), D = (e, t, r = "") => !e || !T(e) ? r : n(e).utc().tz("Europe/Paris").format(t || w), O = (e, t = "") => {
550
- if (!e || !T(e)) return t;
551
- let r = (new Date(n(e).format(w)).getTime() - new Date(n(e).utc().format(w)).getTime()) / 36e5;
552
- return r > 0 ? n(e).utc().add(r, "hours").toDate() : n(e).utc().subtract(r, "hours").toDate();
553
- }, k = (e, t) => {
554
- if (!e || !T(e)) return "";
555
- let r = n(e).utcOffset() - n(e).tz(t).utcOffset();
556
- return r > 0 ? n(e).add(r, "minutes").toDate() : n(e).subtract(r, "minutes").toDate();
557
- }, A = (e, t = "") => !e || !T(e) ? t : k(e, "Asia/Shanghai"), j = (e, t = "") => !e || !T(e) ? t : k(e, "Europe/Paris");
558
- export { n as dayjs, t as debounce, T as isValidDate, A as local_cn_date, j as local_fr_date, k as local_tz_date, O as local_utc_date, e as storage, E as utc_cn, D as utc_fr };
551
+ }, O = (e, t, n = "") => !e || !D(e) ? n : T(e).utc().tz("Asia/Shanghai").format(t || E), k = (e, t, n = "") => !e || !D(e) ? n : T(e).utc().tz("Europe/Paris").format(t || E), A = (e, t = "") => {
552
+ if (!e || !D(e)) return t;
553
+ let n = (new Date(T(e).format(E)).getTime() - new Date(T(e).utc().format(E)).getTime()) / 36e5;
554
+ return n > 0 ? T(e).utc().add(n, "hours").toDate() : T(e).utc().subtract(n, "hours").toDate();
555
+ }, j = (e, t) => {
556
+ if (!e || !D(e)) return "";
557
+ let n = T(e).utcOffset() - T(e).tz(t).utcOffset();
558
+ return n > 0 ? T(e).add(n, "minutes").toDate() : T(e).subtract(n, "minutes").toDate();
559
+ }, M = (e, t = "") => !e || !D(e) ? t : j(e, "Asia/Shanghai"), N = (e, t = "") => !e || !D(e) ? t : j(e, "Europe/Paris");
560
+ export { T as dayjs, t as debounce, D as isValidDate, M as local_cn_date, N as local_fr_date, j as local_tz_date, A as local_utc_date, e as storage, O as utc_cn, k as utc_fr };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftlab/one-vue3",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "One for Apps",
5
5
  "main": "dist/ftlOne.js",
6
6
  "type": "module",
@@ -106,7 +106,8 @@
106
106
  "*.css",
107
107
  "*.scss",
108
108
  "dist/style.css",
109
- "assets/**"
109
+ "assets/**",
110
+ "dist/utils*.js"
110
111
  ],
111
112
  "peerDependencies": {
112
113
  "@element-plus/icons-vue": "^2.0.0",