@ithinkdt/ui 4.0.2 → 4.0.3
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/{components-BOgApmgo.js → components-Blh7O5zj.js} +23 -23
- package/dist/components.js +1 -1
- package/dist/{directives-pSAvXd5F.js → directives-DXNnV4xc.js} +6 -6
- package/dist/directives.js +1 -1
- package/dist/index.js +19 -19
- package/dist/page.js +6 -5
- package/esm/page.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e } from "./use-i18n-Cmb7Xx7d.js";
|
|
2
2
|
import t, { c as n, cB as r, cE as i, cM as a, useClsPrefix as o } from "./use-style.js";
|
|
3
|
-
import { i as s } from "./directives-
|
|
3
|
+
import { i as s } from "./directives-DXNnV4xc.js";
|
|
4
4
|
import { Fragment as c, computed as l, createTextVNode as u, createVNode as d, defineComponent as f, h as p, inject as m, isVNode as h, markRaw as g, mergeProps as _, nextTick as v, reactive as y, ref as b, shallowRef as x, toRaw as S, toRef as C, toValue as w, unref as T, useTemplateRef as E, watch as D, withDirectives as O } from "vue";
|
|
5
5
|
import { toReactive as ee, unrefElement as k, until as A } from "@vueuse/core";
|
|
6
6
|
import { NAnchor as j, NAnchorLink as te, NAvatar as M, NAvatarGroup as ne, NButton as N, NCard as P, NCheckbox as F, NCheckboxGroup as re, NDataTable as ie, NDropdown as ae, NEllipsis as oe, NEmpty as se, NFlex as I, NForm as ce, NFormItem as le, NGi as ue, NGrid as de, NIcon as L, NInput as R, NList as fe, NListItem as pe, NPagination as me, NPopover as z, NRadio as B, NRadioButton as he, NRadioGroup as ge, NSelect as _e, NSpin as ve, NTag as V, NText as H, NTooltip as U, NTransfer as ye, NTree as be, NTreeSelect as xe, dataTableProps as Se, formProps as Ce, useDialog as we } from "ithinkdt-ui";
|
|
@@ -14,7 +14,7 @@ import { PAGE_INJECTION as Me, useFormModal as Ne } from "@ithinkdt/page";
|
|
|
14
14
|
import { Sortable as Pe } from "sortablejs";
|
|
15
15
|
import Fe from "ithinkdt-ui/es/_mixins/use-locale.mjs";
|
|
16
16
|
import { flattenTree as Ie, walkTree as Le } from "@ithinkdt/common";
|
|
17
|
-
const Re =
|
|
17
|
+
const Re = f({
|
|
18
18
|
name: "Checkboxes",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -282,7 +282,7 @@ const Re = /* @__PURE__ */ f({
|
|
|
282
282
|
}, e), [d("path", {
|
|
283
283
|
fill: "currentColor",
|
|
284
284
|
d: "m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"
|
|
285
|
-
}, null)]), rt =
|
|
285
|
+
}, null)]), rt = f({
|
|
286
286
|
name: "DataActions",
|
|
287
287
|
props: { options: {
|
|
288
288
|
type: Array,
|
|
@@ -351,7 +351,7 @@ const Re = /* @__PURE__ */ f({
|
|
|
351
351
|
function G(e) {
|
|
352
352
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
353
353
|
}
|
|
354
|
-
var it =
|
|
354
|
+
var it = f({
|
|
355
355
|
name: "DataCustomRow",
|
|
356
356
|
props: {
|
|
357
357
|
label: [String, Function],
|
|
@@ -393,7 +393,7 @@ var it = /* @__PURE__ */ f({
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
-
const at =
|
|
396
|
+
const at = f({
|
|
397
397
|
name: "DataCustom",
|
|
398
398
|
props: {
|
|
399
399
|
data: {
|
|
@@ -519,7 +519,7 @@ function lt(e, t, n, r) {
|
|
|
519
519
|
}
|
|
520
520
|
}, [e.label ? d("div", { class: `${r}__label` }, [K(e.label, n)]) : void 0, d("div", { class: `${r}__content` }, [(n ? e.render ? e.render(n) : n[e.prop] : void 0) ?? d("span", { class: `${r}__nothing` }, [u("--")])])]);
|
|
521
521
|
}
|
|
522
|
-
const ut =
|
|
522
|
+
const ut = f({
|
|
523
523
|
name: "DataDescriptions",
|
|
524
524
|
props: {
|
|
525
525
|
cols: {
|
|
@@ -565,7 +565,7 @@ const ut = /* @__PURE__ */ f({
|
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
|
-
var dt =
|
|
568
|
+
var dt = r("data-descriptions", [
|
|
569
569
|
i("header", {
|
|
570
570
|
fontWeight: "bold",
|
|
571
571
|
fontSize: "1.125rem",
|
|
@@ -673,7 +673,7 @@ const q = {
|
|
|
673
673
|
default: void 0
|
|
674
674
|
},
|
|
675
675
|
nativeButtonType: Boolean
|
|
676
|
-
}, ft =
|
|
676
|
+
}, ft = f({
|
|
677
677
|
name: "DataFormActions",
|
|
678
678
|
props: q,
|
|
679
679
|
emits: [
|
|
@@ -725,7 +725,7 @@ const q = {
|
|
|
725
725
|
function pt(e) {
|
|
726
726
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
727
727
|
}
|
|
728
|
-
const mt =
|
|
728
|
+
const mt = f({
|
|
729
729
|
name: "DataForm",
|
|
730
730
|
props: {
|
|
731
731
|
grid: {
|
|
@@ -882,7 +882,7 @@ const mt = /* @__PURE__ */ f({
|
|
|
882
882
|
}, m, { yGap: A ? 0 : m?.yGap ?? 24 }), { default: l })] });
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
}), ht =
|
|
885
|
+
}), ht = f({
|
|
886
886
|
name: "DataFilter",
|
|
887
887
|
props: {
|
|
888
888
|
grid: {
|
|
@@ -1035,7 +1035,7 @@ function J(t, n, r = 1) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
|
-
const _t =
|
|
1038
|
+
const _t = f({
|
|
1039
1039
|
name: "DataLocaleInput",
|
|
1040
1040
|
props: {
|
|
1041
1041
|
label: { type: [
|
|
@@ -1174,7 +1174,7 @@ const _t = /* @__PURE__ */ f({
|
|
|
1174
1174
|
})) ? t : { default: () => [t] });
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
|
-
}), Y =
|
|
1177
|
+
}), Y = f({
|
|
1178
1178
|
name: "DataPagination",
|
|
1179
1179
|
props: {
|
|
1180
1180
|
total: {
|
|
@@ -1226,7 +1226,7 @@ Y.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol();
|
|
|
1226
1226
|
function vt(e) {
|
|
1227
1227
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1228
1228
|
}
|
|
1229
|
-
const yt =
|
|
1229
|
+
const yt = f({
|
|
1230
1230
|
name: "DataSelection",
|
|
1231
1231
|
props: {
|
|
1232
1232
|
modelValue: {
|
|
@@ -1325,7 +1325,7 @@ function xt(e, t) {
|
|
|
1325
1325
|
return n.key === "$actions" && (n.cellProps ??= () => ({ style: { padding: "0 2px" } })), n;
|
|
1326
1326
|
}).filter((e) => e?.hidden !== !0);
|
|
1327
1327
|
}
|
|
1328
|
-
const St =
|
|
1328
|
+
const St = f({
|
|
1329
1329
|
name: "DataTable",
|
|
1330
1330
|
props: {
|
|
1331
1331
|
data: {
|
|
@@ -1456,7 +1456,7 @@ const St = /* @__PURE__ */ f({
|
|
|
1456
1456
|
}, bt(n) ? n : { default: () => [n] });
|
|
1457
1457
|
}
|
|
1458
1458
|
});
|
|
1459
|
-
var Ct =
|
|
1459
|
+
var Ct = r("datatable", [i("row-highlight", [n("& > td", { backgroundColor: "var(--n-tr-highlight-color, var(--n-merged-border-color)) !important" })]), a("sticky", [
|
|
1460
1460
|
n(".n-data-table-base-table-header", {
|
|
1461
1461
|
position: "sticky",
|
|
1462
1462
|
top: "-1px",
|
|
@@ -1503,7 +1503,7 @@ function wt(e, { data: t, onSort: n, ...r }) {
|
|
|
1503
1503
|
function Tt(e) {
|
|
1504
1504
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1505
1505
|
}
|
|
1506
|
-
const Et =
|
|
1506
|
+
const Et = f({
|
|
1507
1507
|
name: "Radios",
|
|
1508
1508
|
props: {
|
|
1509
1509
|
options: {
|
|
@@ -1594,7 +1594,7 @@ const Et = /* @__PURE__ */ f({
|
|
|
1594
1594
|
function X(e) {
|
|
1595
1595
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1596
1596
|
}
|
|
1597
|
-
const Dt =
|
|
1597
|
+
const Dt = f({
|
|
1598
1598
|
name: "UserDept",
|
|
1599
1599
|
inheritAttrs: !1,
|
|
1600
1600
|
props: {
|
|
@@ -1667,7 +1667,7 @@ const Dt = /* @__PURE__ */ f({
|
|
|
1667
1667
|
if (t.multiple) return t.modelValue || [];
|
|
1668
1668
|
let e = t.modelValue?.trim();
|
|
1669
1669
|
return e ? [e] : [];
|
|
1670
|
-
}), u =
|
|
1670
|
+
}), u = new Map(), f = l(() => (u.clear(), t.users.map((e) => (e = y(e), e.label = e.nickname + e.username, e.value = e[o.value], e.type = "user", u.set(e[o.value], e), e)))), p = x([]);
|
|
1671
1671
|
D(() => t.depts, (e) => {
|
|
1672
1672
|
Le(e, (e) => {
|
|
1673
1673
|
e.label = e.name, e.value = e[o.value], e.type = "dept", e.children?.length || delete e.children;
|
|
@@ -1693,7 +1693,7 @@ const Dt = /* @__PURE__ */ f({
|
|
|
1693
1693
|
type: "user"
|
|
1694
1694
|
};
|
|
1695
1695
|
})];
|
|
1696
|
-
}, C =
|
|
1696
|
+
}, C = new WeakMap(), w = (e, n, r) => {
|
|
1697
1697
|
let a;
|
|
1698
1698
|
if (t.type === "dept") return d(be, {
|
|
1699
1699
|
data: t.depts,
|
|
@@ -1716,7 +1716,7 @@ const Dt = /* @__PURE__ */ f({
|
|
|
1716
1716
|
n(e);
|
|
1717
1717
|
}
|
|
1718
1718
|
}, null);
|
|
1719
|
-
let o = e ? C.get(e) :
|
|
1719
|
+
let o = e ? C.get(e) : new Set();
|
|
1720
1720
|
if (e && !o && (o = new Set(e), C.set(e, o)), g.value === !1) return d(ve, { show: !0 }, null);
|
|
1721
1721
|
let s = g.value || m.value;
|
|
1722
1722
|
r = r?.trim(), r && (s = s?.filter((e) => e.label.includes(r) || e.value.includes(r)));
|
|
@@ -1929,7 +1929,7 @@ function Q(e, t = {}) {
|
|
|
1929
1929
|
}, { default: () => [d(M, null, { default: () => [u("+"), t] })] })
|
|
1930
1930
|
})]);
|
|
1931
1931
|
}
|
|
1932
|
-
const Ot =
|
|
1932
|
+
const Ot = f({
|
|
1933
1933
|
name: "DeptRender",
|
|
1934
1934
|
props: {
|
|
1935
1935
|
value: [String, Array],
|
|
@@ -1950,7 +1950,7 @@ const Ot = /* @__PURE__ */ f({
|
|
|
1950
1950
|
});
|
|
1951
1951
|
}, { immediate: !0 }), () => t.value.map((e) => d(V, { key: e.code }, { default: () => [e.name] }));
|
|
1952
1952
|
}
|
|
1953
|
-
}), kt =
|
|
1953
|
+
}), kt = f({
|
|
1954
1954
|
name: "UserRender",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
value: [String, Array],
|
|
@@ -2004,7 +2004,7 @@ const Ot = /* @__PURE__ */ f({
|
|
|
2004
2004
|
],
|
|
2005
2005
|
default: void 0
|
|
2006
2006
|
}
|
|
2007
|
-
}, At =
|
|
2007
|
+
}, At = f({
|
|
2008
2008
|
name: "StateButton",
|
|
2009
2009
|
props: $,
|
|
2010
2010
|
setup(e, { slots: t }) {
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./components-
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./components-Blh7O5zj.js";
|
|
2
2
|
export { n as DataActions, b as DataCustom, v as DataDescriptions, u as DataFilter, s as DataForm, o as DataFormActions, a as DataLocaleInput, i as DataPagination, _ as DataSelection, r as DataTable, m as DtDeptRender, c as DtUserDept, t as DtUserRender, y as NCheckboxes, h as NRadios, g as NStateButton, d as StateButtonProps, e as dataFormActionsProps, f as renderUsers, l as useDataTableDrag, p as useLocaleEdit };
|
|
@@ -10,7 +10,7 @@ var C = [
|
|
|
10
10
|
2,
|
|
11
11
|
3,
|
|
12
12
|
5
|
|
13
|
-
], w =
|
|
13
|
+
], w = t([
|
|
14
14
|
t(({ props: e }) => `:where(span${e.bPrefix}tooltip-host)`, { display: "inline-block" }),
|
|
15
15
|
t(({ props: e }) => `:where(${e.bPrefix}tooltip-host)`, {
|
|
16
16
|
maxWidth: "100%",
|
|
@@ -30,7 +30,7 @@ var C = [
|
|
|
30
30
|
whiteSpace: "normal",
|
|
31
31
|
lineHeight: "1.25"
|
|
32
32
|
})
|
|
33
|
-
]), T =
|
|
33
|
+
]), T = Symbol("tooltip-dir"), E = f();
|
|
34
34
|
function D(e) {
|
|
35
35
|
let t = e.firstChild;
|
|
36
36
|
if (!t) return !1;
|
|
@@ -44,7 +44,7 @@ function D(e) {
|
|
|
44
44
|
return n.width >= e.clientWidth + 1 || n.height >= e.clientHeight + 2;
|
|
45
45
|
}
|
|
46
46
|
var O, k, A;
|
|
47
|
-
const j =
|
|
47
|
+
const j = s({
|
|
48
48
|
name: "TooltipDirectiveProvider",
|
|
49
49
|
props: { delay: {
|
|
50
50
|
type: Number,
|
|
@@ -136,7 +136,7 @@ const P = {
|
|
|
136
136
|
E.value === e && (E.value = void 0), e[T] && (e.removeEventListener("mouseenter", M), e.bindClick = !1, e.removeEventListener("click", N), e.classList.remove(`${A.value}-tooltip-host`, `${A.value}-tooltip-expandable`, `${A.value}-tooltip-expanded`, ...C.map((e) => `${A.value}-tooltip-ell${e}`)), delete e[T]);
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
-
var F, I, L =
|
|
139
|
+
var F, I, L = t([t(({ props: e }) => `:where(${e.bPrefix}spin-host)`, { position: "relative" }), n("spin-directive", {
|
|
140
140
|
zIndex: "999999",
|
|
141
141
|
position: "absolute",
|
|
142
142
|
color: "var(--color-primary)",
|
|
@@ -157,14 +157,14 @@ var F, I, L = /* @__PURE__ */ t([t(({ props: e }) => `:where(${e.bPrefix}spin-ho
|
|
|
157
157
|
r("tip:empty", { display: "none" }),
|
|
158
158
|
i("spining", { backgroundColor: "rgb(var(--host-bg, 255 255 255) / 0.5)" }, [r("tip, icon", { opacity: "1" })])
|
|
159
159
|
])]);
|
|
160
|
-
const R =
|
|
160
|
+
const R = s({
|
|
161
161
|
name: "SpinDirectiveProvider",
|
|
162
162
|
props: { dark: Boolean },
|
|
163
163
|
setup(t) {
|
|
164
164
|
return F = e("-spin-directive", L), I = p(t, "dark"), () => c(a);
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
|
-
var z =
|
|
167
|
+
var z = Symbol("spin-dir"), B = (e, { value: t, modifiers: n }) => {
|
|
168
168
|
if (e[z].loading.value = !!t, !e[z].loading.value) return;
|
|
169
169
|
let r = n.dark || !n.light && I.value;
|
|
170
170
|
e[z].spinEl.style.setProperty("--host-bg", r ? "0 0 0" : "255 255 255");
|
package/dist/directives.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./directives-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./directives-DXNnV4xc.js";
|
|
2
2
|
export { r as SpinDirectiveProvider, n as TooltipDirectiveProvider, t as vSpin, e as vTooltip };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./use-i18n-Cmb7Xx7d.js";
|
|
2
2
|
import n, { c as r, cB as i, cE as a, cM as o } from "./use-style.js";
|
|
3
|
-
import { i as s, n as c, r as l, t as u } from "./directives-
|
|
3
|
+
import { i as s, n as c, r as l, t as u } from "./directives-DXNnV4xc.js";
|
|
4
4
|
import { Fragment as d, computed as f, createVNode as p, defineComponent as m, inject as h, isVNode as g, mergeProps as _, provide as v, reactive as y, ref as b, renderSlot as x, shallowRef as ee, toRef as S, toValue as C, unref as w, useTemplateRef as T, watch as E, withDirectives as D } from "vue";
|
|
5
5
|
import { computedAsync as te, promiseTimeout as O, useElementHover as k, useElementSize as ne, useEventListener as re, useFullscreen as ie, watchDebounced as ae } from "@vueuse/core";
|
|
6
6
|
import { NAvatar as A, NBadge as oe, NBreadcrumb as se, NBreadcrumbItem as ce, NButton as j, NDrawer as le, NDrawerContent as M, NDropdown as N, NEmpty as P, NIcon as F, NList as I, NListItem as L, NMenu as R, NPagination as z, NPopover as B, NScrollbar as V, NText as H, NThing as U, useThemeVars as W } from "ithinkdt-ui";
|
|
@@ -12,7 +12,7 @@ import { format as me } from "date-fns";
|
|
|
12
12
|
function K(e) {
|
|
13
13
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
14
14
|
}
|
|
15
|
-
const he =
|
|
15
|
+
const he = m({
|
|
16
16
|
name: "AppAccount",
|
|
17
17
|
props: {
|
|
18
18
|
username: String,
|
|
@@ -115,7 +115,7 @@ const he = /* @__PURE__ */ m({
|
|
|
115
115
|
]]) : void 0
|
|
116
116
|
]);
|
|
117
117
|
}
|
|
118
|
-
}), ge =
|
|
118
|
+
}), ge = m({
|
|
119
119
|
name: "AppAppearance",
|
|
120
120
|
props: { mode: String },
|
|
121
121
|
emit: ["update:mode"],
|
|
@@ -178,7 +178,7 @@ const he = /* @__PURE__ */ m({
|
|
|
178
178
|
function _e(e) {
|
|
179
179
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
180
180
|
}
|
|
181
|
-
const ve =
|
|
181
|
+
const ve = m({
|
|
182
182
|
name: "AppBreadcrumb",
|
|
183
183
|
props: {
|
|
184
184
|
items: {
|
|
@@ -207,7 +207,7 @@ const ve = /* @__PURE__ */ m({
|
|
|
207
207
|
}, { default: () => [e.icon ? p(d, null, [p(F, { component: e[r] }, null), " "]) : void 0, C(e.title)] }))) ? n : { default: () => [n] });
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
}), ye =
|
|
210
|
+
}), ye = m({
|
|
211
211
|
name: "AppFullscreen",
|
|
212
212
|
props: {},
|
|
213
213
|
emit: ["change"],
|
|
@@ -250,7 +250,7 @@ const ve = /* @__PURE__ */ m({
|
|
|
250
250
|
{ bottom: !0 }
|
|
251
251
|
]]);
|
|
252
252
|
}
|
|
253
|
-
}), be =
|
|
253
|
+
}), be = m({
|
|
254
254
|
name: "AppLanguage",
|
|
255
255
|
props: {
|
|
256
256
|
lang: String,
|
|
@@ -282,7 +282,7 @@ const ve = /* @__PURE__ */ m({
|
|
|
282
282
|
}, [p("path", { d: "M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2S2 6.477 2 12Z" }, null), p("path", { d: "M13 2.05S16 6 16 12c0 6-3 9.95-3 9.95m-2 0S8 18 8 12c0-6 3-9.95 3-9.95M2.63 15.5h18.74m-18.74-7h18.74" }, null)])])] })] })] });
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
|
-
var xe =
|
|
285
|
+
var xe = r([
|
|
286
286
|
i("layout", {
|
|
287
287
|
display: "grid",
|
|
288
288
|
gridTemplateAreas: "\n 'sider header'\n 'sider content'\n 'sider footer'\n ",
|
|
@@ -360,7 +360,7 @@ var xe = /* @__PURE__ */ r([
|
|
|
360
360
|
d: "M12.5 18s6-4.419 6-6s-6-6-6-6m-7 12s6-4.419 6-6s-6-6-6-6",
|
|
361
361
|
color: "currentColor"
|
|
362
362
|
}, null)]);
|
|
363
|
-
const we =
|
|
363
|
+
const we = m({
|
|
364
364
|
name: "AppLayout",
|
|
365
365
|
props: {
|
|
366
366
|
layout: {
|
|
@@ -393,7 +393,7 @@ const we = /* @__PURE__ */ m({
|
|
|
393
393
|
}, [x(t, "default")]);
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
}), Te =
|
|
396
|
+
}), Te = m({
|
|
397
397
|
name: "AppHeader",
|
|
398
398
|
props: { height: {
|
|
399
399
|
type: Number,
|
|
@@ -403,7 +403,7 @@ const we = /* @__PURE__ */ m({
|
|
|
403
403
|
let n = X();
|
|
404
404
|
return () => (n.headerHeight = e.height + "px", p("div", { class: "app-header" }, [x(t, "default")]));
|
|
405
405
|
}
|
|
406
|
-
}), Ee =
|
|
406
|
+
}), Ee = m({
|
|
407
407
|
name: "AppSidebar",
|
|
408
408
|
props: {
|
|
409
409
|
showCollapseBtn: {
|
|
@@ -432,12 +432,12 @@ const we = /* @__PURE__ */ m({
|
|
|
432
432
|
}
|
|
433
433
|
}, { default: () => [p(F, { size: "20" }, { default: () => [t.collapsed ? p(Ce, null, null) : p(Se, null, null)] })] }), [[s, t.collapsed ? i("common.layout.sider.expand") : i("common.layout.sider.collapse")]]) : void 0]));
|
|
434
434
|
}
|
|
435
|
-
}), De =
|
|
435
|
+
}), De = m({
|
|
436
436
|
name: "AppContent",
|
|
437
437
|
setup(e, { slots: t }) {
|
|
438
438
|
return () => p("div", { class: "app-content" }, [x(t, "default")]);
|
|
439
439
|
}
|
|
440
|
-
}), Oe =
|
|
440
|
+
}), Oe = m({
|
|
441
441
|
name: "AppFooter",
|
|
442
442
|
props: { height: {
|
|
443
443
|
type: Number,
|
|
@@ -451,7 +451,7 @@ const we = /* @__PURE__ */ m({
|
|
|
451
451
|
function ke(e) {
|
|
452
452
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
453
453
|
}
|
|
454
|
-
const Z =
|
|
454
|
+
const Z = m({
|
|
455
455
|
name: "AppLogo",
|
|
456
456
|
props: {
|
|
457
457
|
src: [String, Function],
|
|
@@ -511,7 +511,7 @@ const Z = /* @__PURE__ */ m({
|
|
|
511
511
|
function Q(e) {
|
|
512
512
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
513
513
|
}
|
|
514
|
-
const Ae =
|
|
514
|
+
const Ae = m({
|
|
515
515
|
name: "AppMenu",
|
|
516
516
|
props: {
|
|
517
517
|
menus: Array,
|
|
@@ -835,7 +835,7 @@ var Ne = (e) => p("svg", e, [
|
|
|
835
835
|
height: "36",
|
|
836
836
|
fill: "currentColor"
|
|
837
837
|
}, null)])])
|
|
838
|
-
]), Pe =
|
|
838
|
+
]), Pe = m({
|
|
839
839
|
name: "AppTab",
|
|
840
840
|
props: {
|
|
841
841
|
path: String,
|
|
@@ -893,7 +893,7 @@ var Ne = (e) => p("svg", e, [
|
|
|
893
893
|
]);
|
|
894
894
|
}
|
|
895
895
|
});
|
|
896
|
-
const Fe =
|
|
896
|
+
const Fe = m({
|
|
897
897
|
name: "AppMultiTabs",
|
|
898
898
|
props: {
|
|
899
899
|
fullTab: Boolean,
|
|
@@ -951,7 +951,7 @@ const Fe = /* @__PURE__ */ m({
|
|
|
951
951
|
function $(e) {
|
|
952
952
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
953
953
|
}
|
|
954
|
-
const Ie =
|
|
954
|
+
const Ie = m({
|
|
955
955
|
name: "AppNotification",
|
|
956
956
|
inheritAttrs: !1,
|
|
957
957
|
props: {
|
|
@@ -1154,7 +1154,7 @@ var Le = (e) => p("svg", _({
|
|
|
1154
1154
|
fill: "currentColor",
|
|
1155
1155
|
d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
|
|
1156
1156
|
}, null)]);
|
|
1157
|
-
const Re =
|
|
1157
|
+
const Re = m({
|
|
1158
1158
|
name: "AppTenant",
|
|
1159
1159
|
props: {
|
|
1160
1160
|
options: Array,
|
|
@@ -1201,7 +1201,7 @@ const Re = /* @__PURE__ */ m({
|
|
|
1201
1201
|
})] });
|
|
1202
1202
|
};
|
|
1203
1203
|
}
|
|
1204
|
-
}), ze =
|
|
1204
|
+
}), ze = m({
|
|
1205
1205
|
name: "UIProvider",
|
|
1206
1206
|
props: { i18n: Function },
|
|
1207
1207
|
setup(e, { slots: n }) {
|
package/dist/page.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "./use-i18n-Cmb7Xx7d.js";
|
|
2
|
-
import { a as t, h as n, i as r, r as i, s as a, x as o } from "./components-
|
|
2
|
+
import { a as t, h as n, i as r, r as i, s as a, x as o } from "./components-Blh7O5zj.js";
|
|
3
3
|
import { computed as s, createVNode as c, defineComponent as l, h as u, isVNode as d, mergeProps as f, nextTick as p, ref as m, shallowRef as h, toValue as g, unref as _ } from "vue";
|
|
4
4
|
import { until as v, useClipboard as y } from "@vueuse/core";
|
|
5
5
|
import { NButton as b, NCheckbox as x, NColorPicker as S, NDatePicker as C, NDrawer as w, NDrawerContent as T, NFlex as E, NIcon as D, NInput as O, NInputNumber as k, NModal as A, NScrollbar as j, NSelect as M, NText as N, NUpload as P, useMessage as F } from "ithinkdt-ui";
|
|
@@ -12,7 +12,7 @@ import { useDict as V, useDictMap as H } from "@ithinkdt/common/dict";
|
|
|
12
12
|
function U(e) {
|
|
13
13
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
|
|
14
14
|
}
|
|
15
|
-
var W = (e) => Object.fromEntries(Object.entries(e || {}).map(([e, t]) => [e, _(t)])), G =
|
|
15
|
+
var W = (e) => Object.fromEntries(Object.entries(e || {}).map(([e, t]) => [e, _(t)])), G = l({
|
|
16
16
|
name: "SimpleUpload",
|
|
17
17
|
props: {
|
|
18
18
|
type: {
|
|
@@ -131,12 +131,12 @@ function K({ getUserGroups: e, getUsersByGroup: n, getDeptsByCode: i, getUsersBy
|
|
|
131
131
|
return c(N, {
|
|
132
132
|
depth: 2,
|
|
133
133
|
style: "line-height: 1.25"
|
|
134
|
-
}, U(e = (C?.map((e) => t?.find((t) => t[x.valueField || "value"] === e)) ?? []).map((e, t, n) => {
|
|
134
|
+
}, U(e = (C?.map((e) => _(t)?.find((t) => t[x.valueField || "value"] === e)) ?? []).map((e, t, n) => {
|
|
135
135
|
let r = e ? x.renderLabel ? x.renderLabel(e) ?? "" : e[x.labelField || "label"] ?? "" : C[t] ?? "";
|
|
136
136
|
return c("span", { key: e ? e[x.valueField || "value"] : C[t] ?? "" }, [r, t < n.length - 1 ? ", " : ""]);
|
|
137
137
|
})) ? e : { default: () => [e] });
|
|
138
138
|
} else {
|
|
139
|
-
let e = t?.find((e) => e[x.valueField || "value"] === C);
|
|
139
|
+
let e = _(t)?.find((e) => e[x.valueField || "value"] === C);
|
|
140
140
|
return c(N, {
|
|
141
141
|
depth: 2,
|
|
142
142
|
style: "line-height: 1.25"
|
|
@@ -146,6 +146,7 @@ function K({ getUserGroups: e, getUsersByGroup: n, getDeptsByCode: i, getUsersBy
|
|
|
146
146
|
n(r ? e?.map(g) : g(e), ...t);
|
|
147
147
|
}), u(M, {
|
|
148
148
|
clearable: !0,
|
|
149
|
+
filterable: _(t)?.length > 9,
|
|
149
150
|
loading: t?.loading,
|
|
150
151
|
...x,
|
|
151
152
|
options: _(t),
|
|
@@ -265,7 +266,7 @@ function K({ getUserGroups: e, getUsersByGroup: n, getDeptsByCode: i, getUsersBy
|
|
|
265
266
|
}, e);
|
|
266
267
|
},
|
|
267
268
|
upload: () => {
|
|
268
|
-
let e = null, t =
|
|
269
|
+
let e = null, t = new Map(), n = new Map(), r = h([]), i = 0, a = (e) => {
|
|
269
270
|
let t = ++i;
|
|
270
271
|
r.value = e.map((e) => n.get(e)).filter(Boolean);
|
|
271
272
|
let a = e.filter((e) => !n.has(e));
|
package/esm/page.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ declare module '@ithinkdt/page' {
|
|
|
105
105
|
user: {
|
|
106
106
|
userProps?: ShallowMaybeRef<Omit<UserDeptProps<boolean>, 'modelValue' | 'onUpdate:modelValue' | 'disabled'
|
|
107
107
|
| 'users' | 'groups' | 'depts' | 'getUsersByGroup' | 'getUsersByDept' | 'renderUserInfo'> & {
|
|
108
|
-
renderInfo
|
|
108
|
+
renderInfo?: UserRenderProps['renderInfo']
|
|
109
109
|
}> & PublicProps
|
|
110
110
|
userSlots?: {}
|
|
111
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ithinkdt/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "iThinkDT UI",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"sortablejs": "^1.15.7",
|
|
65
65
|
"@types/sortablejs": "^1.15.9",
|
|
66
66
|
"nanoid": "^5.1.6",
|
|
67
|
-
"@ithinkdt/common": "^4.0.
|
|
67
|
+
"@ithinkdt/common": "^4.0.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@ithinkdt/page": ">=4.0",
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"@vitejs/plugin-vue-jsx": "^5.1.4",
|
|
86
86
|
"ithinkdt-ui": "^1.8.5",
|
|
87
87
|
"typescript": "~5.9.3",
|
|
88
|
-
"unocss": ">=66.6.
|
|
89
|
-
"vite": "^8.0.0-beta.
|
|
88
|
+
"unocss": ">=66.6.2",
|
|
89
|
+
"vite": "^8.0.0-beta.16",
|
|
90
90
|
"vue": "^3.5.29",
|
|
91
91
|
"vue-router": "^5.0.3",
|
|
92
|
-
"@ithinkdt/page": "^4.0.
|
|
92
|
+
"@ithinkdt/page": "^4.0.4"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|
|
95
95
|
"dev": "vite build --watch",
|