@otwb/ui 2.0.39 → 2.0.41
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/page.js +13 -8
- package/package.json +1 -1
package/dist/page.js
CHANGED
|
@@ -7,6 +7,7 @@ import { until } from "@vueuse/core";
|
|
|
7
7
|
import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
|
|
8
8
|
import { format } from "date-fns";
|
|
9
9
|
import { useFormItem } from "ithinkdt-ui/es/_mixins";
|
|
10
|
+
import "nanoid";
|
|
10
11
|
import { useDict, useDictMap } from "@otwb/common/dict";
|
|
11
12
|
function _isSlot(i) {
|
|
12
13
|
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !isVNode(i);
|
|
@@ -386,21 +387,25 @@ function createPageTableHelper({ getDeptsByCode: i, getUsersByUsername: c, getFi
|
|
|
386
387
|
}, null))) ? f : { default: () => [f] }) : void 0;
|
|
387
388
|
},
|
|
388
389
|
file: () => {
|
|
389
|
-
let i =
|
|
390
|
-
return (
|
|
391
|
-
let
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
390
|
+
let i = shallowRef(/* @__PURE__ */ new Map()), c = /* @__PURE__ */ new Set();
|
|
391
|
+
return (u, d, f, p) => {
|
|
392
|
+
let m;
|
|
393
|
+
if (!u) return;
|
|
394
|
+
let g = Array.isArray(u) ? u : p?.multiple ? u.split(",") : [u], _ = g.join(","), v = i.value.get(_);
|
|
395
|
+
return !v && !c.has(_) && (c.add(_), l(g).then((c) => {
|
|
396
|
+
i.value.set(_, c || []), i.value = new Map(i.value);
|
|
397
|
+
}).finally(() => {
|
|
398
|
+
c.delete(_);
|
|
399
|
+
})), v ? createVNode(NFlex, {
|
|
395
400
|
gap: "8",
|
|
396
401
|
wrap: !0
|
|
397
|
-
}, _isSlot(
|
|
402
|
+
}, _isSlot(m = v.map((i) => createVNode("a", {
|
|
398
403
|
key: i.id,
|
|
399
404
|
href: i.url,
|
|
400
405
|
target: "_blank",
|
|
401
406
|
rel: "noreferrer",
|
|
402
407
|
style: "max-width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
|
|
403
|
-
}, [i.name]))) ?
|
|
408
|
+
}, [i.name]))) ? m : { default: () => [m] }) : createVNode("div", null, null);
|
|
404
409
|
};
|
|
405
410
|
},
|
|
406
411
|
dept: () => (c, l, u, d) => {
|