@duxweb/dvha-naiveui 1.1.30 → 1.2.0
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/cjs/components/autoComplete/autoComplete.cjs +1 -1
- package/dist/cjs/components/autoComplete/index.cjs +1 -0
- package/dist/cjs/components/cascader/cascader.cjs +1 -1
- package/dist/cjs/components/cascader/index.cjs +1 -0
- package/dist/cjs/components/index.cjs +1 -0
- package/dist/cjs/components/mention/index.cjs +1 -0
- package/dist/cjs/components/mention/mention.cjs +1 -1
- package/dist/cjs/components/select/index.cjs +1 -0
- package/dist/cjs/components/select/select.cjs +1 -1
- package/dist/cjs/components/transfer/index.cjs +1 -0
- package/dist/cjs/components/transfer/transfer.cjs +1 -1
- package/dist/cjs/components/tree/index.cjs +1 -0
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/treeSelect/index.cjs +1 -0
- package/dist/cjs/components/treeSelect/treeSelect.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -0
- package/dist/cjs/hooks/menu.cjs +1 -1
- package/dist/cjs/hooks/tab.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/hooks/upload.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/autoComplete/autoComplete.js +49 -62
- package/dist/esm/components/autoComplete/index.js +1 -0
- package/dist/esm/components/cascader/cascader.js +34 -50
- package/dist/esm/components/cascader/index.js +1 -0
- package/dist/esm/components/index.js +14 -0
- package/dist/esm/components/mention/index.js +1 -0
- package/dist/esm/components/mention/mention.js +55 -66
- package/dist/esm/components/select/index.js +1 -0
- package/dist/esm/components/select/select.js +162 -213
- package/dist/esm/components/transfer/index.js +1 -0
- package/dist/esm/components/transfer/transfer.js +63 -95
- package/dist/esm/components/tree/index.js +1 -0
- package/dist/esm/components/tree/tree.js +49 -71
- package/dist/esm/components/treeSelect/index.js +1 -0
- package/dist/esm/components/treeSelect/treeSelect.js +29 -36
- package/dist/esm/hooks/index.js +4 -0
- package/dist/esm/hooks/menu.js +21 -36
- package/dist/esm/hooks/tab.js +26 -28
- package/dist/esm/hooks/table.js +78 -87
- package/dist/esm/hooks/upload.js +38 -44
- package/dist/esm/index.js +12 -22
- package/package.json +2 -2
|
@@ -1,72 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTree as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
default: () => [o(u, y(m.value, {
|
|
52
|
-
cascade: !0,
|
|
53
|
-
checkable: !0,
|
|
54
|
-
defaultExpandAll: !0,
|
|
55
|
-
selectable: !1,
|
|
56
|
-
expandedKeys: t.value,
|
|
57
|
-
onUpdateExpandedKeys: (a) => {
|
|
58
|
-
t.value = a;
|
|
59
|
-
},
|
|
60
|
-
data: c.value || [],
|
|
61
|
-
checkedKeys: r.value || [],
|
|
62
|
-
onUpdateCheckedKeys: (a) => {
|
|
63
|
-
r.value = a, e.onUpdateValue?.(a);
|
|
64
|
-
}
|
|
65
|
-
}), null)]
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
68
|
-
}
|
|
1
|
+
import { computed as e, createVNode as t, defineComponent as n, mergeProps as r, ref as i, toRef as a, watch as o } from "vue";
|
|
2
|
+
import { useTree as s } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as c } from "@vueuse/core";
|
|
4
|
+
import { NScrollbar as l, NSpin as u, NTree as d } from "naive-ui";
|
|
5
|
+
const f = /* @__PURE__ */ n({
|
|
6
|
+
name: "DuxTree",
|
|
7
|
+
props: {
|
|
8
|
+
path: String,
|
|
9
|
+
params: Object,
|
|
10
|
+
height: String,
|
|
11
|
+
value: Array,
|
|
12
|
+
defaultValue: Array,
|
|
13
|
+
hookProps: Object
|
|
14
|
+
},
|
|
15
|
+
extends: d,
|
|
16
|
+
setup(n, { emit: f }) {
|
|
17
|
+
let p = a(n, "params", {}), m = a(n, "path", ""), h = c(n, "value", f, {
|
|
18
|
+
passive: !0,
|
|
19
|
+
deep: !0,
|
|
20
|
+
defaultValue: n.defaultValue || []
|
|
21
|
+
}), g = i([]), { options: _, loading: v, expanded: y } = s({
|
|
22
|
+
path: m,
|
|
23
|
+
params: p,
|
|
24
|
+
...n.hookProps
|
|
25
|
+
});
|
|
26
|
+
o(y, (e) => {
|
|
27
|
+
g.value = e;
|
|
28
|
+
});
|
|
29
|
+
let b = e(() => {
|
|
30
|
+
let { hookProps: e, height: t, ...r } = n;
|
|
31
|
+
return r;
|
|
32
|
+
});
|
|
33
|
+
return () => t(u, { show: v.value }, { default: () => [t(l, { style: { height: n.height || "300px" } }, { default: () => [t(d, r(b.value, {
|
|
34
|
+
cascade: !0,
|
|
35
|
+
checkable: !0,
|
|
36
|
+
defaultExpandAll: !0,
|
|
37
|
+
selectable: !1,
|
|
38
|
+
expandedKeys: g.value,
|
|
39
|
+
onUpdateExpandedKeys: (e) => {
|
|
40
|
+
g.value = e;
|
|
41
|
+
},
|
|
42
|
+
data: _.value || [],
|
|
43
|
+
checkedKeys: h.value || [],
|
|
44
|
+
onUpdateCheckedKeys: (e) => {
|
|
45
|
+
h.value = e, n.onUpdateValue?.(e);
|
|
46
|
+
}
|
|
47
|
+
}), null)] })] });
|
|
48
|
+
}
|
|
69
49
|
});
|
|
70
|
-
export {
|
|
71
|
-
U as DuxTree
|
|
72
|
-
};
|
|
50
|
+
export { f as DuxTree };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./treeSelect.js";
|
|
@@ -1,38 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createVNode as e, defineComponent as t, mergeProps as n, toRef as r } from "vue";
|
|
2
2
|
import { useTree as i } from "@duxweb/dvha-core";
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import { NTreeSelect as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
options: n.value,
|
|
31
|
-
value: t.value,
|
|
32
|
-
"onUpdate:value": (s) => t.value = s
|
|
33
|
-
}), null);
|
|
34
|
-
}
|
|
3
|
+
import { useVModel as a } from "@vueuse/core";
|
|
4
|
+
import { NTreeSelect as o } from "naive-ui";
|
|
5
|
+
const s = /* @__PURE__ */ t({
|
|
6
|
+
name: "DuxTreeSelect",
|
|
7
|
+
props: {
|
|
8
|
+
path: String,
|
|
9
|
+
params: Object,
|
|
10
|
+
hookProps: Object
|
|
11
|
+
},
|
|
12
|
+
extends: o,
|
|
13
|
+
setup(t, { emit: s }) {
|
|
14
|
+
let c = r(t, "params", {}), l = r(t, "path", ""), u = a(t, "value", s, {
|
|
15
|
+
passive: !0,
|
|
16
|
+
deep: !0,
|
|
17
|
+
defaultValue: t.defaultValue || []
|
|
18
|
+
}), { options: d, loading: f } = i({
|
|
19
|
+
path: l,
|
|
20
|
+
params: c,
|
|
21
|
+
...t.hookProps
|
|
22
|
+
});
|
|
23
|
+
return () => e(o, n(t, {
|
|
24
|
+
loading: f.value,
|
|
25
|
+
options: d.value,
|
|
26
|
+
value: u.value,
|
|
27
|
+
"onUpdate:value": (e) => u.value = e
|
|
28
|
+
}), null);
|
|
29
|
+
}
|
|
35
30
|
});
|
|
36
|
-
export {
|
|
37
|
-
S as DuxTreeSelect
|
|
38
|
-
};
|
|
31
|
+
export { s as DuxTreeSelect };
|
package/dist/esm/hooks/menu.js
CHANGED
|
@@ -1,37 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { RouterLink as
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
{ default: () => e.label }
|
|
23
|
-
) : e.label
|
|
24
|
-
}));
|
|
25
|
-
return u(t, {
|
|
26
|
-
idKey: "key",
|
|
27
|
-
parentKey: "parent",
|
|
28
|
-
childrenKey: "children",
|
|
29
|
-
sortKey: "sort"
|
|
30
|
-
}, void 0);
|
|
31
|
-
}),
|
|
32
|
-
...r
|
|
33
|
-
};
|
|
1
|
+
import { computed as e, h as t } from "vue";
|
|
2
|
+
import { arrayToTree as n, useMenu as r } from "@duxweb/dvha-core";
|
|
3
|
+
import { RouterLink as i } from "vue-router";
|
|
4
|
+
function a(a) {
|
|
5
|
+
let o = r(a);
|
|
6
|
+
return {
|
|
7
|
+
options: e(() => n(o.getMenu(!0).map((e) => ({
|
|
8
|
+
...e,
|
|
9
|
+
key: e.name,
|
|
10
|
+
icon: e?.icon ? () => t("div", { class: `${e.icon} size-5` }) : void 0,
|
|
11
|
+
labelName: e.label,
|
|
12
|
+
label: () => e.path ? t(i, { to: { path: e.path } }, { default: () => e.label }) : e.label
|
|
13
|
+
})), {
|
|
14
|
+
idKey: "key",
|
|
15
|
+
parentKey: "parent",
|
|
16
|
+
childrenKey: "children",
|
|
17
|
+
sortKey: "sort"
|
|
18
|
+
}, void 0)),
|
|
19
|
+
...o
|
|
20
|
+
};
|
|
34
21
|
}
|
|
35
|
-
export {
|
|
36
|
-
y as useNaiveMenu
|
|
37
|
-
};
|
|
22
|
+
export { a as useNaiveMenu };
|
package/dist/esm/hooks/tab.js
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { computed as e } from "vue";
|
|
2
|
+
import { useTabStore as t } from "@duxweb/dvha-core";
|
|
3
|
+
import { useRouter as n } from "vue-router";
|
|
4
|
+
import { storeToRefs as r } from "pinia";
|
|
5
|
+
function i() {
|
|
6
|
+
let i = t(), { tabs: a, current: o } = r(i), s = n(), c = e(() => ({
|
|
7
|
+
value: o.value,
|
|
8
|
+
defaultValue: o.value || "",
|
|
9
|
+
onClose: (e) => {
|
|
10
|
+
i.delTab(e, (e) => {
|
|
11
|
+
s.push(e.path || "");
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
onUpdateValue: (e) => {
|
|
15
|
+
i.changeTab(e, (e) => {
|
|
16
|
+
s.push(e.path || "");
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
return {
|
|
21
|
+
...i,
|
|
22
|
+
tabs: a,
|
|
23
|
+
current: o,
|
|
24
|
+
tabsProps: c
|
|
25
|
+
};
|
|
26
26
|
}
|
|
27
|
-
export {
|
|
28
|
-
h as useNaiveTab
|
|
29
|
-
};
|
|
27
|
+
export { i as useNaiveTab };
|
package/dist/esm/hooks/table.js
CHANGED
|
@@ -1,88 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
...a,
|
|
79
|
-
tablePagination: x,
|
|
80
|
-
table: z,
|
|
81
|
-
columns: s,
|
|
82
|
-
columnSelected: w,
|
|
83
|
-
onUpdateColumnSelected: y
|
|
84
|
-
};
|
|
1
|
+
import { computed as e, ref as t, toRef as n, unref as r, watch as i } from "vue";
|
|
2
|
+
import { treeToArr as a, useExtendList as o } from "@duxweb/dvha-core";
|
|
3
|
+
import { watchDebounced as s } from "@vueuse/core";
|
|
4
|
+
import { cloneDeep as c } from "lodash-es";
|
|
5
|
+
function l(l) {
|
|
6
|
+
let u = e(() => r(l.filters) || {}), d = e(() => r(l.sorters) || {}), f = n(l, "columns", []), p = t({}), m = t([]), h = t({
|
|
7
|
+
...u.value,
|
|
8
|
+
...p.value
|
|
9
|
+
}), g = t({ ...d.value }), _ = o({
|
|
10
|
+
...l,
|
|
11
|
+
filters: h,
|
|
12
|
+
sorters: g
|
|
13
|
+
});
|
|
14
|
+
s([u, p], ([e, t]) => {
|
|
15
|
+
let n = {
|
|
16
|
+
...e || {},
|
|
17
|
+
...t || {}
|
|
18
|
+
};
|
|
19
|
+
h.value = n, _.onUpdateFilters(n);
|
|
20
|
+
}, {
|
|
21
|
+
debounce: 300,
|
|
22
|
+
deep: !0
|
|
23
|
+
});
|
|
24
|
+
let v = t([]);
|
|
25
|
+
i(f, (e) => {
|
|
26
|
+
v.value = e;
|
|
27
|
+
}, { immediate: !0 });
|
|
28
|
+
let y = e(() => v.value.filter((e) => e.show !== !1 && "key" in e).map((e) => e.key)), b = (e) => {
|
|
29
|
+
v.value = [...c(f.value)?.map((t) => (!("key" in t) || !t?.key || !("title" in t) || !t?.title || e.includes(t.key) || (t.show = !1), t))];
|
|
30
|
+
}, x = (e) => {
|
|
31
|
+
_.checkeds.value = e;
|
|
32
|
+
}, S = (e) => {
|
|
33
|
+
let t = Array.isArray(e) ? e : [e], n = {};
|
|
34
|
+
t?.forEach((e) => {
|
|
35
|
+
e?.columnKey && e.order && (n[e.columnKey] = e.order === "ascend" ? "asc" : "desc");
|
|
36
|
+
}), g.value = n, _.onUpdateSorters(n);
|
|
37
|
+
}, C = (e) => {
|
|
38
|
+
let t = { ...p.value };
|
|
39
|
+
Object.entries(e).forEach(([e, n]) => {
|
|
40
|
+
t[e] = n;
|
|
41
|
+
}), p.value = t;
|
|
42
|
+
}, w = (e) => {
|
|
43
|
+
m.value = e;
|
|
44
|
+
};
|
|
45
|
+
i([() => l?.expanded, _.list], ([e, t]) => {
|
|
46
|
+
e && (m.value = a(t, l.key || "id", "children"));
|
|
47
|
+
});
|
|
48
|
+
let T = e(() => ({
|
|
49
|
+
page: _.page.value,
|
|
50
|
+
pageSize: _.pageSize.value,
|
|
51
|
+
pageCount: _.pageCount.value,
|
|
52
|
+
pageSizes: _.pageSizes,
|
|
53
|
+
pageSlot: 5,
|
|
54
|
+
onUpdatePage: _.onUpdatePage,
|
|
55
|
+
onUpdatePageSize: _.onUpdatePageSize,
|
|
56
|
+
showSizePicker: !0,
|
|
57
|
+
showQuickJumper: !0
|
|
58
|
+
})), E = e(() => ({
|
|
59
|
+
remote: !0,
|
|
60
|
+
checkedRowKeys: _.checkeds.value,
|
|
61
|
+
expandedRowKeys: m.value,
|
|
62
|
+
onUpdateCheckedRowKeys: x,
|
|
63
|
+
onUpdateExpandedRowKeys: w,
|
|
64
|
+
onUpdateSorter: S,
|
|
65
|
+
onUpdateFilters: C,
|
|
66
|
+
loading: _.isLoading.value,
|
|
67
|
+
data: _.list.value,
|
|
68
|
+
columns: v.value.filter((e) => e.show !== !1)
|
|
69
|
+
}));
|
|
70
|
+
return {
|
|
71
|
+
..._,
|
|
72
|
+
tablePagination: T,
|
|
73
|
+
table: E,
|
|
74
|
+
columns: v,
|
|
75
|
+
columnSelected: y,
|
|
76
|
+
onUpdateColumnSelected: b
|
|
77
|
+
};
|
|
85
78
|
}
|
|
86
|
-
export {
|
|
87
|
-
D as useNaiveTable
|
|
88
|
-
};
|
|
79
|
+
export { l as useNaiveTable };
|
package/dist/esm/hooks/upload.js
CHANGED
|
@@ -1,45 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
o?.();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
1
|
+
import { watch as e } from "vue";
|
|
2
|
+
import { useUpload as t } from "@duxweb/dvha-core";
|
|
3
|
+
function n(n) {
|
|
4
|
+
let r = t(n), i = /* @__PURE__ */ new Map();
|
|
5
|
+
e(() => r.uploadFiles.value, (e) => {
|
|
6
|
+
e.forEach((e) => {
|
|
7
|
+
let t = i.get(e.id);
|
|
8
|
+
t && (e.status === "uploading" && e.progress && t.onProgress ? t.onProgress({ percent: e.progress.percent || 0 }) : e.status === "success" ? (t.onFinish?.(), i.delete(e.id)) : e.status === "error" && (t.onError?.(), i.delete(e.id)));
|
|
9
|
+
});
|
|
10
|
+
}, { deep: !0 });
|
|
11
|
+
let a = (e) => {
|
|
12
|
+
let { file: t, onFinish: n, onError: a, onProgress: o } = e, s = t.file;
|
|
13
|
+
if (!s) {
|
|
14
|
+
a?.();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
r.addFiles([s], "file").then(() => {
|
|
18
|
+
let e = r.uploadFiles.value.find((e) => e.file === s);
|
|
19
|
+
if (!e) {
|
|
20
|
+
a?.();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
i.set(e.id, {
|
|
24
|
+
onFinish: n,
|
|
25
|
+
onError: a,
|
|
26
|
+
onProgress: o
|
|
27
|
+
}), r.trigger().catch(() => {
|
|
28
|
+
i.delete(e.id), a?.();
|
|
29
|
+
});
|
|
30
|
+
}).catch(() => {
|
|
31
|
+
a?.();
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
...r,
|
|
36
|
+
request: a
|
|
37
|
+
};
|
|
42
38
|
}
|
|
43
|
-
export {
|
|
44
|
-
F as useNaiveUpload
|
|
45
|
-
};
|
|
39
|
+
export { n as useNaiveUpload };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { DuxAutoComplete as
|
|
1
|
+
import { DuxAutoComplete as e } from "./components/autoComplete/autoComplete.js";
|
|
2
2
|
import { DuxCascader as t } from "./components/cascader/cascader.js";
|
|
3
|
-
import { DuxMention as
|
|
4
|
-
import { DuxSelect as
|
|
5
|
-
import { DuxTransfer as
|
|
6
|
-
import { DuxTree as
|
|
7
|
-
import { DuxTreeSelect as
|
|
8
|
-
import
|
|
3
|
+
import { DuxMention as n } from "./components/mention/mention.js";
|
|
4
|
+
import { DuxSelect as r } from "./components/select/select.js";
|
|
5
|
+
import { DuxTransfer as i } from "./components/transfer/transfer.js";
|
|
6
|
+
import { DuxTree as a } from "./components/tree/tree.js";
|
|
7
|
+
import { DuxTreeSelect as o } from "./components/treeSelect/treeSelect.js";
|
|
8
|
+
import "./components/index.js";
|
|
9
|
+
import { useNaiveMenu as s } from "./hooks/menu.js";
|
|
9
10
|
import { useNaiveTab as c } from "./hooks/tab.js";
|
|
10
|
-
import { useNaiveTable as
|
|
11
|
-
import { useNaiveUpload as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
t as DuxCascader,
|
|
15
|
-
u as DuxMention,
|
|
16
|
-
m as DuxSelect,
|
|
17
|
-
D as DuxTransfer,
|
|
18
|
-
i as DuxTree,
|
|
19
|
-
T as DuxTreeSelect,
|
|
20
|
-
v as useNaiveMenu,
|
|
21
|
-
c as useNaiveTab,
|
|
22
|
-
d as useNaiveTable,
|
|
23
|
-
M as useNaiveUpload
|
|
24
|
-
};
|
|
11
|
+
import { useNaiveTable as l } from "./hooks/table.js";
|
|
12
|
+
import { useNaiveUpload as u } from "./hooks/upload.js";
|
|
13
|
+
import "./hooks/index.js";
|
|
14
|
+
export { e as DuxAutoComplete, t as DuxCascader, n as DuxMention, r as DuxSelect, i as DuxTransfer, a as DuxTree, o as DuxTreeSelect, s as useNaiveMenu, c as useNaiveTab, l as useNaiveTable, u as useNaiveUpload };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duxweb/dvha-naiveui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"author": "DuxWeb",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"pinia": "^3.0.4",
|
|
34
34
|
"vue": "^3.5.24",
|
|
35
35
|
"vue-router": "^4.6.3",
|
|
36
|
-
"@duxweb/dvha-core": "1.
|
|
36
|
+
"@duxweb/dvha-core": "1.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"clean": "rimraf dist",
|