@cmstops/pro-compo 0.3.34 → 0.3.36
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/index.css +269 -59
- package/dist/index.min.css +1 -1
- package/es/docPreview/component.d.ts +0 -0
- package/es/docPreview/component.js +153 -0
- package/es/docPreview/components/PreviewIframe.d.ts +0 -0
- package/es/docPreview/components/PreviewIframe.js +37 -0
- package/es/docPreview/images/phone.js +2 -0
- package/es/docPreview/index.d.ts +2 -0
- package/es/docPreview/index.js +7 -0
- package/es/docPreview/scripts/api.d.ts +1 -0
- package/es/docPreview/scripts/hook.d.ts +20 -0
- package/es/docPreview/scripts/hook.js +119 -0
- package/es/docPreview/style/css.js +1 -0
- package/es/docPreview/style/index.css +139 -0
- package/es/docPreview/style/index.d.ts +1 -0
- package/es/docPreview/style/index.js +1 -0
- package/es/docPreview/style/index.less +129 -0
- package/es/docPreview/style/previewIframe.less +36 -0
- package/es/hooks/useSelection.js +1 -1
- package/es/hooks/useUpload.d.ts +15 -0
- package/es/hooks/useUpload.js +88 -0
- package/es/index.css +269 -59
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +1 -0
- package/es/selectResourceModal/component.js +30 -16
- package/es/selectResourceModal/components/ListCardWrapper/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListCardWrapper/index.js +56 -0
- package/es/selectResourceModal/components/ListContent/index.js +16 -36
- package/es/selectResourceModal/components/ListContentLocal/components/Upload.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/components/Upload.js +56 -0
- package/es/selectResourceModal/components/ListContentLocal/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/index.js +90 -0
- package/es/selectResourceModal/components/ListFilter/index.js +12 -4
- package/es/selectResourceModal/style/index.css +98 -58
- package/es/selectResourceModal/style/index.less +20 -2
- package/es/selectResourceModal/style/listCardWrapper.less +63 -0
- package/es/selectResourceModal/style/listContent.less +1 -63
- package/es/selectResourceModal/style/listContentLocal.less +26 -0
- package/es/selectResourceModal/style/listSelected.less +11 -3
- package/es/thumbCard/assets/magic.js +2 -0
- package/es/thumbCard/component.js +80 -53
- package/es/thumbCard/style/index.css +32 -1
- package/es/thumbCard/style/index.less +45 -7
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +40 -1
- package/es/utils/tusUpload.d.ts +8 -0
- package/es/utils/tusUpload.js +35 -1
- package/lib/docPreview/component.js +154 -0
- package/lib/docPreview/components/PreviewIframe.js +38 -0
- package/lib/docPreview/images/phone.js +3 -0
- package/lib/docPreview/index.js +8 -0
- package/lib/docPreview/scripts/hook.js +123 -0
- package/lib/docPreview/style/css.js +2 -0
- package/lib/docPreview/style/index.css +139 -0
- package/lib/docPreview/style/index.js +2 -0
- package/lib/docPreview/style/index.less +129 -0
- package/lib/docPreview/style/previewIframe.less +36 -0
- package/lib/hooks/useSelection.js +1 -1
- package/lib/hooks/useUpload.js +91 -0
- package/lib/index.css +269 -59
- package/lib/index.js +2 -0
- package/lib/index.less +1 -0
- package/lib/selectResourceModal/component.js +31 -17
- package/lib/selectResourceModal/components/ListCardWrapper/index.js +57 -0
- package/lib/selectResourceModal/components/ListContent/index.js +19 -39
- package/lib/selectResourceModal/components/ListContentLocal/components/Upload.js +57 -0
- package/lib/selectResourceModal/components/ListContentLocal/index.js +91 -0
- package/lib/selectResourceModal/components/ListFilter/index.js +12 -4
- package/lib/selectResourceModal/style/index.css +98 -58
- package/lib/selectResourceModal/style/index.less +20 -2
- package/lib/selectResourceModal/style/listCardWrapper.less +63 -0
- package/lib/selectResourceModal/style/listContent.less +1 -63
- package/lib/selectResourceModal/style/listContentLocal.less +26 -0
- package/lib/selectResourceModal/style/listSelected.less +11 -3
- package/lib/thumbCard/assets/magic.js +3 -0
- package/lib/thumbCard/component.js +78 -51
- package/lib/thumbCard/style/index.css +32 -1
- package/lib/thumbCard/style/index.less +45 -7
- package/lib/utils/index.js +41 -0
- package/lib/utils/tusUpload.js +35 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
|
-
var
|
|
4
|
+
var icon = require("@arco-design/web-vue/es/icon");
|
|
5
|
+
var index$4 = require("../emptyData/index.js");
|
|
5
6
|
var index = require("./components/ListFilter/index.js");
|
|
6
7
|
var index$1 = require("./components/ListContent/index.js");
|
|
7
|
-
var index$
|
|
8
|
+
var index$3 = require("./components/ListSelected/index.js");
|
|
9
|
+
var index$2 = require("./components/ListContentLocal/index.js");
|
|
8
10
|
var useAttachement = require("../hooks/useAttachement.js");
|
|
9
11
|
var config = require("../config.js");
|
|
10
12
|
const _hoisted_1 = {
|
|
@@ -30,7 +32,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
30
32
|
BASE_API: {},
|
|
31
33
|
visible: { type: Boolean },
|
|
32
34
|
userInfo: {},
|
|
33
|
-
maxcount: {}
|
|
35
|
+
maxcount: {},
|
|
36
|
+
filterOptions: {}
|
|
34
37
|
},
|
|
35
38
|
emits: ["update:visible", "submit"],
|
|
36
39
|
setup(__props, { emit: __emit }) {
|
|
@@ -48,8 +51,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
48
51
|
changeKey,
|
|
49
52
|
changeFilter,
|
|
50
53
|
changePage,
|
|
51
|
-
changeSize
|
|
52
|
-
loadData
|
|
54
|
+
changeSize
|
|
53
55
|
} = useAttachement["default"]({ key: "all", BASE_API });
|
|
54
56
|
const selected = vue.ref([]);
|
|
55
57
|
const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
|
|
@@ -83,15 +85,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
83
85
|
changeKey("local");
|
|
84
86
|
activeKey.value = "local";
|
|
85
87
|
}
|
|
86
|
-
vue.onMounted(() => {
|
|
87
|
-
loadData();
|
|
88
|
-
});
|
|
89
88
|
return (_ctx, _cache) => {
|
|
90
89
|
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
|
|
91
90
|
visible: _ctx.visible,
|
|
92
91
|
width: "1024px",
|
|
93
92
|
header: false,
|
|
94
|
-
footer: false
|
|
93
|
+
footer: false,
|
|
94
|
+
class: "resource-select-drawer"
|
|
95
95
|
}, {
|
|
96
96
|
default: vue.withCtx(() => [
|
|
97
97
|
_ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -104,11 +104,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
104
104
|
}, {
|
|
105
105
|
extra: vue.withCtx(() => [
|
|
106
106
|
vue.createVNode(vue.unref(webVue.Button), {
|
|
107
|
-
type: "
|
|
107
|
+
type: "secondary",
|
|
108
|
+
shape: "round",
|
|
108
109
|
onClick: handleClose
|
|
109
110
|
}, {
|
|
110
|
-
|
|
111
|
-
vue.
|
|
111
|
+
icon: vue.withCtx(() => [
|
|
112
|
+
vue.createVNode(vue.unref(icon.IconClose))
|
|
112
113
|
]),
|
|
113
114
|
_: 1
|
|
114
115
|
})
|
|
@@ -138,9 +139,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
138
139
|
activeKey.value !== "local" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
139
140
|
vue.createVNode(index, {
|
|
140
141
|
"disable-upload-by": activeKey.value !== "all",
|
|
142
|
+
filterOptions: _ctx.filterOptions,
|
|
141
143
|
onChange: vue.unref(changeFilter),
|
|
142
144
|
onUpload: handleToUpload
|
|
143
|
-
}, null, 8, ["disable-upload-by", "onChange"])
|
|
145
|
+
}, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
|
|
144
146
|
])) : vue.createCommentVNode("v-if", true),
|
|
145
147
|
vue.createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
|
|
146
148
|
vue.createElementVNode("div", _hoisted_4, [
|
|
@@ -149,14 +151,24 @@ const _sfc_main = vue.defineComponent({
|
|
|
149
151
|
style: { "height": "100%", "overflow": "auto" }
|
|
150
152
|
}, {
|
|
151
153
|
default: vue.withCtx(() => [
|
|
152
|
-
vue.createVNode(index$1, {
|
|
154
|
+
vue.withDirectives(vue.createVNode(index$1, {
|
|
153
155
|
loading: vue.unref(loading),
|
|
154
156
|
list: vue.unref(list),
|
|
155
157
|
disable: disableSelect.value,
|
|
156
158
|
"select-keys": selectedKeys.value,
|
|
157
159
|
onSelect: handleSelect,
|
|
158
160
|
onSelectOne: handleSelectOne
|
|
159
|
-
}, null, 8, ["loading", "list", "disable", "select-keys"])
|
|
161
|
+
}, null, 8, ["loading", "list", "disable", "select-keys"]), [
|
|
162
|
+
[vue.vShow, activeKey.value !== "local"]
|
|
163
|
+
]),
|
|
164
|
+
vue.withDirectives(vue.createVNode(index$2, {
|
|
165
|
+
disable: disableSelect.value,
|
|
166
|
+
"select-keys": selectedKeys.value,
|
|
167
|
+
onSelect: handleSelect,
|
|
168
|
+
onSelectOne: handleSelectOne
|
|
169
|
+
}, null, 8, ["disable", "select-keys"]), [
|
|
170
|
+
[vue.vShow, activeKey.value === "local"]
|
|
171
|
+
])
|
|
160
172
|
]),
|
|
161
173
|
_: 1
|
|
162
174
|
})
|
|
@@ -170,12 +182,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
170
182
|
"page-size": vue.unref(limit),
|
|
171
183
|
"show-total": "",
|
|
172
184
|
"show-page-size": "",
|
|
185
|
+
"base-size": 3,
|
|
186
|
+
"buffer-size": 1,
|
|
173
187
|
onChange: _cache[1] || (_cache[1] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
|
|
174
188
|
onPageSizeChange: vue.unref(changeSize)
|
|
175
189
|
}, null, 8, ["total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
|
|
176
190
|
]),
|
|
177
191
|
selected.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
178
|
-
vue.createVNode(index$
|
|
192
|
+
vue.createVNode(index$3, {
|
|
179
193
|
maxcount: _ctx.maxcount,
|
|
180
194
|
selected: selected.value,
|
|
181
195
|
onRemove: handleSelect,
|
|
@@ -198,7 +212,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
198
212
|
})
|
|
199
213
|
])) : vue.createCommentVNode("v-if", true)
|
|
200
214
|
])
|
|
201
|
-
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
215
|
+
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4), {
|
|
202
216
|
key: 1,
|
|
203
217
|
type: "empty",
|
|
204
218
|
customTip: "\u6682\u65E0\u6743\u9650"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
const _hoisted_1 = { class: "card-alias" };
|
|
4
|
+
const _hoisted_2 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "check-box active"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_3 = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "check-box"
|
|
11
|
+
};
|
|
12
|
+
const _sfc_main = vue.defineComponent({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
item: {},
|
|
16
|
+
selectKeys: {},
|
|
17
|
+
disable: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
emits: ["select"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const emits = __emit;
|
|
23
|
+
const selectedOrder = vue.computed(() => {
|
|
24
|
+
var _a;
|
|
25
|
+
const result = {};
|
|
26
|
+
(_a = props.selectKeys) == null ? void 0 : _a.forEach((key, index) => {
|
|
27
|
+
result[key] = index + 1;
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
});
|
|
31
|
+
function handleCheck() {
|
|
32
|
+
if (props.disable && !selectedOrder.value[props.item.id])
|
|
33
|
+
return;
|
|
34
|
+
emits("select", props.item);
|
|
35
|
+
}
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
38
|
+
class: "card-wrapper-image",
|
|
39
|
+
onClick: vue.withModifiers(handleCheck, ["stop"])
|
|
40
|
+
}, [
|
|
41
|
+
vue.createElementVNode("div", {
|
|
42
|
+
class: vue.normalizeClass(["card-wrapper", { active: selectedOrder.value[_ctx.item.id] }])
|
|
43
|
+
}, [
|
|
44
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
45
|
+
], 2),
|
|
46
|
+
vue.createElementVNode("div", _hoisted_1, vue.toDisplayString(_ctx.item.alias), 1),
|
|
47
|
+
vue.createElementVNode("div", {
|
|
48
|
+
class: "check-box-wrapper",
|
|
49
|
+
onClick: vue.withModifiers(handleCheck, ["stop"])
|
|
50
|
+
}, [
|
|
51
|
+
selectedOrder.value[_ctx.item.id] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, vue.toDisplayString(selectedOrder.value[_ctx.item.id]), 1)) : !_ctx.disable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3)) : vue.createCommentVNode("v-if", true)
|
|
52
|
+
])
|
|
53
|
+
]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
module.exports = _sfc_main;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
|
-
var index$
|
|
5
|
-
var index = require("../../../thumbCard/index.js");
|
|
4
|
+
var index$2 = require("../../../emptyData/index.js");
|
|
5
|
+
var index$1 = require("../../../thumbCard/index.js");
|
|
6
|
+
var index = require("../ListCardWrapper/index.js");
|
|
6
7
|
const _hoisted_1 = { class: "card-list-wrapper" };
|
|
7
|
-
const _hoisted_2 = { class: "card-wrapper" };
|
|
8
|
-
const _hoisted_3 = { class: "card-alias" };
|
|
9
|
-
const _hoisted_4 = ["onClick"];
|
|
10
|
-
const _hoisted_5 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "check-box active"
|
|
13
|
-
};
|
|
14
|
-
const _hoisted_6 = {
|
|
15
|
-
key: 1,
|
|
16
|
-
class: "check-box"
|
|
17
|
-
};
|
|
18
8
|
const _sfc_main = vue.defineComponent({
|
|
19
9
|
__name: "index",
|
|
20
10
|
props: {
|
|
@@ -39,49 +29,39 @@ const _sfc_main = vue.defineComponent({
|
|
|
39
29
|
emits("select-one", item);
|
|
40
30
|
}
|
|
41
31
|
}
|
|
42
|
-
function handleCheck(params) {
|
|
43
|
-
emits("select", params);
|
|
44
|
-
}
|
|
45
|
-
const selectedOrder = vue.computed(() => {
|
|
46
|
-
var _a;
|
|
47
|
-
const result = {};
|
|
48
|
-
(_a = props.selectKeys) == null ? void 0 : _a.forEach((key, index2) => {
|
|
49
|
-
result[key] = index2 + 1;
|
|
50
|
-
});
|
|
51
|
-
return result;
|
|
52
|
-
});
|
|
53
32
|
return (_ctx, _cache) => {
|
|
54
33
|
var _a, _b;
|
|
55
34
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
56
35
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
57
|
-
return vue.openBlock(), vue.
|
|
36
|
+
return vue.openBlock(), vue.createBlock(index, {
|
|
58
37
|
key: item.id,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
item,
|
|
39
|
+
"select-keys": _ctx.selectKeys,
|
|
40
|
+
disable: _ctx.disable,
|
|
41
|
+
onSelect: () => emits("select", item)
|
|
42
|
+
}, {
|
|
43
|
+
default: vue.withCtx(() => [
|
|
44
|
+
vue.createVNode(vue.unref(index$1), {
|
|
63
45
|
url: item.url,
|
|
64
46
|
thumb: item.thumb,
|
|
65
47
|
catalog: item.catalog,
|
|
66
48
|
meta: item,
|
|
49
|
+
"use-mask": true,
|
|
67
50
|
"handlers-key": handlersKey.value,
|
|
51
|
+
options: {
|
|
52
|
+
fit: item.catalog === "image" ? "contain" : "cover"
|
|
53
|
+
},
|
|
68
54
|
onHandle: handleOption
|
|
69
|
-
}, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key"])
|
|
55
|
+
}, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key", "options"])
|
|
70
56
|
]),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class: "check-box-wrapper",
|
|
74
|
-
onClick: () => handleCheck(item)
|
|
75
|
-
}, [
|
|
76
|
-
selectedOrder.value[item.id] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, vue.toDisplayString(selectedOrder.value[item.id]), 1)) : !_ctx.disable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6)) : vue.createCommentVNode("v-if", true)
|
|
77
|
-
], 8, _hoisted_4)
|
|
78
|
-
]);
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1032, ["item", "select-keys", "disable", "onSelect"]);
|
|
79
59
|
}), 128)),
|
|
80
60
|
vue.createCommentVNode(" \u7A7A\u72B6\u6001 "),
|
|
81
61
|
((_a = _ctx.list) == null ? void 0 : _a.length) === 0 && _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Spin), {
|
|
82
62
|
key: 0,
|
|
83
63
|
loading: true
|
|
84
|
-
})) : !((_b = _ctx.list) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
64
|
+
})) : !((_b = _ctx.list) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2), {
|
|
85
65
|
key: 1,
|
|
86
66
|
type: "empty",
|
|
87
67
|
customTip: "\u6682\u65E0\u6570\u636E"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var vueCmstopIcons = require("@arco-iconbox/vue-cmstop-icons");
|
|
5
|
+
const _hoisted_1 = { class: "upload-wrapper" };
|
|
6
|
+
const _hoisted_2 = { class: "upload-buttons" };
|
|
7
|
+
const _hoisted_3 = { class: "upload-dragger" };
|
|
8
|
+
const accept = "image/*,video/*,audio/*";
|
|
9
|
+
const _sfc_main = vue.defineComponent({
|
|
10
|
+
__name: "Upload",
|
|
11
|
+
emits: ["change"],
|
|
12
|
+
setup(__props, { emit: __emit }) {
|
|
13
|
+
const emits = __emit;
|
|
14
|
+
function handleUpload(options) {
|
|
15
|
+
emits("change", options.fileItem);
|
|
16
|
+
}
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
19
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
20
|
+
vue.createVNode(vue.unref(webVue.Upload), {
|
|
21
|
+
accept,
|
|
22
|
+
multiple: true,
|
|
23
|
+
directory: false,
|
|
24
|
+
"show-file-list": false,
|
|
25
|
+
"custom-request": handleUpload,
|
|
26
|
+
style: { "width": "auto" }
|
|
27
|
+
}, {
|
|
28
|
+
"upload-button": vue.withCtx(() => [
|
|
29
|
+
vue.createVNode(vue.unref(webVue.Button), { type: "primary" }, {
|
|
30
|
+
icon: vue.withCtx(() => [
|
|
31
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconComputer))
|
|
32
|
+
]),
|
|
33
|
+
default: vue.withCtx(() => [
|
|
34
|
+
vue.createTextVNode(" \u672C\u5730\u4E0A\u4F20 ")
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
})
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
}),
|
|
41
|
+
vue.createCommentVNode(' <a-button type="primary"> \u626B\u7801\u4E0A\u4F20 </a-button>\n <a-button type="primary"> \u5206\u4EAB\u4E0A\u4F20 </a-button> ')
|
|
42
|
+
]),
|
|
43
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
44
|
+
vue.createVNode(vue.unref(webVue.Upload), {
|
|
45
|
+
draggable: "",
|
|
46
|
+
tip: "\u652F\u6301\u56FE\u7247\u3001\u89C6\u9891\u3001\u97F3\u9891\u6587\u4EF6",
|
|
47
|
+
accept,
|
|
48
|
+
multiple: true,
|
|
49
|
+
"show-file-list": false,
|
|
50
|
+
"custom-request": handleUpload
|
|
51
|
+
})
|
|
52
|
+
])
|
|
53
|
+
]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var Upload = require("./components/Upload.js");
|
|
4
|
+
var useUpload = require("../../../hooks/useUpload.js");
|
|
5
|
+
var index$1 = require("../../../thumbCard/index.js");
|
|
6
|
+
var index = require("../ListCardWrapper/index.js");
|
|
7
|
+
const _hoisted_1 = { class: "upload-list-wrapper" };
|
|
8
|
+
const _hoisted_2 = { class: "list-upload" };
|
|
9
|
+
const _hoisted_3 = { class: "list-content" };
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "list-tips"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = { class: "card-list-wrapper" };
|
|
15
|
+
const _sfc_main = vue.defineComponent({
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
selectKeys: {},
|
|
19
|
+
disable: { type: Boolean }
|
|
20
|
+
},
|
|
21
|
+
emits: ["select", "select-one"],
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const emits = __emit;
|
|
25
|
+
const handlersKey = vue.computed(() => {
|
|
26
|
+
var _a;
|
|
27
|
+
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable)
|
|
28
|
+
return [];
|
|
29
|
+
return [{ label: "\u9009\u7528", key: "select" }];
|
|
30
|
+
});
|
|
31
|
+
function handleOption(params) {
|
|
32
|
+
const { key, item } = params;
|
|
33
|
+
if (key === "select") {
|
|
34
|
+
emits("select-one", item);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const { list, uploadFile } = useUpload["default"]();
|
|
38
|
+
const userInfo = vue.inject("userInfo");
|
|
39
|
+
const baseAPI = vue.inject("baseAPI");
|
|
40
|
+
const repoId = vue.computed(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
43
|
+
});
|
|
44
|
+
function handleChange(file) {
|
|
45
|
+
if (!baseAPI || !repoId.value)
|
|
46
|
+
return;
|
|
47
|
+
uploadFile(baseAPI, file.file, 0, repoId.value);
|
|
48
|
+
}
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
52
|
+
vue.createCommentVNode(" \u4E0A\u4F20\u7EC4\u4EF6 "),
|
|
53
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
54
|
+
vue.createVNode(Upload, { onChange: handleChange })
|
|
55
|
+
]),
|
|
56
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
57
|
+
((_a = vue.unref(list)) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, " \u5DF2\u4E0A\u4F20 " + vue.toDisplayString((_b = vue.unref(list)) == null ? void 0 : _b.length) + " \u4E2A\u7D20\u6750 ", 1)) : vue.createCommentVNode("v-if", true),
|
|
58
|
+
vue.createCommentVNode(" \u4E0A\u4F20\u5217\u8868 "),
|
|
59
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
60
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item) => {
|
|
61
|
+
return vue.openBlock(), vue.createBlock(index, {
|
|
62
|
+
key: item.sig_id,
|
|
63
|
+
item,
|
|
64
|
+
"select-keys": _ctx.selectKeys,
|
|
65
|
+
disable: _ctx.disable,
|
|
66
|
+
onSelect: () => emits("select", item)
|
|
67
|
+
}, {
|
|
68
|
+
default: vue.withCtx(() => [
|
|
69
|
+
vue.createVNode(vue.unref(index$1), {
|
|
70
|
+
url: item.url,
|
|
71
|
+
thumb: item.url,
|
|
72
|
+
catalog: item.catalog,
|
|
73
|
+
meta: item,
|
|
74
|
+
options: {
|
|
75
|
+
fit: item.catalog === "image" ? "contain" : "cover"
|
|
76
|
+
},
|
|
77
|
+
"use-mask": true,
|
|
78
|
+
"handlers-key": handlersKey.value,
|
|
79
|
+
onHandle: handleOption
|
|
80
|
+
}, null, 8, ["url", "thumb", "catalog", "meta", "options", "handlers-key"])
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1032, ["item", "select-keys", "disable", "onSelect"]);
|
|
84
|
+
}), 128))
|
|
85
|
+
])
|
|
86
|
+
])
|
|
87
|
+
]);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
module.exports = _sfc_main;
|
|
@@ -18,7 +18,8 @@ const _hoisted_7 = { class: "filter-extra" };
|
|
|
18
18
|
const _sfc_main = vue.defineComponent({
|
|
19
19
|
__name: "index",
|
|
20
20
|
props: {
|
|
21
|
-
disableUploadBy: { type: Boolean }
|
|
21
|
+
disableUploadBy: { type: Boolean },
|
|
22
|
+
filterOptions: {}
|
|
22
23
|
},
|
|
23
24
|
emits: ["upload", "change"],
|
|
24
25
|
setup(__props, { emit: __emit }) {
|
|
@@ -94,7 +95,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
94
95
|
});
|
|
95
96
|
const isEmpty = vue.computed(() => {
|
|
96
97
|
return Object.keys(filter.value).every((key) => {
|
|
97
|
-
return
|
|
98
|
+
return filter.value[key] === originFilter[key];
|
|
98
99
|
});
|
|
99
100
|
});
|
|
100
101
|
vue.watch(
|
|
@@ -109,12 +110,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
109
110
|
});
|
|
110
111
|
emits("change", result);
|
|
111
112
|
},
|
|
112
|
-
{ deep: true }
|
|
113
|
+
{ deep: true, immediate: true }
|
|
113
114
|
);
|
|
114
115
|
vue.onMounted(() => {
|
|
116
|
+
var _a;
|
|
115
117
|
load();
|
|
118
|
+
if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
|
|
119
|
+
filter.value.catalog = props.filterOptions.mediaType;
|
|
120
|
+
originFilter.catalog = props.filterOptions.mediaType;
|
|
121
|
+
}
|
|
116
122
|
});
|
|
117
123
|
return (_ctx, _cache) => {
|
|
124
|
+
var _a;
|
|
118
125
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
119
126
|
vue.createElementVNode("div", _hoisted_2, [
|
|
120
127
|
vue.createCommentVNode(" \u5173\u952E\u8BCD "),
|
|
@@ -162,6 +169,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
162
169
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
163
170
|
modelValue: filter.value.catalog,
|
|
164
171
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
|
|
172
|
+
disabled: (_a = _ctx.filterOptions) == null ? void 0 : _a.mediaTypeStrict,
|
|
165
173
|
"allow-clear": "",
|
|
166
174
|
placeholder: "\u7C7B\u578B"
|
|
167
175
|
}, {
|
|
@@ -175,7 +183,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
175
183
|
}), 128))
|
|
176
184
|
]),
|
|
177
185
|
_: 1
|
|
178
|
-
}, 8, ["modelValue"])
|
|
186
|
+
}, 8, ["modelValue", "disabled"])
|
|
179
187
|
]),
|
|
180
188
|
vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
|
|
181
189
|
vue.createVNode(vue.unref(webVue.RangePicker), {
|
|
@@ -1,59 +1,7 @@
|
|
|
1
1
|
.card-list-wrapper {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-gap: 20px;
|
|
4
|
-
grid-template-columns: repeat(
|
|
5
|
-
}
|
|
6
|
-
.card-list-wrapper .card-wrapper-image {
|
|
7
|
-
position: relative;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
}
|
|
10
|
-
.card-list-wrapper .card-wrapper-image .card-wrapper {
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
aspect-ratio: 4 / 3;
|
|
13
|
-
}
|
|
14
|
-
.card-list-wrapper .card-wrapper-image .card-alias {
|
|
15
|
-
width: 100%;
|
|
16
|
-
margin-top: 6px;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
color: #3d3d3d;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
line-height: 22px;
|
|
21
|
-
white-space: nowrap;
|
|
22
|
-
text-overflow: ellipsis;
|
|
23
|
-
}
|
|
24
|
-
.card-list-wrapper .card-wrapper-image:hover .check-box-wrapper .check-box,
|
|
25
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper .check-box.active {
|
|
26
|
-
opacity: 1;
|
|
27
|
-
}
|
|
28
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper {
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 8px;
|
|
31
|
-
left: 8px;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper .check-box {
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
width: 22px;
|
|
37
|
-
height: 22px;
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
line-height: 22px;
|
|
40
|
-
text-align: center;
|
|
41
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
42
|
-
border: 1px solid white;
|
|
43
|
-
border-radius: 50%;
|
|
44
|
-
opacity: 0;
|
|
45
|
-
transition: all 0.3s ease-in-out;
|
|
46
|
-
}
|
|
47
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper .check-box::selection {
|
|
48
|
-
display: none;
|
|
49
|
-
}
|
|
50
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper .check-box:hover {
|
|
51
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
52
|
-
}
|
|
53
|
-
.card-list-wrapper .card-wrapper-image .check-box-wrapper .check-box.active {
|
|
54
|
-
color: white;
|
|
55
|
-
background-color: #165dff;
|
|
56
|
-
border-color: #165dff;
|
|
4
|
+
grid-template-columns: repeat(5, 1fr);
|
|
57
5
|
}
|
|
58
6
|
.list-filter-wrapper {
|
|
59
7
|
display: flex;
|
|
@@ -71,7 +19,6 @@
|
|
|
71
19
|
}
|
|
72
20
|
.list-panel-wrapper {
|
|
73
21
|
width: 420px;
|
|
74
|
-
max-height: 600px;
|
|
75
22
|
padding: 0 !important;
|
|
76
23
|
overflow: hidden;
|
|
77
24
|
border: none;
|
|
@@ -85,7 +32,12 @@
|
|
|
85
32
|
display: none;
|
|
86
33
|
}
|
|
87
34
|
.list-panel-wrapper .arco-popover-content {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
height: 100%;
|
|
38
|
+
max-height: 600px;
|
|
88
39
|
margin-top: 0;
|
|
40
|
+
overflow: hidden;
|
|
89
41
|
}
|
|
90
42
|
.list-panel-wrapper .list-panel-header {
|
|
91
43
|
display: flex;
|
|
@@ -105,8 +57,11 @@
|
|
|
105
57
|
cursor: pointer;
|
|
106
58
|
}
|
|
107
59
|
.list-panel-wrapper .list-selected-record {
|
|
108
|
-
|
|
109
|
-
|
|
60
|
+
flex: 1;
|
|
61
|
+
overflow-y: scroll;
|
|
62
|
+
}
|
|
63
|
+
.list-panel-wrapper .list-selected-record::-webkit-scrollbar {
|
|
64
|
+
display: none;
|
|
110
65
|
}
|
|
111
66
|
.list-panel-wrapper .list-selected-record .list-selected-item {
|
|
112
67
|
display: flex;
|
|
@@ -126,6 +81,85 @@
|
|
|
126
81
|
white-space: nowrap;
|
|
127
82
|
text-overflow: ellipsis;
|
|
128
83
|
}
|
|
84
|
+
.upload-list-wrapper .list-content {
|
|
85
|
+
margin-top: 30px;
|
|
86
|
+
}
|
|
87
|
+
.upload-list-wrapper .list-content .list-tips {
|
|
88
|
+
margin-bottom: 16px;
|
|
89
|
+
color: #3d3d3d;
|
|
90
|
+
}
|
|
91
|
+
.upload-list-wrapper .upload-wrapper {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
}
|
|
95
|
+
.upload-list-wrapper .upload-wrapper .upload-buttons {
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: 20px;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
margin: 20px 0;
|
|
100
|
+
}
|
|
101
|
+
.upload-list-wrapper .upload-wrapper .upload-dragger {
|
|
102
|
+
width: calc(100% - 2px);
|
|
103
|
+
}
|
|
104
|
+
.card-wrapper-image {
|
|
105
|
+
position: relative;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
}
|
|
109
|
+
.card-wrapper-image .card-wrapper {
|
|
110
|
+
position: relative;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
aspect-ratio: 4 / 3;
|
|
113
|
+
}
|
|
114
|
+
.card-wrapper-image .card-alias {
|
|
115
|
+
width: 100%;
|
|
116
|
+
margin-top: 6px;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
color: #3d3d3d;
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
line-height: 22px;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
}
|
|
124
|
+
.card-wrapper-image:hover .check-box-wrapper .check-box,
|
|
125
|
+
.card-wrapper-image .check-box-wrapper .check-box.active {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
.card-wrapper-image .check-box-wrapper {
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 8px;
|
|
131
|
+
left: 8px;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
.card-wrapper-image .check-box-wrapper .check-box {
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
width: 22px;
|
|
137
|
+
height: 22px;
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
line-height: 22px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
142
|
+
border: 1px solid white;
|
|
143
|
+
border-radius: 50%;
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transition: all 0.3s ease-in-out;
|
|
146
|
+
}
|
|
147
|
+
.card-wrapper-image .check-box-wrapper .check-box::selection {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
.card-wrapper-image .check-box-wrapper .check-box:hover {
|
|
151
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
152
|
+
}
|
|
153
|
+
.card-wrapper-image .check-box-wrapper .check-box.active {
|
|
154
|
+
color: white;
|
|
155
|
+
background-color: #165dff;
|
|
156
|
+
border-color: #165dff;
|
|
157
|
+
}
|
|
158
|
+
.resource-select-drawer .arco-drawer-body {
|
|
159
|
+
box-sizing: border-box;
|
|
160
|
+
padding: 0;
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
}
|
|
129
163
|
.resource-select-container {
|
|
130
164
|
display: flex;
|
|
131
165
|
flex-direction: column;
|
|
@@ -134,9 +168,14 @@
|
|
|
134
168
|
height: 100%;
|
|
135
169
|
}
|
|
136
170
|
.resource-select-container .resource-select-filter,
|
|
137
|
-
.resource-select-container .resource-select-content,
|
|
138
171
|
.resource-select-container .resource-select-footer {
|
|
139
|
-
padding: 0
|
|
172
|
+
padding: 0 40px;
|
|
173
|
+
}
|
|
174
|
+
.resource-select-container .resource-select-content .arco-scrollbar-container {
|
|
175
|
+
padding: 0 40px;
|
|
176
|
+
}
|
|
177
|
+
.resource-select-container .resource-select-header {
|
|
178
|
+
padding: 10px 24px 0 24px;
|
|
140
179
|
}
|
|
141
180
|
.resource-select-container .resource-select-header .arco-tabs-nav::before {
|
|
142
181
|
display: none;
|
|
@@ -151,6 +190,7 @@
|
|
|
151
190
|
.resource-select-container .resource-select-footer {
|
|
152
191
|
display: flex;
|
|
153
192
|
justify-content: space-between;
|
|
193
|
+
padding-bottom: 10px;
|
|
154
194
|
}
|
|
155
195
|
.resource-select-container .resource-select-footer .footer-right {
|
|
156
196
|
display: flex;
|