@cmstops/pro-compo 3.9.1-rc.5 → 3.9.1-stable.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/index.css +4 -45
- package/dist/index.min.css +1 -1
- package/es/baseFilter/component.js +71 -14
- package/es/config.js +1 -1
- package/es/contentDetailList/component.js +0 -24
- package/es/contentDetailList/components/Content/index.js +1 -2
- package/es/contentDetailList/components/Doc/index.js +0 -6
- package/es/hooks/usePopper.d.ts +1 -1
- package/es/hooks/usePopper.js +3 -3
- package/es/index.css +4 -45
- package/es/selectResourceModal/components/List/ListNormal/Filter.js +90 -192
- package/es/selectResourceModal/components/List/ListNormal/index.js +7 -23
- package/es/selectResourceModal/style/index.css +4 -45
- package/es/selectResourceModal/style/index.less +0 -14
- package/es/selectResourceModal/style/list.less +4 -40
- package/es/selectThumb/component.js +18 -7
- package/es/utils/index.js +6 -6
- package/lib/baseFilter/component.js +69 -12
- package/lib/config.js +1 -1
- package/lib/contentDetailList/component.js +0 -24
- package/lib/contentDetailList/components/Content/index.js +1 -2
- package/lib/contentDetailList/components/Doc/index.js +0 -6
- package/lib/hooks/usePopper.js +3 -3
- package/lib/index.css +4 -45
- package/lib/selectResourceModal/components/List/ListNormal/Filter.js +87 -189
- package/lib/selectResourceModal/components/List/ListNormal/index.js +6 -22
- package/lib/selectResourceModal/style/index.css +4 -45
- package/lib/selectResourceModal/style/index.less +0 -14
- package/lib/selectResourceModal/style/list.less +4 -40
- package/lib/selectThumb/component.js +18 -7
- package/lib/utils/index.js +6 -6
- package/package.json +1 -1
- package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +0 -268
- package/es/selectResourceModal/__demo__/module/basic.d.ts +0 -299
- package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +0 -21
- package/es/selectResourceModal/hooks/useResponsiveFilter.js +0 -142
- package/lib/selectResourceModal/hooks/useResponsiveFilter.js +0 -144
|
@@ -7,66 +7,38 @@ var useAttachement = require("../../../../hooks/useAttachement.js");
|
|
|
7
7
|
var typeMap = require("../../../../utils/typeMap.js");
|
|
8
8
|
var selectionApis = require("../../../scripts/selectionApis.js");
|
|
9
9
|
var resource = require("../../../../utils/resource.js");
|
|
10
|
-
var useResponsiveFilter = require("../../../hooks/useResponsiveFilter.js");
|
|
11
10
|
const _hoisted_1 = { class: "list-filter-wrapper" };
|
|
12
11
|
const _hoisted_2 = { class: "list-filter" };
|
|
13
|
-
const _hoisted_3 = { class: "
|
|
14
|
-
const _hoisted_4 = {
|
|
12
|
+
const _hoisted_3 = { class: "filter-list" };
|
|
13
|
+
const _hoisted_4 = { style: { "width": "200px" } };
|
|
15
14
|
const _hoisted_5 = {
|
|
16
|
-
class: "filter-item",
|
|
17
|
-
style: { "width": "200px" }
|
|
18
|
-
};
|
|
19
|
-
const _hoisted_6 = {
|
|
20
|
-
class: "filter-item",
|
|
21
|
-
style: { "width": "180px" }
|
|
22
|
-
};
|
|
23
|
-
const _hoisted_7 = {
|
|
24
15
|
class: "filter-item",
|
|
25
16
|
style: { "width": "170px" }
|
|
26
17
|
};
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
style: { "width": "240px" }
|
|
30
|
-
};
|
|
31
|
-
const _hoisted_9 = {
|
|
32
|
-
class: "filter-item",
|
|
33
|
-
style: { "width": "240px" }
|
|
34
|
-
};
|
|
35
|
-
const _hoisted_10 = {
|
|
18
|
+
const _hoisted_6 = { class: "filter-item" };
|
|
19
|
+
const _hoisted_7 = {
|
|
36
20
|
key: 0,
|
|
37
21
|
class: "filter-item"
|
|
38
22
|
};
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const _hoisted_13 = {
|
|
23
|
+
const _hoisted_8 = { class: "filter-extra" };
|
|
24
|
+
const _hoisted_9 = {
|
|
42
25
|
key: 0,
|
|
43
26
|
class: "list-filter-tags"
|
|
44
27
|
};
|
|
45
|
-
const
|
|
28
|
+
const _hoisted_10 = ["onClick"];
|
|
46
29
|
const _sfc_main = vue.defineComponent({
|
|
47
30
|
__name: "Filter",
|
|
48
31
|
props: {
|
|
49
|
-
smallScreen: { type: Boolean },
|
|
50
32
|
disableUploadBy: { type: Boolean }
|
|
51
33
|
},
|
|
52
34
|
emits: ["upload", "change"],
|
|
53
35
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
54
|
-
var _a, _b, _c;
|
|
55
36
|
const props = __props;
|
|
56
37
|
const emits = __emit;
|
|
57
38
|
const userInfo = vue.inject("userInfo");
|
|
58
39
|
const baseAPI = vue.inject("baseAPI");
|
|
59
40
|
const filterOptions = vue.inject("filterOptions");
|
|
60
41
|
const domainId = vue.computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
|
|
61
|
-
const filterItemsRef = vue.ref();
|
|
62
|
-
const {
|
|
63
|
-
moreBtnRef,
|
|
64
|
-
popperPanelRef,
|
|
65
|
-
hiddenElementList,
|
|
66
|
-
visible,
|
|
67
|
-
show,
|
|
68
|
-
hide
|
|
69
|
-
} = useResponsiveFilter.useResponsiveFilter(filterItemsRef);
|
|
70
42
|
const { options, loading, load, loadMore, handleSearch } = useSelection({
|
|
71
43
|
labelStr: "alias",
|
|
72
44
|
valueStr: "id",
|
|
@@ -100,17 +72,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
100
72
|
sf: "",
|
|
101
73
|
directory_id: void 0
|
|
102
74
|
};
|
|
103
|
-
|
|
104
|
-
originFilter.catalog = filterOptions.value.mediaType.split(",");
|
|
105
|
-
}
|
|
106
|
-
const filter = vue.ref(
|
|
107
|
-
JSON.parse(
|
|
108
|
-
JSON.stringify({
|
|
109
|
-
...originFilter,
|
|
110
|
-
catalog: ((_c = (_b = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _b.mediaType) == null ? void 0 : _c.split(",")) || []
|
|
111
|
-
})
|
|
112
|
-
)
|
|
113
|
-
);
|
|
75
|
+
const filter = vue.ref(JSON.parse(JSON.stringify(originFilter)));
|
|
114
76
|
const handleReset = () => {
|
|
115
77
|
filter.value = JSON.parse(JSON.stringify(originFilter));
|
|
116
78
|
};
|
|
@@ -155,114 +117,82 @@ const _sfc_main = vue.defineComponent({
|
|
|
155
117
|
filter.value.keyword = val;
|
|
156
118
|
filter.value.precise_keyword = "";
|
|
157
119
|
}
|
|
158
|
-
filter.value.sf = "";
|
|
159
120
|
}
|
|
160
121
|
});
|
|
122
|
+
vue.watch(
|
|
123
|
+
() => searchType.value,
|
|
124
|
+
() => {
|
|
125
|
+
searchInput.value = filter.value.keyword || filter.value.precise_keyword;
|
|
126
|
+
}
|
|
127
|
+
);
|
|
161
128
|
const isEmpty = vue.computed(() => {
|
|
162
|
-
return Object.keys(
|
|
163
|
-
if (key === "catalog") {
|
|
164
|
-
const currentCatalog = filter.value[key] || [];
|
|
165
|
-
const originCatalog = originFilter[key] || [];
|
|
166
|
-
return currentCatalog.length === originCatalog.length && currentCatalog.every((v) => originCatalog.includes(v));
|
|
167
|
-
}
|
|
129
|
+
return Object.keys(filter.value).every((key) => {
|
|
168
130
|
return filter.value[key] === originFilter[key];
|
|
169
131
|
});
|
|
170
132
|
});
|
|
171
133
|
vue.watch(
|
|
172
134
|
() => filter.value,
|
|
173
|
-
(
|
|
174
|
-
const result = { ...
|
|
135
|
+
() => {
|
|
136
|
+
const result = { ...filter.value };
|
|
175
137
|
Object.keys(result).forEach((key) => {
|
|
176
138
|
if (props.disableUploadBy && key === "upload_by")
|
|
177
139
|
delete result[key];
|
|
178
|
-
if (result[key]
|
|
179
|
-
|
|
180
|
-
delete result[key];
|
|
181
|
-
}
|
|
182
|
-
}
|
|
140
|
+
if (!result[key])
|
|
141
|
+
delete result[key];
|
|
183
142
|
});
|
|
184
|
-
if (result.catalog
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
delete result.catalog;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
143
|
+
if (!result.catalog)
|
|
144
|
+
result.catalog = "image,video,audio";
|
|
145
|
+
else
|
|
146
|
+
result.catalog = result.catalog.join(",");
|
|
191
147
|
emits("change", result);
|
|
192
148
|
},
|
|
193
149
|
{ deep: true, immediate: true }
|
|
194
150
|
);
|
|
151
|
+
vue.watch(
|
|
152
|
+
() => filterOptions == null ? void 0 : filterOptions.value,
|
|
153
|
+
() => {
|
|
154
|
+
var _a;
|
|
155
|
+
if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaType) {
|
|
156
|
+
filter.value.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
|
|
157
|
+
if (filterOptions == null ? void 0 : filterOptions.value.mediaTypeStrict) {
|
|
158
|
+
originFilter.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{ immediate: true, deep: true }
|
|
163
|
+
);
|
|
195
164
|
vue.onMounted(() => {
|
|
196
165
|
load();
|
|
197
166
|
});
|
|
198
167
|
__expose({
|
|
199
|
-
|
|
200
|
-
handleReset
|
|
168
|
+
resetFilter: handleReset
|
|
201
169
|
});
|
|
202
170
|
return (_ctx, _cache) => {
|
|
203
|
-
var
|
|
171
|
+
var _a;
|
|
204
172
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
205
|
-
vue.createCommentVNode(" Use filterItemsRef's parentElement as the container for boundary checks "),
|
|
206
173
|
vue.createElementVNode("div", _hoisted_2, [
|
|
207
|
-
vue.
|
|
208
|
-
vue.createElementVNode("div", {
|
|
209
|
-
id: "resource-filter-pannel",
|
|
210
|
-
ref_key: "filterItemsRef",
|
|
211
|
-
ref: filterItemsRef,
|
|
212
|
-
class: "filter-list"
|
|
213
|
-
}, [
|
|
214
|
-
vue.createCommentVNode(" More Filters Button and Popper Panel "),
|
|
215
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
216
|
-
vue.createElementVNode("div", {
|
|
217
|
-
ref_key: "moreBtnRef",
|
|
218
|
-
ref: moreBtnRef
|
|
219
|
-
}, [
|
|
220
|
-
vue.withDirectives(vue.createVNode(vue.unref(webVue.Button), {
|
|
221
|
-
style: { marginRight: "10px" },
|
|
222
|
-
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => vue.unref(visible) ? vue.unref(hide)() : vue.unref(show)(), ["stop"]))
|
|
223
|
-
}, {
|
|
224
|
-
default: vue.withCtx(() => [
|
|
225
|
-
vue.createElementVNode("span", _hoisted_4, [
|
|
226
|
-
_cache[11] || (_cache[11] = vue.createTextVNode(" \u66F4\u591A ")),
|
|
227
|
-
vue.createVNode(vue.unref(icon.IconCaretDown))
|
|
228
|
-
])
|
|
229
|
-
]),
|
|
230
|
-
_: 1
|
|
231
|
-
}, 512), [
|
|
232
|
-
[vue.vShow, vue.unref(hiddenElementList).length]
|
|
233
|
-
])
|
|
234
|
-
], 512),
|
|
235
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
236
|
-
ref_key: "popperPanelRef",
|
|
237
|
-
ref: popperPanelRef,
|
|
238
|
-
class: "filter-pannel",
|
|
239
|
-
onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
240
|
-
}, ["stop"]))
|
|
241
|
-
}, null, 512), [
|
|
242
|
-
[vue.vShow, vue.unref(visible)]
|
|
243
|
-
])
|
|
244
|
-
]),
|
|
174
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
245
175
|
vue.createCommentVNode(" \u5173\u952E\u8BCD "),
|
|
246
|
-
vue.createElementVNode("div",
|
|
176
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
247
177
|
vue.createVNode(vue.unref(webVue.Input), {
|
|
248
178
|
modelValue: searchInput.value,
|
|
249
|
-
"onUpdate:modelValue": _cache[
|
|
179
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchInput.value = $event),
|
|
250
180
|
"allow-clear": "",
|
|
251
181
|
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
|
|
252
182
|
}, {
|
|
253
183
|
prepend: vue.withCtx(() => [
|
|
254
184
|
vue.createVNode(vue.unref(webVue.Dropdown), {
|
|
255
|
-
onSelect: _cache[
|
|
185
|
+
onSelect: _cache[0] || (_cache[0] = (e) => searchType.value = e)
|
|
256
186
|
}, {
|
|
257
187
|
content: vue.withCtx(() => [
|
|
258
188
|
vue.createVNode(vue.unref(webVue.Doption), { value: 0 }, {
|
|
259
|
-
default: vue.withCtx(() => _cache[
|
|
189
|
+
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
260
190
|
vue.createTextVNode("\u7CBE\u51C6\u641C")
|
|
261
191
|
])),
|
|
262
192
|
_: 1
|
|
263
193
|
}),
|
|
264
194
|
vue.createVNode(vue.unref(webVue.Doption), { value: 1 }, {
|
|
265
|
-
default: vue.withCtx(() => _cache[
|
|
195
|
+
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
266
196
|
vue.createTextVNode("\u6A21\u7CCA\u641C")
|
|
267
197
|
])),
|
|
268
198
|
_: 1
|
|
@@ -283,28 +213,24 @@ const _sfc_main = vue.defineComponent({
|
|
|
283
213
|
}, 8, ["modelValue"])
|
|
284
214
|
]),
|
|
285
215
|
vue.createCommentVNode(" \u76EE\u5F55 "),
|
|
286
|
-
vue.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
"allow-search": ""
|
|
299
|
-
}, null, 8, ["modelValue", "data"])
|
|
300
|
-
]),
|
|
216
|
+
vue.createVNode(vue.unref(webVue.TreeSelect), {
|
|
217
|
+
modelValue: filter.value.directory_id,
|
|
218
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.directory_id = $event),
|
|
219
|
+
data: vue.unref(tree),
|
|
220
|
+
placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
|
|
221
|
+
style: { "width": "120px" },
|
|
222
|
+
"field-names": {
|
|
223
|
+
title: "alias",
|
|
224
|
+
key: "id"
|
|
225
|
+
},
|
|
226
|
+
"allow-clear": ""
|
|
227
|
+
}, null, 8, ["modelValue", "data"]),
|
|
301
228
|
vue.createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
|
|
302
|
-
vue.createElementVNode("div",
|
|
229
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
303
230
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
304
231
|
modelValue: filter.value.catalog,
|
|
305
|
-
"onUpdate:modelValue": _cache[
|
|
306
|
-
disabled: (
|
|
307
|
-
"popup-container": "#resource-filter-pannel",
|
|
232
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.catalog = $event),
|
|
233
|
+
disabled: (_a = vue.unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
|
|
308
234
|
"allow-clear": "",
|
|
309
235
|
placeholder: "\u7C7B\u578B",
|
|
310
236
|
multiple: "",
|
|
@@ -323,22 +249,19 @@ const _sfc_main = vue.defineComponent({
|
|
|
323
249
|
}, 8, ["modelValue", "disabled"])
|
|
324
250
|
]),
|
|
325
251
|
vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
|
|
326
|
-
vue.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}, null, 8, ["modelValue"])
|
|
333
|
-
]),
|
|
252
|
+
vue.createVNode(vue.unref(webVue.RangePicker), {
|
|
253
|
+
modelValue: rangeTime.value,
|
|
254
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
|
|
255
|
+
"allow-clear": "",
|
|
256
|
+
style: { "width": "240px" }
|
|
257
|
+
}, null, 8, ["modelValue"]),
|
|
334
258
|
vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
|
|
335
|
-
vue.createElementVNode("div",
|
|
259
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
336
260
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
337
261
|
modelValue: filter.value.source,
|
|
338
|
-
"onUpdate:modelValue": _cache[
|
|
262
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
|
|
339
263
|
"allow-clear": "",
|
|
340
|
-
placeholder: "\u6765\u6E90"
|
|
341
|
-
"popup-container": "#resource-filter-pannel"
|
|
264
|
+
placeholder: "\u6765\u6E90"
|
|
342
265
|
}, {
|
|
343
266
|
default: vue.withCtx(() => [
|
|
344
267
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceSource), (item) => {
|
|
@@ -353,15 +276,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
353
276
|
}, 8, ["modelValue"])
|
|
354
277
|
]),
|
|
355
278
|
vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u4EBA "),
|
|
356
|
-
!_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div",
|
|
279
|
+
!_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
357
280
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
358
281
|
modelValue: filter.value.upload_by,
|
|
359
|
-
"onUpdate:modelValue": _cache[
|
|
282
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
|
|
360
283
|
"allow-clear": "",
|
|
361
284
|
placeholder: "\u4E0A\u4F20\u4EBA",
|
|
362
285
|
loading: vue.unref(loading),
|
|
363
286
|
"allow-search": "",
|
|
364
|
-
"popup-container": "#resource-filter-pannel",
|
|
365
287
|
onSearch: vue.unref(handleSearch),
|
|
366
288
|
onDropdownReachBottom: vue.unref(loadMore)
|
|
367
289
|
}, {
|
|
@@ -376,64 +298,40 @@ const _sfc_main = vue.defineComponent({
|
|
|
376
298
|
]),
|
|
377
299
|
_: 1
|
|
378
300
|
}, 8, ["modelValue", "loading", "onSearch", "onDropdownReachBottom"])
|
|
379
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
_ctx.smallScreen ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
385
|
-
key: 0,
|
|
386
|
-
type: "text",
|
|
387
|
-
onClick: handleReset
|
|
388
|
-
}, {
|
|
389
|
-
icon: vue.withCtx(() => [
|
|
390
|
-
vue.createVNode(vue.unref(icon.IconRefresh))
|
|
391
|
-
]),
|
|
392
|
-
_: 1
|
|
393
|
-
})) : (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
394
|
-
key: 1,
|
|
395
|
-
type: "text",
|
|
396
|
-
onClick: handleReset
|
|
397
|
-
}, {
|
|
398
|
-
default: vue.withCtx(() => _cache[14] || (_cache[14] = [
|
|
399
|
-
vue.createTextVNode(" \u91CD\u7F6E ")
|
|
400
|
-
])),
|
|
401
|
-
_: 1
|
|
402
|
-
}))
|
|
403
|
-
], 512), [
|
|
404
|
-
[vue.vShow, !isEmpty.value]
|
|
405
|
-
]),
|
|
406
|
-
_ctx.smallScreen ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
407
|
-
key: 0,
|
|
408
|
-
type: "primary",
|
|
409
|
-
onClick: _cache[9] || (_cache[9] = ($event) => emits("upload"))
|
|
301
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
302
|
+
!isEmpty.value ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
303
|
+
key: 1,
|
|
304
|
+
type: "text",
|
|
305
|
+
onClick: handleReset
|
|
410
306
|
}, {
|
|
411
|
-
|
|
412
|
-
vue.
|
|
413
|
-
]),
|
|
307
|
+
default: vue.withCtx(() => _cache[10] || (_cache[10] = [
|
|
308
|
+
vue.createTextVNode(" \u91CD\u7F6E ")
|
|
309
|
+
])),
|
|
414
310
|
_: 1
|
|
415
|
-
})) :
|
|
416
|
-
|
|
311
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
312
|
+
]),
|
|
313
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
314
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
417
315
|
type: "primary",
|
|
418
|
-
onClick: _cache[
|
|
316
|
+
onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
|
|
419
317
|
}, {
|
|
420
318
|
icon: vue.withCtx(() => [
|
|
421
319
|
vue.createVNode(vue.unref(icon.IconUpload))
|
|
422
320
|
]),
|
|
423
321
|
default: vue.withCtx(() => [
|
|
424
|
-
_cache[
|
|
322
|
+
_cache[11] || (_cache[11] = vue.createTextVNode(" \u4E0A\u4F20 "))
|
|
425
323
|
]),
|
|
426
324
|
_: 1
|
|
427
|
-
})
|
|
325
|
+
})
|
|
428
326
|
])
|
|
429
327
|
]),
|
|
430
|
-
searchInput.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
328
|
+
searchInput.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
431
329
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resource.keywordsSelection), (item) => {
|
|
432
330
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
433
331
|
key: item.value,
|
|
434
332
|
class: vue.normalizeClass(["list-filter-tag", { active: filter.value.sf === item.value }]),
|
|
435
333
|
onClick: ($event) => filter.value.sf = item.value
|
|
436
|
-
}, vue.toDisplayString(item.name), 11,
|
|
334
|
+
}, vue.toDisplayString(item.name), 11, _hoisted_10);
|
|
437
335
|
}), 128))
|
|
438
336
|
])) : vue.createCommentVNode("v-if", true)
|
|
439
337
|
]);
|
|
@@ -4,6 +4,7 @@ var webVue = require("@arco-design/web-vue");
|
|
|
4
4
|
var ListWraper = require("../ListWraper.js");
|
|
5
5
|
var useAttachement = require("../../../../hooks/useAttachement.js");
|
|
6
6
|
var Filter = require("./Filter.js");
|
|
7
|
+
const _hoisted_1 = { class: "list-item-grid" };
|
|
7
8
|
const _sfc_main = vue.defineComponent({
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
@@ -27,18 +28,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
27
28
|
changeKey
|
|
28
29
|
} = useAttachement["default"]({ key: props.activeKey, BASE_API });
|
|
29
30
|
vue.watch(() => props.activeKey, changeKey);
|
|
30
|
-
const listWrapper = vue.ref(null);
|
|
31
|
-
const smallScreen = vue.ref(false);
|
|
32
|
-
vue.watch(
|
|
33
|
-
() => {
|
|
34
|
-
var _a;
|
|
35
|
-
return (_a = listWrapper.value) == null ? void 0 : _a.offsetWidth;
|
|
36
|
-
},
|
|
37
|
-
(val) => {
|
|
38
|
-
smallScreen.value = !!(val && val < 600);
|
|
39
|
-
},
|
|
40
|
-
{ immediate: true }
|
|
41
|
-
);
|
|
42
31
|
vue.onMounted(() => {
|
|
43
32
|
loadData();
|
|
44
33
|
});
|
|
@@ -52,10 +41,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
52
41
|
]),
|
|
53
42
|
header: vue.withCtx(() => [
|
|
54
43
|
vue.createVNode(Filter, {
|
|
55
|
-
smallScreen: smallScreen.value,
|
|
56
44
|
onChange: vue.unref(changeFilter),
|
|
57
45
|
onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
|
|
58
|
-
}, null, 8, ["
|
|
46
|
+
}, null, 8, ["onChange"])
|
|
59
47
|
]),
|
|
60
48
|
footer: vue.withCtx(() => [
|
|
61
49
|
vue.createVNode(vue.unref(webVue.Pagination), {
|
|
@@ -64,26 +52,22 @@ const _sfc_main = vue.defineComponent({
|
|
|
64
52
|
total: vue.unref(total),
|
|
65
53
|
"page-size": vue.unref(limit),
|
|
66
54
|
"show-total": "",
|
|
67
|
-
"show-page-size":
|
|
55
|
+
"show-page-size": "",
|
|
68
56
|
"base-size": 3,
|
|
69
57
|
"buffer-size": 1,
|
|
70
58
|
onChange: _cache[2] || (_cache[2] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
|
|
71
59
|
onPageSizeChange: vue.unref(changeSize)
|
|
72
|
-
}, null, 8, ["current", "total", "page-size", "
|
|
60
|
+
}, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
|
|
73
61
|
]),
|
|
74
62
|
default: vue.withCtx(() => [
|
|
75
|
-
vue.createElementVNode("div",
|
|
76
|
-
ref_key: "listWrapper",
|
|
77
|
-
ref: listWrapper,
|
|
78
|
-
class: "list-item-grid"
|
|
79
|
-
}, [
|
|
63
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
80
64
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item) => {
|
|
81
65
|
return vue.renderSlot(_ctx.$slots, "item", {
|
|
82
66
|
key: item.id,
|
|
83
67
|
item
|
|
84
68
|
});
|
|
85
69
|
}), 128))
|
|
86
|
-
]
|
|
70
|
+
])
|
|
87
71
|
]),
|
|
88
72
|
_: 3
|
|
89
73
|
}, 8, ["loading", "is-empty"]);
|
|
@@ -172,13 +172,11 @@
|
|
|
172
172
|
}
|
|
173
173
|
.resource-list-footer,
|
|
174
174
|
.resource-list-header,
|
|
175
|
-
.resource-list-content .resource-list-content-empty,
|
|
176
175
|
.resource-list-content .arco-scrollbar-container {
|
|
177
176
|
padding: 0 40px;
|
|
178
177
|
}
|
|
179
178
|
.resource-list-footer {
|
|
180
179
|
display: flex;
|
|
181
|
-
flex-wrap: wrap;
|
|
182
180
|
justify-content: space-between;
|
|
183
181
|
padding-bottom: 20px;
|
|
184
182
|
}
|
|
@@ -188,10 +186,6 @@
|
|
|
188
186
|
gap: 10px;
|
|
189
187
|
align-items: center;
|
|
190
188
|
justify-content: flex-end;
|
|
191
|
-
margin-top: 10px;
|
|
192
|
-
}
|
|
193
|
-
.resource-list-footer .footer-right .list-selected-wrapper {
|
|
194
|
-
font-size: 12px;
|
|
195
189
|
}
|
|
196
190
|
.resource-list-content-loading {
|
|
197
191
|
display: flex;
|
|
@@ -203,7 +197,7 @@
|
|
|
203
197
|
.resource-list .list-item-grid {
|
|
204
198
|
display: grid;
|
|
205
199
|
grid-gap: 20px;
|
|
206
|
-
grid-template-columns: repeat(
|
|
200
|
+
grid-template-columns: repeat(5, 1fr);
|
|
207
201
|
}
|
|
208
202
|
.resource-list .list-content {
|
|
209
203
|
margin-top: 30px;
|
|
@@ -246,8 +240,7 @@
|
|
|
246
240
|
}
|
|
247
241
|
.resource-list .list-filter-wrapper .list-filter-tags {
|
|
248
242
|
display: flex;
|
|
249
|
-
|
|
250
|
-
gap: 10px;
|
|
243
|
+
justify-content: space-between;
|
|
251
244
|
margin-top: 10px;
|
|
252
245
|
}
|
|
253
246
|
.resource-list .list-filter-wrapper .list-filter-tags .list-filter-tag {
|
|
@@ -268,41 +261,16 @@
|
|
|
268
261
|
justify-content: space-between;
|
|
269
262
|
}
|
|
270
263
|
.resource-list .list-filter-wrapper .list-filter .filter-list {
|
|
271
|
-
position: relative;
|
|
272
|
-
/** 给 popup 一个参考 */
|
|
273
264
|
display: flex;
|
|
265
|
+
flex-wrap: wrap;
|
|
266
|
+
gap: 10px;
|
|
274
267
|
}
|
|
275
268
|
.resource-list .list-filter-wrapper .list-filter .filter-list .filter-item {
|
|
276
269
|
width: 100px;
|
|
277
|
-
margin-right: 10px;
|
|
278
|
-
}
|
|
279
|
-
.resource-list .list-filter-wrapper .list-filter .filter-list .arco-trigger-popup {
|
|
280
|
-
z-index: 100000 !important;
|
|
281
270
|
}
|
|
282
271
|
.resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
|
|
283
272
|
padding: 0;
|
|
284
273
|
}
|
|
285
|
-
.resource-list .list-filter-wrapper .list-filter .more-btn {
|
|
286
|
-
position: relative;
|
|
287
|
-
/** 给 poperjs 一个参考 */
|
|
288
|
-
}
|
|
289
|
-
.resource-list .list-filter-wrapper .list-filter .more-btn .filter-pannel {
|
|
290
|
-
inset: 40px auto auto auto !important;
|
|
291
|
-
}
|
|
292
|
-
.resource-list .list-filter-wrapper .filter-extra {
|
|
293
|
-
display: flex;
|
|
294
|
-
gap: 10px;
|
|
295
|
-
}
|
|
296
|
-
.resource-list .list-filter-wrapper .filter-pannel {
|
|
297
|
-
z-index: 100000;
|
|
298
|
-
display: flex;
|
|
299
|
-
flex-direction: column;
|
|
300
|
-
gap: 10px;
|
|
301
|
-
padding: 10px;
|
|
302
|
-
background-color: #fff;
|
|
303
|
-
border-radius: 4px;
|
|
304
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
305
|
-
}
|
|
306
274
|
.resource-list .title {
|
|
307
275
|
display: flex;
|
|
308
276
|
gap: 8px;
|
|
@@ -316,10 +284,6 @@
|
|
|
316
284
|
height: 16px;
|
|
317
285
|
background-color: #4886ff;
|
|
318
286
|
}
|
|
319
|
-
.resource-select-wrap {
|
|
320
|
-
width: 100%;
|
|
321
|
-
height: 100%;
|
|
322
|
-
}
|
|
323
287
|
.resource-select-modal-body {
|
|
324
288
|
height: 80vh;
|
|
325
289
|
padding: 0;
|
|
@@ -348,8 +312,3 @@
|
|
|
348
312
|
.resource-select-container .resource-select-header .arco-tabs-content {
|
|
349
313
|
display: none !important;
|
|
350
314
|
}
|
|
351
|
-
.resource-select-container .resource-list-content .resource-list-content-empty {
|
|
352
|
-
box-sizing: border-box;
|
|
353
|
-
width: 100%;
|
|
354
|
-
height: 100%;
|
|
355
|
-
}
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
@import './listCardWrapper.less';
|
|
3
3
|
@import './list.less';
|
|
4
4
|
|
|
5
|
-
.resource-select-wrap {
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
.resource-select-modal-body {
|
|
11
6
|
height: 80vh;
|
|
12
7
|
padding: 0;
|
|
@@ -43,13 +38,4 @@
|
|
|
43
38
|
display: none !important;
|
|
44
39
|
}
|
|
45
40
|
}
|
|
46
|
-
|
|
47
|
-
// 内容区域样式
|
|
48
|
-
.resource-list-content {
|
|
49
|
-
.resource-list-content-empty {
|
|
50
|
-
box-sizing: border-box;
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 100%;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
41
|
}
|