@aplus-frontend/ui 0.1.33 → 0.1.35
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/es/src/ap-table/components/setting/select-group/index.vue2.mjs +8 -8
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -11
- package/es/src/ap-table/components/setting/utils.mjs +29 -29
- package/es/src/ap-upload/apUpload.vue.d.ts +2 -0
- package/es/src/ap-upload/apUpload.vue.mjs +38 -36
- package/es/src/check-card/style/index.css +1 -0
- package/es/src/theme/check-card/index.css +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +2 -0
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/check-card/style/index.css +1 -0
- package/lib/src/theme/check-card/index.css +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as
|
|
1
|
+
import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as s, createElementBlock as f, createElementVNode as v, normalizeClass as x, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as D, renderList as L, mergeProps as j } from "vue";
|
|
2
2
|
import { Checkbox as w, Row as z, Col as F } from "ant-design-vue";
|
|
3
3
|
import "../../style/setting/select-group.css";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
@@ -32,11 +32,11 @@ const M = /* @__PURE__ */ E({
|
|
|
32
32
|
e.children.forEach((n) => n.show = o), e.show = o, c.value = !1;
|
|
33
33
|
}
|
|
34
34
|
function A(o, e) {
|
|
35
|
-
const n = t.value, l = n.children.find((
|
|
35
|
+
const n = t.value, l = n.children.find((a) => a.key === o);
|
|
36
36
|
if (!l)
|
|
37
37
|
return;
|
|
38
38
|
l.show = e;
|
|
39
|
-
const d = n.children.every((
|
|
39
|
+
const d = n.children.every((a) => a.show), N = n.children.some((a) => a.show);
|
|
40
40
|
n.show = d, c.value = N && !d;
|
|
41
41
|
}
|
|
42
42
|
const B = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
|
|
@@ -52,7 +52,7 @@ const M = /* @__PURE__ */ E({
|
|
|
52
52
|
}
|
|
53
53
|
), (o, e) => {
|
|
54
54
|
var n;
|
|
55
|
-
return
|
|
55
|
+
return s(), f("div", null, [
|
|
56
56
|
v("div", {
|
|
57
57
|
class: x(r(C)("header"))
|
|
58
58
|
}, [
|
|
@@ -63,15 +63,15 @@ const M = /* @__PURE__ */ E({
|
|
|
63
63
|
disabled: B.value
|
|
64
64
|
}, {
|
|
65
65
|
default: i(() => [
|
|
66
|
-
(
|
|
66
|
+
(s(), h(k(r(b)(m.value.title))))
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
69
|
}, 8, ["indeterminate", "checked", "disabled"])
|
|
70
70
|
], 2),
|
|
71
71
|
v("div", null, [
|
|
72
|
-
u(r(z),
|
|
72
|
+
u(r(z), { align: "middle" }, {
|
|
73
73
|
default: i(() => [
|
|
74
|
-
(
|
|
74
|
+
(s(!0), f(D, null, L(m.value.children, (l) => (s(), h(r(F), {
|
|
75
75
|
key: l.key,
|
|
76
76
|
span: 8
|
|
77
77
|
}, {
|
|
@@ -80,7 +80,7 @@ const M = /* @__PURE__ */ E({
|
|
|
80
80
|
"onUpdate:checked": (d) => A(l.key, d)
|
|
81
81
|
}), {
|
|
82
82
|
default: i(() => [
|
|
83
|
-
(
|
|
83
|
+
(s(), h(k(r(b)(l.title))))
|
|
84
84
|
]),
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as x, unref as
|
|
1
|
+
import { defineComponent as b, computed as x, unref as l, openBlock as c, createElementBlock as i, createVNode as s, withCtx as d, Fragment as m, renderList as w, createBlock as u, mergeProps as B, resolveDynamicComponent as I } from "vue";
|
|
2
2
|
import { Row as L, Col as k, Checkbox as N } from "ant-design-vue";
|
|
3
3
|
import "../select-group/index.vue.mjs";
|
|
4
4
|
import { useInjectApTable as P } from "../../../context.mjs";
|
|
@@ -10,7 +10,7 @@ const $ = /* @__PURE__ */ b({
|
|
|
10
10
|
value: {}
|
|
11
11
|
},
|
|
12
12
|
setup(_) {
|
|
13
|
-
const a = _, { columnsBackup:
|
|
13
|
+
const a = _, { columnsBackup: g } = P(), y = x(() => [...l(g) || []].sort((e, n) => {
|
|
14
14
|
var t, o, p, h;
|
|
15
15
|
return (t = e.children) != null && t.length && !((o = n.children) != null && o.length) ? 1 : !((p = e.children) != null && p.length) && ((h = n.children) != null && h.length) ? -1 : 0;
|
|
16
16
|
}));
|
|
@@ -28,34 +28,37 @@ const $ = /* @__PURE__ */ b({
|
|
|
28
28
|
const n = a.value, t = n == null ? void 0 : n.find((o) => o.key === r);
|
|
29
29
|
t && (t.show = e);
|
|
30
30
|
}
|
|
31
|
-
return (r, e) => (
|
|
32
|
-
|
|
31
|
+
return (r, e) => (c(), i("div", null, [
|
|
32
|
+
s(l(L), {
|
|
33
|
+
gutter: [24, 16],
|
|
34
|
+
align: "middle"
|
|
35
|
+
}, {
|
|
33
36
|
default: d(() => [
|
|
34
|
-
(
|
|
37
|
+
(c(!0), i(m, null, w(y.value, (n) => {
|
|
35
38
|
var t;
|
|
36
|
-
return
|
|
39
|
+
return c(), i(m, {
|
|
37
40
|
key: n.key
|
|
38
41
|
}, [
|
|
39
|
-
(t = n.children) != null && t.length ? (
|
|
42
|
+
(t = n.children) != null && t.length ? (c(), u(l(k), {
|
|
40
43
|
key: 1,
|
|
41
44
|
span: 24
|
|
42
45
|
}, {
|
|
43
46
|
default: d(() => [
|
|
44
|
-
|
|
47
|
+
s(j, {
|
|
45
48
|
value: f(n)
|
|
46
49
|
}, null, 8, ["value"])
|
|
47
50
|
]),
|
|
48
51
|
_: 2
|
|
49
|
-
}, 1024)) : (
|
|
52
|
+
}, 1024)) : (c(), u(l(k), {
|
|
50
53
|
key: 0,
|
|
51
54
|
span: 8
|
|
52
55
|
}, {
|
|
53
56
|
default: d(() => [
|
|
54
|
-
|
|
57
|
+
s(l(N), B({ ref_for: !0 }, C(n), {
|
|
55
58
|
"onUpdate:checked": (o) => v(n.key, o)
|
|
56
59
|
}), {
|
|
57
60
|
default: d(() => [
|
|
58
|
-
(
|
|
61
|
+
(c(), u(I(l(U)(n.title))))
|
|
59
62
|
]),
|
|
60
63
|
_: 2
|
|
61
64
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { cloneDeepWith as s,
|
|
2
|
-
import { isVNode as
|
|
3
|
-
function d(
|
|
4
|
-
var
|
|
1
|
+
import { cloneDeepWith as s, isArray as u, omit as c } from "lodash-unified";
|
|
2
|
+
import { isVNode as f, cloneVNode as a } from "vue";
|
|
3
|
+
function d(e, i) {
|
|
4
|
+
var o;
|
|
5
5
|
const n = [];
|
|
6
|
-
for (const
|
|
7
|
-
const l =
|
|
8
|
-
if ((
|
|
6
|
+
for (const t of i) {
|
|
7
|
+
const l = e.find((r) => r.key === t.key);
|
|
8
|
+
if ((o = t.children) != null && o.length) {
|
|
9
9
|
const r = d(
|
|
10
10
|
l.children,
|
|
11
|
-
|
|
11
|
+
t.children
|
|
12
12
|
);
|
|
13
13
|
r.length && n.push({
|
|
14
14
|
...l,
|
|
15
|
-
fixed:
|
|
15
|
+
fixed: t.fixed,
|
|
16
16
|
children: r
|
|
17
17
|
});
|
|
18
18
|
} else {
|
|
19
|
-
if (!
|
|
19
|
+
if (!t.show)
|
|
20
20
|
continue;
|
|
21
|
-
n.push({ ...l, fixed:
|
|
21
|
+
n.push({ ...l, fixed: t.fixed });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return n;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return s(
|
|
26
|
+
function y(e) {
|
|
27
|
+
return s(e, (i, n) => {
|
|
28
28
|
if (n === "label")
|
|
29
|
-
return
|
|
29
|
+
return i;
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const h = {
|
|
33
33
|
display: "inline",
|
|
34
34
|
"-webkit-line-clamp": "unset",
|
|
35
35
|
"-webkit-box-orient": "unset",
|
|
@@ -38,26 +38,26 @@ const a = {
|
|
|
38
38
|
"white-space": "unset",
|
|
39
39
|
wordBreak: "unset"
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function b(e) {
|
|
42
|
+
return f(e) ? a(e, { style: h }) : u(e) ? e[0] : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return n.forEach((
|
|
44
|
+
function g(e) {
|
|
45
|
+
function i(n) {
|
|
46
|
+
const o = {};
|
|
47
|
+
return n.forEach((t, l) => {
|
|
48
48
|
var r;
|
|
49
|
-
|
|
50
|
-
...
|
|
49
|
+
o[t.key] = {
|
|
50
|
+
...c(t, ["label", "key", "children"]),
|
|
51
51
|
order: l,
|
|
52
|
-
children: (r =
|
|
52
|
+
children: (r = t.children) != null && r.length ? i(t.children) : void 0
|
|
53
53
|
};
|
|
54
|
-
}),
|
|
54
|
+
}), o;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return i(e);
|
|
57
57
|
}
|
|
58
58
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
b as cloneLabelNode,
|
|
60
|
+
y as customCloneColumnStates,
|
|
61
61
|
d as default,
|
|
62
|
-
|
|
62
|
+
g as getColumnStateString
|
|
63
63
|
};
|
|
@@ -43,6 +43,7 @@ declare const _default: DefineComponent<{
|
|
|
43
43
|
getOssAccess: {
|
|
44
44
|
type: PropType<GetOssAccess>;
|
|
45
45
|
};
|
|
46
|
+
onChange: FunctionConstructor;
|
|
46
47
|
}, {
|
|
47
48
|
done: ComputedRef<boolean>;
|
|
48
49
|
clear: typeof clear;
|
|
@@ -89,6 +90,7 @@ declare const _default: DefineComponent<{
|
|
|
89
90
|
getOssAccess: {
|
|
90
91
|
type: PropType<GetOssAccess>;
|
|
91
92
|
};
|
|
93
|
+
onChange: FunctionConstructor;
|
|
92
94
|
}>> & {
|
|
93
95
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
94
96
|
}, {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as U, computed as u, provide as e, ref as d, openBlock as f, createElementBlock as h, normalizeClass as j, unref as T, createBlock as z, resolveDynamicComponent as k, normalizeProps as B, mergeProps as $, createCommentVNode as q } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
6
|
import "./styles/upload.css";
|
|
7
|
-
import { injectLocaleToAccept as
|
|
8
|
-
import { injectLocaleToOss as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
7
|
+
import { injectLocaleToAccept as L } from "./utils/accept.mjs";
|
|
8
|
+
import { injectLocaleToOss as R } from "./hooks/useOss.mjs";
|
|
9
|
+
import { Form as M } from "ant-design-vue";
|
|
10
|
+
import { useLocale as P } from "../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as w } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import D from "./components/SingleFile.vue2.mjs";
|
|
13
|
+
import E from "./components/MultipleFile.vue2.mjs";
|
|
14
|
+
import G from "./components/Picture.vue2.mjs";
|
|
15
|
+
import { useGlobalConfig as g } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
const se = /* @__PURE__ */ U({
|
|
16
17
|
name: "AplusFileUpload",
|
|
17
18
|
__name: "apUpload",
|
|
18
19
|
props: {
|
|
@@ -55,50 +56,51 @@ const ae = /* @__PURE__ */ F({
|
|
|
55
56
|
},
|
|
56
57
|
getOssAccess: {
|
|
57
58
|
type: Function
|
|
58
|
-
}
|
|
59
|
+
},
|
|
60
|
+
onChange: Function
|
|
59
61
|
},
|
|
60
62
|
emits: ["update:value"],
|
|
61
|
-
setup(
|
|
62
|
-
var
|
|
63
|
-
const { t: s, lang:
|
|
64
|
-
|
|
65
|
-
const { b: N } =
|
|
66
|
-
singleFile:
|
|
67
|
-
multipleFile:
|
|
68
|
-
picture:
|
|
69
|
-
}, S =
|
|
63
|
+
setup(v, { expose: y, emit: b }) {
|
|
64
|
+
var m, p, c, l;
|
|
65
|
+
const { t: s, lang: C } = P();
|
|
66
|
+
L(s), R(s, C);
|
|
67
|
+
const { b: N } = w("ap-upload"), t = v, _ = b, F = {
|
|
68
|
+
singleFile: D,
|
|
69
|
+
multipleFile: E,
|
|
70
|
+
picture: G
|
|
71
|
+
}, a = M.useInjectFormItemContext(), S = u({
|
|
70
72
|
get() {
|
|
71
73
|
return t.value;
|
|
72
74
|
},
|
|
73
|
-
set(
|
|
74
|
-
|
|
75
|
+
set(r) {
|
|
76
|
+
_("update:value", r), a == null || a.onFieldChange();
|
|
75
77
|
}
|
|
76
|
-
}), x =
|
|
77
|
-
e("theme", x.value), e("value", S), e("dirName", t.dirName ?? ((
|
|
78
|
+
}), x = g("uiMode"), o = g("apUpload");
|
|
79
|
+
e("theme", x.value), e("value", S), e("dirName", t.dirName ?? ((m = o.value) == null ? void 0 : m.dirName)), e(
|
|
78
80
|
"needName",
|
|
79
|
-
t.needName ?? ((
|
|
80
|
-
), e("accept", t.accept ?? ((
|
|
81
|
+
t.needName ?? ((p = o.value) == null ? void 0 : p.needName) ?? !1
|
|
82
|
+
), e("accept", t.accept ?? ((c = o.value) == null ? void 0 : c.accept) ?? ""), e("maxSize", t.maxSize), e("title", t.title), e("subTitle", t.subTitle), e("maxCount", t.maxCount), e("beforeUpload", t.beforeUpload), e("customRequest", t.customRequest), e(
|
|
81
83
|
"getOssAccess",
|
|
82
84
|
t.getOssAccess ?? ((l = o.value) == null ? void 0 : l.getOssAccess)
|
|
83
85
|
);
|
|
84
|
-
const O =
|
|
85
|
-
e("uploadingCount",
|
|
86
|
-
const
|
|
86
|
+
const O = u(() => i.value === 0), i = d(0);
|
|
87
|
+
e("uploadingCount", i);
|
|
88
|
+
const n = d(!0);
|
|
87
89
|
function A() {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
n.value = !1, setTimeout(() => {
|
|
91
|
+
n.value = !0;
|
|
90
92
|
});
|
|
91
93
|
}
|
|
92
|
-
return
|
|
94
|
+
return y({
|
|
93
95
|
done: O,
|
|
94
96
|
clear: A
|
|
95
|
-
}), (
|
|
96
|
-
class: T(
|
|
97
|
+
}), (r, I) => (f(), h("div", {
|
|
98
|
+
class: j(T(N)())
|
|
97
99
|
}, [
|
|
98
|
-
|
|
100
|
+
n.value ? (f(), z(k(F[t.type]), B($({ key: 0 }, r.$attrs)), null, 16)) : q("", !0)
|
|
99
101
|
], 2));
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
104
|
export {
|
|
103
|
-
|
|
105
|
+
se as default
|
|
104
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../../style/setting/select-group.css");require("../../../../config-provider/index.js");const C=require("../../../context.js"),i=require("../utils.js"),y=require("../../../../config-provider/hooks/use-namespace.js"),_=e.defineComponent({__name:"index",props:{value:{}},setup(h){const r=h,{b:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../../style/setting/select-group.css");require("../../../../config-provider/index.js");const C=require("../../../context.js"),i=require("../utils.js"),y=require("../../../../config-provider/hooks/use-namespace.js"),_=e.defineComponent({__name:"index",props:{value:{}},setup(h){const r=h,{b:m}=y.useNamespace("select-group"),a=e.ref(!1),{columnsBackup:f}=C.useInjectApTable(),d=e.computed(()=>{var n;return(n=e.unref(f))==null?void 0:n.find(t=>{var l;return t.key===((l=r.value)==null?void 0:l.key)})});function k(o){const n=r.value.children.find(t=>t.key===o.key);return{checked:n==null?void 0:n.show,disabled:r.value.disabled||(n==null?void 0:n.disabled)}}function p(o){const n=r.value;n.children.forEach(t=>t.show=o),n.show=o,a.value=!1}function v(o,n){const t=r.value,l=t.children.find(c=>c.key===o);if(!l)return;l.show=n;const s=t.children.every(c=>c.show),b=t.children.some(c=>c.show);t.show=s,a.value=b&&!s}const w=e.computed(()=>r.value.disabled||r.value.children.every(o=>o.disabled));return e.watch(()=>r.value,o=>{const n=o.children.every(l=>l.show),t=o.children.some(l=>l.show);a.value=t&&!n,o.show!==n&&(o.show=n)},{deep:!0,immediate:!0}),(o,n)=>{var t;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(m)("header"))},[e.createVNode(e.unref(u.Checkbox),{indeterminate:a.value,checked:(t=o.value)==null?void 0:t.show,"onUpdate:checked":p,disabled:w.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i.cloneLabelNode)(d.value.title))))]),_:1},8,["indeterminate","checked","disabled"])],2),e.createElementVNode("div",null,[e.createVNode(e.unref(u.Row),{align:"middle"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.children,l=>(e.openBlock(),e.createBlock(e.unref(u.Col),{key:l.key,span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Checkbox),e.mergeProps({ref_for:!0},k(l),{"onUpdate:checked":s=>v(l.key,s)}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i.cloneLabelNode)(l.title))))]),_:2},1040,["onUpdate:checked"])]),_:2},1024))),128))]),_:1})])])}}});exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("ant-design-vue");require("../select-group/index.vue.js");const _=require("../../../context.js"),g=require("../utils.js"),B=require("../select-group/index.vue2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("ant-design-vue");require("../select-group/index.vue.js");const _=require("../../../context.js"),g=require("../utils.js"),B=require("../select-group/index.vue2.js"),m=e.defineComponent({__name:"index",props:{value:{}},setup(a){const u=a,{columnsBackup:k}=_.useInjectApTable(),f=e.computed(()=>[...e.unref(k)||[]].sort((t,n)=>{var r,c,s,d;return(r=t.children)!=null&&r.length&&!((c=n.children)!=null&&c.length)?1:!((s=t.children)!=null&&s.length)&&((d=n.children)!=null&&d.length)?-1:0}));function i(o){return u.value.find(t=>t.key===o.key)}function p(o){const t=i(o);return{checked:t==null?void 0:t.show,disabled:t==null?void 0:t.disabled}}function h(o,t){const n=u.value,r=n==null?void 0:n.find(c=>c.key===o);r&&(r.show=t)}return(o,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(l.Row),{gutter:[24,16],align:"middle"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,n=>{var r;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n.key},[(r=n.children)!=null&&r.length?(e.openBlock(),e.createBlock(e.unref(l.Col),{key:1,span:24},{default:e.withCtx(()=>[e.createVNode(B.default,{value:i(n)},null,8,["value"])]),_:2},1024)):(e.openBlock(),e.createBlock(e.unref(l.Col),{key:0,span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Checkbox),e.mergeProps({ref_for:!0},p(n),{"onUpdate:checked":c=>h(n.key,c)}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g.cloneLabelNode)(n.title))))]),_:2},1040,["onUpdate:checked"])]),_:2},1024))],64)}),128))]),_:1})]))}});exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("lodash-unified"),s=require("vue");function c(e,i){var o;const n=[];for(const t of i){const l=e.find(r=>r.key===t.key);if((o=t.children)!=null&&o.length){const r=c(l.children,t.children);r.length&&n.push({...l,fixed:t.fixed,children:r})}else{if(!t.show)continue;n.push({...l,fixed:t.fixed})}}return n}function a(e){return u.cloneDeepWith(e,(i,n)=>{if(n==="label")return i})}const f={display:"inline","-webkit-line-clamp":"unset","-webkit-box-orient":"unset",overflow:"unset","text-overflow":"unset","white-space":"unset",wordBreak:"unset"};function d(e){return s.isVNode(e)?s.cloneVNode(e,{style:f}):u.isArray(e)?e[0]:e}function h(e){function i(n){const o={};return n.forEach((t,l)=>{var r;o[t.key]={...u.omit(t,["label","key","children"]),order:l,children:(r=t.children)!=null&&r.length?i(t.children):void 0}}),o}return i(e)}exports.cloneLabelNode=d;exports.customCloneColumnStates=a;exports.default=c;exports.getColumnStateString=h;
|
|
@@ -43,6 +43,7 @@ declare const _default: DefineComponent<{
|
|
|
43
43
|
getOssAccess: {
|
|
44
44
|
type: PropType<GetOssAccess>;
|
|
45
45
|
};
|
|
46
|
+
onChange: FunctionConstructor;
|
|
46
47
|
}, {
|
|
47
48
|
done: ComputedRef<boolean>;
|
|
48
49
|
clear: typeof clear;
|
|
@@ -89,6 +90,7 @@ declare const _default: DefineComponent<{
|
|
|
89
90
|
getOssAccess: {
|
|
90
91
|
type: PropType<GetOssAccess>;
|
|
91
92
|
};
|
|
93
|
+
onChange: FunctionConstructor;
|
|
92
94
|
}>> & {
|
|
93
95
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
94
96
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");require("./components/SingleFile.vue.js");require("./components/MultipleFile.vue.js");require("./components/Picture.vue.js");require("./styles/upload.css");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");require("./components/SingleFile.vue.js");require("./components/MultipleFile.vue.js");require("./components/Picture.vue.js");require("./styles/upload.css");const F=require("./utils/accept.js"),O=require("./hooks/useOss.js"),j=require("ant-design-vue"),x=require("../config-provider/hooks/use-locale.js"),A=require("../config-provider/hooks/use-namespace.js"),T=require("./components/SingleFile.vue2.js"),U=require("./components/MultipleFile.vue2.js"),h=require("./components/Picture.vue2.js"),d=require("../config-provider/hooks/use-global-config.js"),k=e.defineComponent({name:"AplusFileUpload",__name:"apUpload",props:{dirName:{type:String},type:{type:String,default:"singleFile"},value:{type:[String,Object,Array],default:void 0},needName:{type:[Boolean,Object]},accept:{type:String},maxSize:{type:Number},title:{type:String,default:""},subTitle:{type:[String,Object],default:""},maxCount:{type:Number},beforeUpload:{type:Function},customRequest:{type:Function},getOssAccess:{type:Function},onChange:Function},emits:["update:value"],setup(m,{expose:v,emit:g}){var i,l,c,p;const{t:n,lang:_}=x.useLocale();F.injectLocaleToAccept(n),O.injectLocaleToOss(n,_);const{b:f}=A.useNamespace("ap-upload"),t=m,y=g,q={singleFile:T.default,multipleFile:U.default,picture:h.default},u=j.Form.useInjectFormItemContext(),b=e.computed({get(){return t.value},set(a){y("update:value",a),u==null||u.onFieldChange()}}),C=d.useGlobalConfig("uiMode"),o=d.useGlobalConfig("apUpload");e.provide("theme",C.value),e.provide("value",b),e.provide("dirName",t.dirName??((i=o.value)==null?void 0:i.dirName)),e.provide("needName",t.needName??((l=o.value)==null?void 0:l.needName)??!1),e.provide("accept",t.accept??((c=o.value)==null?void 0:c.accept)??""),e.provide("maxSize",t.maxSize),e.provide("title",t.title),e.provide("subTitle",t.subTitle),e.provide("maxCount",t.maxCount),e.provide("beforeUpload",t.beforeUpload),e.provide("customRequest",t.customRequest),e.provide("getOssAccess",t.getOssAccess??((p=o.value)==null?void 0:p.getOssAccess));const N=e.computed(()=>s.value===0),s=e.ref(0);e.provide("uploadingCount",s);const r=e.ref(!0);function S(){r.value=!1,setTimeout(()=>{r.value=!0})}return v({done:N,clear:S}),(a,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(f)())},[r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q[t.type]),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)],2))}});exports.default=k;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
62
62
|
"sortablejs": "^1.15.2",
|
|
63
63
|
"vuedraggable": "^4.1.0",
|
|
64
|
-
"@aplus-frontend/
|
|
65
|
-
"@aplus-frontend/
|
|
64
|
+
"@aplus-frontend/utils": "1.0.35",
|
|
65
|
+
"@aplus-frontend/hooks": "1.0.7"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@aplus-frontend/icon": "^1.0.21",
|