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