@aplus-frontend/ui 0.3.0 → 0.3.1
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-action/item/index.vue2.mjs +11 -11
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
- package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
- package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
- package/es/src/ap-field/date/index.vue.mjs +2 -2
- package/es/src/ap-field/date-range/index.vue.mjs +2 -2
- package/es/src/ap-field/number/index.vue.mjs +3 -3
- package/es/src/ap-field/radio/index.vue.mjs +5 -5
- package/es/src/ap-field/rate/index.vue.mjs +4 -4
- package/es/src/ap-field/segmented/index.vue.mjs +3 -3
- package/es/src/ap-field/select/index.vue.mjs +4 -4
- package/es/src/ap-field/slider/index.vue.mjs +3 -3
- package/es/src/ap-field/switch/index.vue.mjs +4 -4
- package/es/src/ap-field/text-area/index.vue.mjs +3 -3
- package/es/src/ap-form/ap-form.vue2.mjs +2 -2
- package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
- package/es/src/ap-form/search-form/index.vue.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
- package/es/src/ap-list/index.vue.mjs +27 -27
- package/es/src/ap-modal/utils/createModal.mjs +10 -10
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
- package/es/src/ap-table/ap-table.vue2.mjs +3 -3
- package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
- package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
- package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
- package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
- package/es/src/ap-upload/apUpload.vue.d.ts +57 -8
- package/es/src/ap-upload/apUpload.vue.mjs +56 -37
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
- package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
- package/es/src/business/ap-group-search/index.d.ts +1 -1
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
- package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
- package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +1 -1
- package/es/src/business/ap-upload-file/interface.d.ts +2 -0
- package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
- package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
- package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
- package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
- package/es/src/business/batch-input-group/index.vue.mjs +5 -5
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
- package/es/src/editable-table/form-item.vue.mjs +3 -3
- package/es/src/editable-table/index.vue.mjs +6 -6
- package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/status/index.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +57 -8
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +1 -1
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
- package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
- package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
- package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
- package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
- package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +4 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, ref as M, computed as c, onMounted as N, watch as R, unref as t, resolveComponent as D, openBlock as w, createElementBlock as K, normalizeClass as d, createVNode as p, withCtx as C, normalizeStyle as O, createBlock as F, createCommentVNode as T, renderSlot as $ } from "vue";
|
|
2
2
|
import { Flex as j, Select as E } from "@aplus-frontend/antdv";
|
|
3
3
|
import G from "./images/icon-down.vue.mjs";
|
|
4
4
|
import "./extension-select/index.vue.mjs";
|
|
5
|
-
import { useControllableValue as
|
|
5
|
+
import { useControllableValue as z } from "../../hooks/useControllableValue.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { useLocale as
|
|
8
|
-
import { useGlobalConfig as
|
|
9
|
-
import { useNamespace as
|
|
7
|
+
import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { useGlobalConfig as U } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import Y from "./extension-select/index.vue2.mjs";
|
|
11
|
-
const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */
|
|
11
|
+
const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ P({
|
|
12
12
|
__name: "ap-group-search",
|
|
13
13
|
props: {
|
|
14
14
|
value: {},
|
|
@@ -90,11 +90,11 @@ const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ L({
|
|
|
90
90
|
style: {}
|
|
91
91
|
},
|
|
92
92
|
emits: ["update:value"],
|
|
93
|
-
setup(
|
|
94
|
-
const { t: h } =
|
|
93
|
+
setup(S, { emit: _ }) {
|
|
94
|
+
const { t: h } = H(), f = U("uiMode", "aplus"), y = M(), l = S, B = c(() => ({
|
|
95
95
|
width: "auto",
|
|
96
96
|
...l.style
|
|
97
|
-
})), b = _, { value: a, updateValue: u } =
|
|
97
|
+
})), b = _, { value: a, updateValue: u } = z(l, b), A = (e) => {
|
|
98
98
|
let o = e;
|
|
99
99
|
e === m ? o = l.options.map((n) => n.value) : o = toString.call(o) === "[object Array]" ? e : [e], u({
|
|
100
100
|
...a.value,
|
|
@@ -139,52 +139,52 @@ const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ L({
|
|
|
139
139
|
...a.value,
|
|
140
140
|
value: e
|
|
141
141
|
});
|
|
142
|
-
}, { b: I, e: g, em:
|
|
142
|
+
}, { b: I, e: g, em: L } = W("ap-group-search");
|
|
143
143
|
return (e, o) => {
|
|
144
144
|
const n = D("Divider");
|
|
145
|
-
return
|
|
146
|
-
class: d(t(I)()),
|
|
145
|
+
return w(), K("div", {
|
|
147
146
|
ref_key: "containerRef",
|
|
148
|
-
ref: y
|
|
147
|
+
ref: y,
|
|
148
|
+
class: d(t(I)())
|
|
149
149
|
}, [
|
|
150
150
|
p(t(j), null, {
|
|
151
|
-
default:
|
|
151
|
+
default: C(() => {
|
|
152
152
|
var s, i;
|
|
153
153
|
return [
|
|
154
154
|
p(t(E), {
|
|
155
155
|
value: V.value,
|
|
156
156
|
style: O(B.value),
|
|
157
|
-
class: d(`${e.$attrs.class} ${t(f) === "admin" ? t(
|
|
157
|
+
class: d(`${e.$attrs.class} ${t(f) === "admin" ? t(L)("search", "admin") : t(g)("search")}`),
|
|
158
158
|
options: k.value,
|
|
159
159
|
bordered: !1,
|
|
160
|
-
|
|
160
|
+
"dropdown-match-select-width": l.dropdownMatchSelectWidth,
|
|
161
161
|
onChange: A
|
|
162
162
|
}, {
|
|
163
|
-
suffixIcon:
|
|
163
|
+
suffixIcon: C(() => [
|
|
164
164
|
p(G)
|
|
165
165
|
]),
|
|
166
166
|
_: 1
|
|
167
|
-
}, 8, ["value", "style", "class", "options", "
|
|
168
|
-
t(f) === "aplus" ? (
|
|
167
|
+
}, 8, ["value", "style", "class", "options", "dropdown-match-select-width"]),
|
|
168
|
+
t(f) === "aplus" ? (w(), F(n, {
|
|
169
169
|
key: 0,
|
|
170
170
|
class: d(t(g)("divider")),
|
|
171
171
|
type: "vertical",
|
|
172
172
|
style: {}
|
|
173
|
-
}, null, 8, ["class"])) :
|
|
173
|
+
}, null, 8, ["class"])) : T("", !0),
|
|
174
174
|
$(e.$slots, "search", {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
key: (s = t(a)) == null ? void 0 : s.key,
|
|
176
|
+
value: (i = t(a)) == null ? void 0 : i.value,
|
|
177
|
+
change: v
|
|
178
178
|
}, () => {
|
|
179
179
|
var r;
|
|
180
180
|
return [
|
|
181
181
|
p(Y, {
|
|
182
182
|
style: { width: "100%" },
|
|
183
|
-
|
|
183
|
+
"max-tag-count": "responsive",
|
|
184
184
|
value: (r = t(a)) == null ? void 0 : r.value,
|
|
185
|
-
onChange: v,
|
|
186
185
|
placeholder: x.value,
|
|
187
|
-
"__parent-ref": y.value
|
|
186
|
+
"__parent-ref": y.value,
|
|
187
|
+
onChange: v
|
|
188
188
|
}, null, 8, ["value", "placeholder", "__parent-ref"])
|
|
189
189
|
];
|
|
190
190
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, ref as t, computed as C, watch as w, openBlock as B, createElementBlock as _, createVNode as s, unref as l, normalizeClass as x, normalizeStyle as b, withCtx as S } from "vue";
|
|
2
2
|
import { Select as I } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../popover-select/index.vue.mjs";
|
|
4
4
|
import "../../../config-provider/index.mjs";
|
|
5
5
|
import { useGlobalConfig as R } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import
|
|
8
|
-
const O = /* @__PURE__ */
|
|
6
|
+
import { useNamespace as V } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
import N from "../popover-select/index.vue2.mjs";
|
|
8
|
+
const O = /* @__PURE__ */ y({
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
11
11
|
value: {},
|
|
@@ -85,7 +85,7 @@ const O = /* @__PURE__ */ v({
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["change"],
|
|
87
87
|
setup(u, { emit: c }) {
|
|
88
|
-
const d = R("uiMode", "aplus"), o = u, r = t(), n = t(), a = t(!1), m =
|
|
88
|
+
const d = R("uiMode", "aplus"), o = u, r = t(), n = t(), a = t(!1), m = C(() => o.__parentRef || r.value), f = c, h = (e) => {
|
|
89
89
|
e && (a.value = !1);
|
|
90
90
|
};
|
|
91
91
|
w(
|
|
@@ -97,7 +97,7 @@ const O = /* @__PURE__ */ v({
|
|
|
97
97
|
);
|
|
98
98
|
const p = (e) => {
|
|
99
99
|
n.value = e, f("change", e);
|
|
100
|
-
}, { b: g } =
|
|
100
|
+
}, { b: g } = V("ap-extension-select");
|
|
101
101
|
return (e, i) => (B(), _("div", {
|
|
102
102
|
ref_key: "containerRef",
|
|
103
103
|
ref: r
|
|
@@ -108,24 +108,24 @@ const O = /* @__PURE__ */ v({
|
|
|
108
108
|
style: b(e.$attrs.style),
|
|
109
109
|
bordered: l(d) === "admin",
|
|
110
110
|
mode: "tags",
|
|
111
|
-
|
|
111
|
+
"show-arrow": !0,
|
|
112
112
|
"not-found-content": !0,
|
|
113
113
|
open: a.value,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
"max-tag-count": o.maxTagCount,
|
|
115
|
+
placeholder: o.placeholder,
|
|
116
|
+
onDropdownVisibleChange: i[0] || (i[0] = (v) => a.value = v),
|
|
117
|
+
onChange: p
|
|
118
118
|
}, {
|
|
119
119
|
suffixIcon: S(() => [
|
|
120
|
-
s(
|
|
120
|
+
s(N, {
|
|
121
121
|
value: n.value,
|
|
122
|
+
"__parent-ref": m.value,
|
|
122
123
|
onSubmit: p,
|
|
123
|
-
onOpenChange: h
|
|
124
|
-
"__parent-ref": m.value
|
|
124
|
+
onOpenChange: h
|
|
125
125
|
}, null, 8, ["value", "__parent-ref"])
|
|
126
126
|
]),
|
|
127
127
|
_: 1
|
|
128
|
-
}, 8, ["class", "value", "style", "bordered", "open", "
|
|
128
|
+
}, 8, ["class", "value", "style", "bordered", "open", "max-tag-count", "placeholder"])
|
|
129
129
|
], 512));
|
|
130
130
|
}
|
|
131
131
|
});
|
|
@@ -42,9 +42,9 @@ declare const ApGroupSearch: {
|
|
|
42
42
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
43
43
|
$slots: {
|
|
44
44
|
search?(_: {
|
|
45
|
+
key: SelectValue;
|
|
45
46
|
value: any;
|
|
46
47
|
change: (e: any) => void;
|
|
47
|
-
key: SelectValue;
|
|
48
48
|
}): any;
|
|
49
49
|
};
|
|
50
50
|
}) & ( Plugin & (new (...args: any[]) => {
|
|
@@ -86,14 +86,14 @@ const Y = /* @__PURE__ */ P({
|
|
|
86
86
|
},
|
|
87
87
|
emits: ["submit", "open-change"],
|
|
88
88
|
setup(S, { emit: w }) {
|
|
89
|
-
const { t: r } = F(), h = E("uiMode", "aplus"),
|
|
89
|
+
const { t: r } = F(), h = E("uiMode", "aplus"), c = S, v = w, t = u([]), i = u(!1), g = u();
|
|
90
90
|
R(() => {
|
|
91
|
-
t.value =
|
|
91
|
+
t.value = c.value;
|
|
92
92
|
});
|
|
93
|
-
const B = (o) =>
|
|
94
|
-
|
|
93
|
+
const B = (o) => c.__parentRef || o, b = (o) => {
|
|
94
|
+
i.value = o, v("open-change", o);
|
|
95
95
|
}, C = () => {
|
|
96
|
-
|
|
96
|
+
i.value = !1;
|
|
97
97
|
}, _ = () => {
|
|
98
98
|
t.value = [];
|
|
99
99
|
}, x = (o) => {
|
|
@@ -101,15 +101,15 @@ const Y = /* @__PURE__ */ P({
|
|
|
101
101
|
}, k = async () => {
|
|
102
102
|
var o;
|
|
103
103
|
(o = g.value) == null || o.blur(), C(), await D(150), v("submit", t.value);
|
|
104
|
-
}, { b:
|
|
104
|
+
}, { b: V, e: I, em: l } = K("ap-popover-select");
|
|
105
105
|
return (o, y) => (L(), M("div", {
|
|
106
|
-
class: p(e(
|
|
106
|
+
class: p(e(V)())
|
|
107
107
|
}, [
|
|
108
108
|
a(e(T), {
|
|
109
|
-
|
|
109
|
+
"overlay-class-name": e(I)("popover"),
|
|
110
110
|
"get-popup-container": B,
|
|
111
111
|
trigger: "click",
|
|
112
|
-
open:
|
|
112
|
+
open: i.value,
|
|
113
113
|
placement: "bottomLeft",
|
|
114
114
|
onOpenChange: b
|
|
115
115
|
}, {
|
|
@@ -118,18 +118,18 @@ const Y = /* @__PURE__ */ P({
|
|
|
118
118
|
s("div", {
|
|
119
119
|
class: p(e(l)("popover", "content"))
|
|
120
120
|
}, [
|
|
121
|
-
a(e(z), O({ ...
|
|
121
|
+
a(e(z), O({ ...c }, {
|
|
122
|
+
ref_key: "selectRef",
|
|
123
|
+
ref: g,
|
|
122
124
|
mode: "tags",
|
|
123
125
|
bordered: !1,
|
|
124
126
|
value: t.value,
|
|
125
|
-
onChange: y[0] || (y[0] = (I) => x(I)),
|
|
126
127
|
placeholder: e(r)("ap.apGroupSearch.tokenSeparatorsPlaceholder"),
|
|
127
|
-
|
|
128
|
+
"token-separators": [",", `
|
|
128
129
|
`, "\r"],
|
|
129
130
|
"max-tag-count": 200,
|
|
130
131
|
open: !1,
|
|
131
|
-
|
|
132
|
-
ref: g
|
|
132
|
+
onChange: y[0] || (y[0] = (N) => x(N))
|
|
133
133
|
}), null, 16, ["value", "placeholder"])
|
|
134
134
|
], 2),
|
|
135
135
|
s("div", {
|
|
@@ -183,7 +183,7 @@ const Y = /* @__PURE__ */ P({
|
|
|
183
183
|
], 2)
|
|
184
184
|
]),
|
|
185
185
|
_: 1
|
|
186
|
-
}, 8, ["
|
|
186
|
+
}, 8, ["overlay-class-name", "open"])
|
|
187
187
|
], 2));
|
|
188
188
|
}
|
|
189
189
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, computed as
|
|
1
|
+
import { defineComponent as S, computed as c, ref as U, watchEffect as j, openBlock as i, createBlock as p, unref as n, mergeProps as g, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as L, createElementVNode as b, normalizeClass as D, createElementBlock as M, Fragment as P, renderList as R, resolveDynamicComponent as T, createVNode as x } from "vue";
|
|
2
2
|
import { Image as z } from "@aplus-frontend/antdv";
|
|
3
3
|
import { DownloadOutlined as V } from "@ant-design/icons-vue";
|
|
4
4
|
import { injectLocaleToOss as W, getOssInstance as G, getSignatureUrl as $ } from "./hooks/useOss.mjs";
|
|
@@ -9,7 +9,7 @@ import { omit as J } from "lodash-unified";
|
|
|
9
9
|
import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { useGlobalConfig as m } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
11
|
import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
-
const
|
|
12
|
+
const ce = /* @__PURE__ */ S({
|
|
13
13
|
__name: "ApImage",
|
|
14
14
|
props: {
|
|
15
15
|
getOssAccess: {},
|
|
@@ -27,70 +27,70 @@ const se = /* @__PURE__ */ S({
|
|
|
27
27
|
admin: q
|
|
28
28
|
}, k = m("uiMode"), w = m("apUpload"), f = m(
|
|
29
29
|
"downloadCenterTriggerConfig"
|
|
30
|
-
), { t: h, lang: C } = Q(), O =
|
|
30
|
+
), { t: h, lang: C } = Q(), O = c(
|
|
31
31
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return e.getOssAccess || ((
|
|
32
|
+
var r;
|
|
33
|
+
return e.getOssAccess || ((r = w.value) == null ? void 0 : r.getOssAccess);
|
|
34
34
|
}
|
|
35
|
-
), A =
|
|
35
|
+
), A = c(
|
|
36
36
|
() => d[k.value] || d.aplus
|
|
37
|
-
), N =
|
|
37
|
+
), N = c(() => (e == null ? void 0 : e.fallback) || A.value), o = U("");
|
|
38
38
|
W(h, C), j(async () => {
|
|
39
|
-
var
|
|
39
|
+
var r;
|
|
40
40
|
if (!(e != null && e.src)) {
|
|
41
|
-
|
|
41
|
+
o.value = "";
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
if (!((
|
|
45
|
-
|
|
44
|
+
if (!((r = e.src) != null && r.startsWith("Frontend-Upload"))) {
|
|
45
|
+
o.value = e.src;
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
49
|
-
const
|
|
50
|
-
oss:
|
|
49
|
+
const a = await G(O.value), t = await $({
|
|
50
|
+
oss: a,
|
|
51
51
|
fileName: e.src
|
|
52
52
|
});
|
|
53
|
-
t && (
|
|
53
|
+
t && (o.value = t);
|
|
54
54
|
} catch {
|
|
55
|
-
|
|
55
|
+
o.value = "";
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
async function y() {
|
|
59
|
-
var t, l,
|
|
59
|
+
var t, l, s;
|
|
60
60
|
if (!(e != null && e.src))
|
|
61
61
|
return;
|
|
62
|
-
const
|
|
62
|
+
const r = e.src, a = e.fileName ?? e.src;
|
|
63
63
|
if (!((t = e.src) != null && t.startsWith("Frontend-Upload"))) {
|
|
64
|
-
_(
|
|
64
|
+
_(r, a);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
if ((l = f.value) != null && l.trigger) {
|
|
68
68
|
let F = [
|
|
69
69
|
{
|
|
70
|
-
objectName:
|
|
71
|
-
fileName:
|
|
70
|
+
objectName: r,
|
|
71
|
+
fileName: a
|
|
72
72
|
}
|
|
73
73
|
];
|
|
74
|
-
await ((
|
|
74
|
+
await ((s = f.value) == null ? void 0 : s.trigger(F));
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
const _ = (
|
|
77
|
+
const _ = (r, a) => {
|
|
78
78
|
const t = document.createElement("a");
|
|
79
|
-
t.href =
|
|
79
|
+
t.href = r, t.rel = "noopener noreferrer", t.setAttribute("download", a), document.body.appendChild(t), t.click(), document.body.removeChild(t);
|
|
80
80
|
};
|
|
81
|
-
return (
|
|
81
|
+
return (r, a) => (i(), p(n(z), g({
|
|
82
82
|
class: [n(u)()]
|
|
83
83
|
}, {
|
|
84
84
|
...n(J)(e, ["src", "getOssAccess"]),
|
|
85
85
|
fallback: N.value,
|
|
86
|
-
src:
|
|
86
|
+
src: o.value
|
|
87
87
|
}), {
|
|
88
88
|
toolbarRender: B((t) => [
|
|
89
|
-
E(
|
|
89
|
+
E(r.$slots, "toolbarRender", I(L({ ...t })), () => [
|
|
90
90
|
b("div", {
|
|
91
91
|
class: D([n(u)("toolbar")])
|
|
92
92
|
}, [
|
|
93
|
-
(i(!0), M(P, null, R(t.originalNodes, (l,
|
|
93
|
+
(i(!0), M(P, null, R(t.originalNodes, (l, s) => (i(), p(T(l), g({ ref_for: !0 }, e, { key: s }), null, 16))), 128)),
|
|
94
94
|
b("div", {
|
|
95
95
|
class: "ant-image-preview-operations-operation",
|
|
96
96
|
onClick: y
|
|
@@ -105,5 +105,5 @@ const se = /* @__PURE__ */ S({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
ce as default
|
|
109
109
|
};
|
|
@@ -73,8 +73,8 @@ const Q = /* @__PURE__ */ I({
|
|
|
73
73
|
class: f(r(S)())
|
|
74
74
|
}, {
|
|
75
75
|
default: x(() => [(m(!0), w(y, null, z(C.value, (e, t) => (m(), i(r(F), {
|
|
76
|
-
class: f(`${n.size === "small" ? r(g)("item", "small") : r(_)("item")}`),
|
|
77
76
|
key: e.key,
|
|
77
|
+
class: f(`${n.size === "small" ? r(g)("item", "small") : r(_)("item")}`),
|
|
78
78
|
index: t,
|
|
79
79
|
style: B({
|
|
80
80
|
textAlign: e.align
|
|
@@ -175,8 +175,6 @@ const fe = /* @__PURE__ */ F({
|
|
|
175
175
|
getApTableInstance: N
|
|
176
176
|
}), (o, t) => ($(), z(s(H), b(
|
|
177
177
|
{
|
|
178
|
-
onOk: L,
|
|
179
|
-
onCancel: w,
|
|
180
178
|
open: i.value,
|
|
181
179
|
"onUpdate:open": t[0] || (t[0] = (l) => i.value = l)
|
|
182
180
|
},
|
|
@@ -197,27 +195,28 @@ const fe = /* @__PURE__ */ F({
|
|
|
197
195
|
{
|
|
198
196
|
title: D(),
|
|
199
197
|
"body-style": { maxHeight: "calc(100vh - 205px)", overflowY: "scroll" },
|
|
200
|
-
centered: e.centered ?? !0
|
|
198
|
+
centered: e.centered ?? !0,
|
|
199
|
+
onOk: L,
|
|
200
|
+
onCancel: w
|
|
201
201
|
}
|
|
202
202
|
), {
|
|
203
203
|
default: k(() => [
|
|
204
204
|
T(X, b(e.tableLayoutConfig || {}, {
|
|
205
|
-
onClear: O,
|
|
206
205
|
"selected-list": a.value,
|
|
206
|
+
onClear: O,
|
|
207
207
|
onDeleteItem: G
|
|
208
208
|
}), {
|
|
209
209
|
default: k(() => [
|
|
210
|
-
T(s(Z), b({
|
|
210
|
+
T(s(Z), b(s(S)(e.apTableProps, "dataSource"), {
|
|
211
|
+
ref_key: "apTableRef",
|
|
212
|
+
ref: d,
|
|
211
213
|
scroll: { y: "100%" },
|
|
212
214
|
style: { padding: "0px" },
|
|
213
215
|
columns: o.columns,
|
|
214
216
|
request: I,
|
|
215
217
|
"row-key": o.getRowKey,
|
|
216
218
|
"row-selection": A.value,
|
|
217
|
-
bordered: s(K) === "admin"
|
|
218
|
-
}, s(S)(e.apTableProps, "dataSource"), {
|
|
219
|
-
ref_key: "apTableRef",
|
|
220
|
-
ref: d,
|
|
219
|
+
bordered: s(K) === "admin",
|
|
221
220
|
"data-source": C.value
|
|
222
221
|
}), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
|
|
223
222
|
]),
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { ApUploadSingleProps } from '../interface';
|
|
1
|
+
import { ApUploadFile, ApUploadSingleProps } from '../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = ApUploadSingleProps;
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: {
|
|
7
|
-
default?(_: {
|
|
7
|
+
default?(_: {
|
|
8
|
+
file: ApUploadFile | undefined;
|
|
9
|
+
clear: () => void | undefined;
|
|
10
|
+
}): any;
|
|
8
11
|
};
|
|
9
12
|
refs: {};
|
|
10
13
|
rootEl: any;
|