@cmstops/pro-compo 0.3.69 → 0.3.71
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 +13 -13
- package/dist/index.min.css +1 -1
- package/es/index.css +13 -13
- package/es/selectResourceModal/component.js +12 -14
- package/es/selectResourceModal/components/List/ListAi/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListAi/index.js +53 -0
- package/es/selectResourceModal/components/List/ListNormal/index.js +1 -2
- package/es/selectResourceModal/components/List/ListSystem/index.js +1 -2
- package/es/selectResourceModal/components/List/ListVideo/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListVideo/index.js +19 -0
- package/es/selectResourceModal/components/List/ListWraper.js +0 -1
- package/es/selectResourceModal/scripts/useCompoLf.js +2 -0
- package/es/selectResourceModal/scripts/useTabFilter.d.ts +1 -0
- package/es/selectResourceModal/scripts/useTabFilter.js +24 -15
- package/es/selectResourceModal/style/index.css +13 -13
- package/es/selectResourceModal/style/list.less +18 -15
- package/es/videoThumb/component.js +2 -1
- package/lib/index.css +13 -13
- package/lib/selectResourceModal/component.js +12 -14
- package/lib/selectResourceModal/components/List/ListAi/index.js +54 -0
- package/lib/selectResourceModal/components/List/ListNormal/index.js +1 -2
- package/lib/selectResourceModal/components/List/ListSystem/index.js +1 -2
- package/lib/selectResourceModal/components/List/ListVideo/index.js +20 -0
- package/lib/selectResourceModal/components/List/ListWraper.js +0 -1
- package/lib/selectResourceModal/scripts/useCompoLf.js +2 -0
- package/lib/selectResourceModal/scripts/useTabFilter.js +24 -15
- package/lib/selectResourceModal/style/index.css +13 -13
- package/lib/selectResourceModal/style/list.less +18 -15
- package/lib/videoThumb/component.js +2 -1
- package/package.json +1 -1
|
@@ -22,28 +22,29 @@ const _sfc_main = defineComponent({
|
|
|
22
22
|
__name: "component",
|
|
23
23
|
props: {
|
|
24
24
|
BASE_API: {},
|
|
25
|
-
visible: { type: Boolean },
|
|
26
25
|
userInfo: {},
|
|
27
|
-
|
|
26
|
+
visible: { type: Boolean },
|
|
28
27
|
wrap: {},
|
|
28
|
+
maxcount: {},
|
|
29
29
|
filterOptions: {},
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
mediaUseType: {},
|
|
31
|
+
aiThumbList: {},
|
|
32
|
+
videoThumbOptions: {}
|
|
32
33
|
},
|
|
33
34
|
emits: ["update:visible", "submit"],
|
|
34
35
|
setup(__props, { emit: __emit }) {
|
|
35
36
|
const props = __props;
|
|
36
37
|
const emits = __emit;
|
|
37
38
|
const { selected, selectedKeys, disableSelect, handleSelect, handleClear } = useResourceSelect(props);
|
|
38
|
-
const { activeKey, activeComponent, tabKeyList } = useTabFilter(props);
|
|
39
|
+
const { activeKey, activeComponent, tabKeyList, handelChangeTab } = useTabFilter(props);
|
|
39
40
|
const { wrapProps, close, submit } = useCompoentLifycycle(props, emits);
|
|
40
41
|
const handleOptions = (options, handleOptions2) => {
|
|
41
|
-
const { key,
|
|
42
|
+
const { key, item } = options;
|
|
42
43
|
if (key === "select-one") {
|
|
43
|
-
if (Array.isArray(
|
|
44
|
-
submit(
|
|
44
|
+
if (Array.isArray(item))
|
|
45
|
+
submit(item);
|
|
45
46
|
else
|
|
46
|
-
submit([
|
|
47
|
+
submit([item]);
|
|
47
48
|
close();
|
|
48
49
|
return;
|
|
49
50
|
}
|
|
@@ -52,9 +53,6 @@ const _sfc_main = defineComponent({
|
|
|
52
53
|
function handleConfirm() {
|
|
53
54
|
submit(selected.value);
|
|
54
55
|
}
|
|
55
|
-
function handelChangeTab(tabKey) {
|
|
56
|
-
activeKey.value = tabKey;
|
|
57
|
-
}
|
|
58
56
|
return (_ctx, _cache) => {
|
|
59
57
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
60
58
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.wrap === "drawer" ? unref(Drawer) : unref(Modal)), mergeProps({ visible: _ctx.visible }, unref(wrapProps)), {
|
|
@@ -71,7 +69,7 @@ const _sfc_main = defineComponent({
|
|
|
71
69
|
createCommentVNode(" \u5217\u8868\u5206\u53D1\u5668 "),
|
|
72
70
|
(openBlock(), createBlock(resolveDynamicComponent(unref(activeComponent)), {
|
|
73
71
|
"active-key": unref(activeKey),
|
|
74
|
-
onChangeTab: handelChangeTab
|
|
72
|
+
onChangeTab: unref(handelChangeTab)
|
|
75
73
|
}, {
|
|
76
74
|
item: withCtx(({ item, onOptions }) => [
|
|
77
75
|
createVNode(_sfc_main$2, {
|
|
@@ -108,7 +106,7 @@ const _sfc_main = defineComponent({
|
|
|
108
106
|
])) : createCommentVNode("v-if", true)
|
|
109
107
|
]),
|
|
110
108
|
_: 1
|
|
111
|
-
}, 40, ["active-key"]))
|
|
109
|
+
}, 40, ["active-key", "onChangeTab"]))
|
|
112
110
|
])) : (openBlock(), createBlock(unref(emptyData), {
|
|
113
111
|
key: 1,
|
|
114
112
|
type: "empty",
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, watch, openBlock, createBlock, withCtx, renderSlot, createElementBlock, Fragment, createElementVNode, renderList, createCommentVNode, createTextVNode } from "vue";
|
|
2
|
+
import _sfc_main$1 from "../ListWraper.js";
|
|
3
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
4
|
+
/* @__PURE__ */ createElementVNode("div", { class: "line" }),
|
|
5
|
+
/* @__PURE__ */ createTextVNode(" \u5C01\u9762\u56FE ")
|
|
6
|
+
], -1);
|
|
7
|
+
const _hoisted_2 = { class: "list-item-grid" };
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
9
|
+
__name: "index",
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const aiThumbList = inject("aiThumbList");
|
|
12
|
+
const aiThumbListReal = ref([]);
|
|
13
|
+
watch(
|
|
14
|
+
() => aiThumbList == null ? void 0 : aiThumbList.value,
|
|
15
|
+
() => {
|
|
16
|
+
var _a;
|
|
17
|
+
aiThumbListReal.value = ((_a = aiThumbList == null ? void 0 : aiThumbList.value) == null ? void 0 : _a.map((item) => {
|
|
18
|
+
return {
|
|
19
|
+
url: item,
|
|
20
|
+
catalog: "image",
|
|
21
|
+
thumb: item,
|
|
22
|
+
alias: item
|
|
23
|
+
};
|
|
24
|
+
})) || [];
|
|
25
|
+
},
|
|
26
|
+
{ deep: true, immediate: true }
|
|
27
|
+
);
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
30
|
+
isEmpty: !aiThumbListReal.value.length
|
|
31
|
+
}, {
|
|
32
|
+
"footer-extra": withCtx(() => [
|
|
33
|
+
renderSlot(_ctx.$slots, "footer-extra")
|
|
34
|
+
]),
|
|
35
|
+
default: withCtx(() => [
|
|
36
|
+
aiThumbListReal.value.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
37
|
+
_hoisted_1,
|
|
38
|
+
createElementVNode("div", _hoisted_2, [
|
|
39
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(aiThumbListReal.value, (item) => {
|
|
40
|
+
return renderSlot(_ctx.$slots, "item", {
|
|
41
|
+
key: item.url,
|
|
42
|
+
item
|
|
43
|
+
});
|
|
44
|
+
}), 128))
|
|
45
|
+
])
|
|
46
|
+
], 64)) : createCommentVNode("v-if", true)
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["isEmpty"]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export { _sfc_main as default };
|
|
@@ -32,7 +32,6 @@ const _sfc_main = defineComponent({
|
|
|
32
32
|
});
|
|
33
33
|
return (_ctx, _cache) => {
|
|
34
34
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
35
|
-
list: unref(list),
|
|
36
35
|
loading: unref(loading),
|
|
37
36
|
"is-empty": unref(list).length === 0
|
|
38
37
|
}, {
|
|
@@ -70,7 +69,7 @@ const _sfc_main = defineComponent({
|
|
|
70
69
|
])
|
|
71
70
|
]),
|
|
72
71
|
_: 3
|
|
73
|
-
}, 8, ["
|
|
72
|
+
}, 8, ["loading", "is-empty"]);
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
75
|
});
|
|
@@ -60,7 +60,6 @@ const _sfc_main = defineComponent({
|
|
|
60
60
|
});
|
|
61
61
|
return (_ctx, _cache) => {
|
|
62
62
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
63
|
-
list: _ctx.list,
|
|
64
63
|
loading: loading.value,
|
|
65
64
|
"is-empty": isEmpty.value
|
|
66
65
|
}, {
|
|
@@ -102,7 +101,7 @@ const _sfc_main = defineComponent({
|
|
|
102
101
|
}), 128))
|
|
103
102
|
]),
|
|
104
103
|
_: 3
|
|
105
|
-
}, 8, ["
|
|
104
|
+
}, 8, ["loading", "is-empty"]);
|
|
106
105
|
};
|
|
107
106
|
}
|
|
108
107
|
});
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent, inject, openBlock, createBlock, withCtx, unref, normalizeProps, mergeProps, createCommentVNode } from "vue";
|
|
2
|
+
import videoThumb from "../../../../videoThumb/index.js";
|
|
3
|
+
import _sfc_main$1 from "../ListWraper.js";
|
|
4
|
+
const _sfc_main = defineComponent({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(__props) {
|
|
7
|
+
const videoThumbOptions = inject("videoThumbOptions");
|
|
8
|
+
return (_ctx, _cache) => {
|
|
9
|
+
return openBlock(), createBlock(_sfc_main$1, null, {
|
|
10
|
+
"footer-extra": withCtx(() => []),
|
|
11
|
+
default: withCtx(() => [
|
|
12
|
+
unref(videoThumbOptions) ? (openBlock(), createBlock(unref(videoThumb), normalizeProps(mergeProps({ key: 0 }, unref(videoThumbOptions))), null, 16)) : createCommentVNode("v-if", true)
|
|
13
|
+
]),
|
|
14
|
+
_: 1
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export { _sfc_main as default };
|
|
@@ -23,6 +23,8 @@ function useCompoentLifycycle(props, emits) {
|
|
|
23
23
|
provide("filterOptions", computed(() => props.filterOptions));
|
|
24
24
|
provide("userInfo", computed(() => props.userInfo));
|
|
25
25
|
provide("mediaUseType", computed(() => props.mediaUseType));
|
|
26
|
+
provide("aiThumbList", computed(() => props.aiThumbList));
|
|
27
|
+
provide("videoThumbOptions", computed(() => props.videoThumbOptions));
|
|
26
28
|
return {
|
|
27
29
|
wrapProps,
|
|
28
30
|
close: () => emits("update:visible", false),
|
|
@@ -17,5 +17,6 @@ export default function useTabFilter(props: any): {
|
|
|
17
17
|
activeKey: import("vue").Ref<string | number | symbol>;
|
|
18
18
|
activeComponent: import("vue").ComputedRef<any>;
|
|
19
19
|
tabKeyList: import("vue").ComputedRef<TabListType[]>;
|
|
20
|
+
handelChangeTab: (tabKey: TabEnum) => void;
|
|
20
21
|
};
|
|
21
22
|
export {};
|
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
import { ref, computed } from "vue";
|
|
2
|
+
import _sfc_main$4 from "../components/List/ListVideo/index.js";
|
|
2
3
|
import _sfc_main from "../components/List/ListNormal/index.js";
|
|
3
4
|
import _sfc_main$2 from "../components/List/ListSystem/index.js";
|
|
4
5
|
import _sfc_main$1 from "../components/List/ListLocal/index.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"my",
|
|
8
|
-
"remind",
|
|
9
|
-
"local"
|
|
10
|
-
].join(",");
|
|
6
|
+
import _sfc_main$3 from "../components/List/ListAi/index.js";
|
|
7
|
+
const DEFAULT_TABS = ["all", "my", "remind", "local"];
|
|
11
8
|
const TAB_DICT = {
|
|
12
|
-
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: _sfc_main
|
|
13
|
-
["my"]: { title: "\u6211\u7684\u7D20\u6750", component: _sfc_main
|
|
14
|
-
["remind"]: { title: "\u63D0\u9192\u6211\u7684", component: _sfc_main
|
|
15
|
-
["local"]: { title: "\u672C\u5730\u7D20\u6750", component: _sfc_main$1
|
|
16
|
-
["system"]: { title: "\u5185\u7F6E\u7D20\u6750", component: _sfc_main$2
|
|
17
|
-
["ai"]: { title: "AI\u4F18\u9009", component: _sfc_main$
|
|
18
|
-
["video"]: { title: "\u89C6\u9891\u5C01\u9762", component: _sfc_main$
|
|
9
|
+
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: _sfc_main },
|
|
10
|
+
["my"]: { title: "\u6211\u7684\u7D20\u6750", component: _sfc_main },
|
|
11
|
+
["remind"]: { title: "\u63D0\u9192\u6211\u7684", component: _sfc_main },
|
|
12
|
+
["local"]: { title: "\u672C\u5730\u7D20\u6750", component: _sfc_main$1 },
|
|
13
|
+
["system"]: { title: "\u5185\u7F6E\u7D20\u6750", component: _sfc_main$2 },
|
|
14
|
+
["ai"]: { title: "AI\u4F18\u9009", component: _sfc_main$3 },
|
|
15
|
+
["video"]: { title: "\u89C6\u9891\u5C01\u9762", component: _sfc_main$4 }
|
|
19
16
|
};
|
|
20
17
|
function useTabFilter(props) {
|
|
21
18
|
const activeKey = ref("all");
|
|
22
19
|
const curTab = computed(() => TAB_DICT[activeKey.value]);
|
|
23
20
|
const tabKeyList = computed(() => {
|
|
24
|
-
const
|
|
21
|
+
const { mediaUseType, aiThumbList, videoThumbOptions } = props;
|
|
22
|
+
const keys = JSON.parse(JSON.stringify(DEFAULT_TABS));
|
|
23
|
+
if (mediaUseType > 0)
|
|
24
|
+
keys.unshift("system");
|
|
25
|
+
if (aiThumbList && aiThumbList.length)
|
|
26
|
+
keys.unshift("ai");
|
|
27
|
+
if (videoThumbOptions)
|
|
28
|
+
keys.unshift("video");
|
|
29
|
+
[activeKey.value] = keys;
|
|
25
30
|
return keys.map((key) => ({
|
|
26
31
|
key,
|
|
27
32
|
title: TAB_DICT[key].title
|
|
28
33
|
}));
|
|
29
34
|
});
|
|
30
35
|
const activeComponent = computed(() => curTab.value.component);
|
|
36
|
+
function handelChangeTab(tabKey) {
|
|
37
|
+
activeKey.value = tabKey;
|
|
38
|
+
}
|
|
31
39
|
return {
|
|
32
40
|
activeKey,
|
|
33
41
|
activeComponent,
|
|
34
|
-
tabKeyList
|
|
42
|
+
tabKeyList,
|
|
43
|
+
handelChangeTab
|
|
35
44
|
};
|
|
36
45
|
}
|
|
37
46
|
export { useTabFilter as default };
|
|
@@ -222,19 +222,6 @@
|
|
|
222
222
|
.resource-list .scen-module {
|
|
223
223
|
margin-bottom: 20px;
|
|
224
224
|
}
|
|
225
|
-
.resource-list .scen-module .title {
|
|
226
|
-
display: flex;
|
|
227
|
-
gap: 8px;
|
|
228
|
-
align-items: center;
|
|
229
|
-
margin-bottom: 20px;
|
|
230
|
-
font-weight: bold;
|
|
231
|
-
font-size: 16px;
|
|
232
|
-
}
|
|
233
|
-
.resource-list .scen-module .title .line {
|
|
234
|
-
width: 3px;
|
|
235
|
-
height: 16px;
|
|
236
|
-
background-color: #4886ff;
|
|
237
|
-
}
|
|
238
225
|
.resource-list .item-load-more {
|
|
239
226
|
display: flex;
|
|
240
227
|
flex-direction: column;
|
|
@@ -283,6 +270,19 @@
|
|
|
283
270
|
.resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
|
|
284
271
|
padding: 0;
|
|
285
272
|
}
|
|
273
|
+
.resource-list .title {
|
|
274
|
+
display: flex;
|
|
275
|
+
gap: 8px;
|
|
276
|
+
align-items: center;
|
|
277
|
+
margin-bottom: 20px;
|
|
278
|
+
font-weight: bold;
|
|
279
|
+
font-size: 16px;
|
|
280
|
+
}
|
|
281
|
+
.resource-list .title .line {
|
|
282
|
+
width: 3px;
|
|
283
|
+
height: 16px;
|
|
284
|
+
background-color: #4886ff;
|
|
285
|
+
}
|
|
286
286
|
.resource-select-modal-body {
|
|
287
287
|
height: 80vh;
|
|
288
288
|
padding: 0;
|
|
@@ -83,21 +83,6 @@
|
|
|
83
83
|
.resource-list {
|
|
84
84
|
.scen-module {
|
|
85
85
|
margin-bottom: 20px;
|
|
86
|
-
|
|
87
|
-
.title {
|
|
88
|
-
display: flex;
|
|
89
|
-
gap: 8px;
|
|
90
|
-
align-items: center;
|
|
91
|
-
margin-bottom: 20px;
|
|
92
|
-
font-weight: bold;
|
|
93
|
-
font-size: 16px;
|
|
94
|
-
|
|
95
|
-
.line {
|
|
96
|
-
width: 3px;
|
|
97
|
-
height: 16px;
|
|
98
|
-
background-color: #4886ff;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
86
|
}
|
|
102
87
|
|
|
103
88
|
.item-load-more {
|
|
@@ -161,3 +146,21 @@
|
|
|
161
146
|
}
|
|
162
147
|
}
|
|
163
148
|
}
|
|
149
|
+
|
|
150
|
+
// 二级列表的标题样式
|
|
151
|
+
.resource-list {
|
|
152
|
+
.title {
|
|
153
|
+
display: flex;
|
|
154
|
+
gap: 8px;
|
|
155
|
+
align-items: center;
|
|
156
|
+
margin-bottom: 20px;
|
|
157
|
+
font-weight: bold;
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
|
|
160
|
+
.line {
|
|
161
|
+
width: 3px;
|
|
162
|
+
height: 16px;
|
|
163
|
+
background-color: #4886ff;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -61,7 +61,8 @@ const _sfc_main = defineComponent({
|
|
|
61
61
|
}
|
|
62
62
|
watch(
|
|
63
63
|
() => curThumb.value,
|
|
64
|
-
() => emit("select", curThumb.value)
|
|
64
|
+
() => emit("select", curThumb.value),
|
|
65
|
+
{ immediate: true }
|
|
65
66
|
);
|
|
66
67
|
onMounted(() => {
|
|
67
68
|
getVideoThumbs(BASE_API, props.src, props.duration);
|
package/lib/index.css
CHANGED
|
@@ -4574,19 +4574,6 @@
|
|
|
4574
4574
|
.resource-list .scen-module {
|
|
4575
4575
|
margin-bottom: 20px;
|
|
4576
4576
|
}
|
|
4577
|
-
.resource-list .scen-module .title {
|
|
4578
|
-
display: flex;
|
|
4579
|
-
gap: 8px;
|
|
4580
|
-
align-items: center;
|
|
4581
|
-
margin-bottom: 20px;
|
|
4582
|
-
font-weight: bold;
|
|
4583
|
-
font-size: 16px;
|
|
4584
|
-
}
|
|
4585
|
-
.resource-list .scen-module .title .line {
|
|
4586
|
-
width: 3px;
|
|
4587
|
-
height: 16px;
|
|
4588
|
-
background-color: #4886ff;
|
|
4589
|
-
}
|
|
4590
4577
|
.resource-list .item-load-more {
|
|
4591
4578
|
display: flex;
|
|
4592
4579
|
flex-direction: column;
|
|
@@ -4635,6 +4622,19 @@
|
|
|
4635
4622
|
.resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
|
|
4636
4623
|
padding: 0;
|
|
4637
4624
|
}
|
|
4625
|
+
.resource-list .title {
|
|
4626
|
+
display: flex;
|
|
4627
|
+
gap: 8px;
|
|
4628
|
+
align-items: center;
|
|
4629
|
+
margin-bottom: 20px;
|
|
4630
|
+
font-weight: bold;
|
|
4631
|
+
font-size: 16px;
|
|
4632
|
+
}
|
|
4633
|
+
.resource-list .title .line {
|
|
4634
|
+
width: 3px;
|
|
4635
|
+
height: 16px;
|
|
4636
|
+
background-color: #4886ff;
|
|
4637
|
+
}
|
|
4638
4638
|
.resource-select-modal-body {
|
|
4639
4639
|
height: 80vh;
|
|
4640
4640
|
padding: 0;
|
|
@@ -23,28 +23,29 @@ const _sfc_main = vue.defineComponent({
|
|
|
23
23
|
__name: "component",
|
|
24
24
|
props: {
|
|
25
25
|
BASE_API: {},
|
|
26
|
-
visible: { type: Boolean },
|
|
27
26
|
userInfo: {},
|
|
28
|
-
|
|
27
|
+
visible: { type: Boolean },
|
|
29
28
|
wrap: {},
|
|
29
|
+
maxcount: {},
|
|
30
30
|
filterOptions: {},
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
mediaUseType: {},
|
|
32
|
+
aiThumbList: {},
|
|
33
|
+
videoThumbOptions: {}
|
|
33
34
|
},
|
|
34
35
|
emits: ["update:visible", "submit"],
|
|
35
36
|
setup(__props, { emit: __emit }) {
|
|
36
37
|
const props = __props;
|
|
37
38
|
const emits = __emit;
|
|
38
39
|
const { selected, selectedKeys, disableSelect, handleSelect, handleClear } = useResourceSelect.useResourceSelect(props);
|
|
39
|
-
const { activeKey, activeComponent, tabKeyList } = useTabFilter(props);
|
|
40
|
+
const { activeKey, activeComponent, tabKeyList, handelChangeTab } = useTabFilter(props);
|
|
40
41
|
const { wrapProps, close, submit } = useCompoLf(props, emits);
|
|
41
42
|
const handleOptions = (options, handleOptions2) => {
|
|
42
|
-
const { key,
|
|
43
|
+
const { key, item } = options;
|
|
43
44
|
if (key === "select-one") {
|
|
44
|
-
if (Array.isArray(
|
|
45
|
-
submit(
|
|
45
|
+
if (Array.isArray(item))
|
|
46
|
+
submit(item);
|
|
46
47
|
else
|
|
47
|
-
submit([
|
|
48
|
+
submit([item]);
|
|
48
49
|
close();
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
@@ -53,9 +54,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
53
54
|
function handleConfirm() {
|
|
54
55
|
submit(selected.value);
|
|
55
56
|
}
|
|
56
|
-
function handelChangeTab(tabKey) {
|
|
57
|
-
activeKey.value = tabKey;
|
|
58
|
-
}
|
|
59
57
|
return (_ctx, _cache) => {
|
|
60
58
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
61
59
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.wrap === "drawer" ? vue.unref(webVue.Drawer) : vue.unref(webVue.Modal)), vue.mergeProps({ visible: _ctx.visible }, vue.unref(wrapProps)), {
|
|
@@ -72,7 +70,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
72
70
|
vue.createCommentVNode(" \u5217\u8868\u5206\u53D1\u5668 "),
|
|
73
71
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(activeComponent)), {
|
|
74
72
|
"active-key": vue.unref(activeKey),
|
|
75
|
-
onChangeTab: handelChangeTab
|
|
73
|
+
onChangeTab: vue.unref(handelChangeTab)
|
|
76
74
|
}, {
|
|
77
75
|
item: vue.withCtx(({ item, onOptions }) => [
|
|
78
76
|
vue.createVNode(ListCardWrapper, {
|
|
@@ -109,7 +107,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
109
107
|
])) : vue.createCommentVNode("v-if", true)
|
|
110
108
|
]),
|
|
111
109
|
_: 1
|
|
112
|
-
}, 40, ["active-key"]))
|
|
110
|
+
}, 40, ["active-key", "onChangeTab"]))
|
|
113
111
|
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2), {
|
|
114
112
|
key: 1,
|
|
115
113
|
type: "empty",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var ListWraper = require("../ListWraper.js");
|
|
4
|
+
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
5
|
+
/* @__PURE__ */ vue.createElementVNode("div", { class: "line" }),
|
|
6
|
+
/* @__PURE__ */ vue.createTextVNode(" \u5C01\u9762\u56FE ")
|
|
7
|
+
], -1);
|
|
8
|
+
const _hoisted_2 = { class: "list-item-grid" };
|
|
9
|
+
const _sfc_main = vue.defineComponent({
|
|
10
|
+
__name: "index",
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const aiThumbList = vue.inject("aiThumbList");
|
|
13
|
+
const aiThumbListReal = vue.ref([]);
|
|
14
|
+
vue.watch(
|
|
15
|
+
() => aiThumbList == null ? void 0 : aiThumbList.value,
|
|
16
|
+
() => {
|
|
17
|
+
var _a;
|
|
18
|
+
aiThumbListReal.value = ((_a = aiThumbList == null ? void 0 : aiThumbList.value) == null ? void 0 : _a.map((item) => {
|
|
19
|
+
return {
|
|
20
|
+
url: item,
|
|
21
|
+
catalog: "image",
|
|
22
|
+
thumb: item,
|
|
23
|
+
alias: item
|
|
24
|
+
};
|
|
25
|
+
})) || [];
|
|
26
|
+
},
|
|
27
|
+
{ deep: true, immediate: true }
|
|
28
|
+
);
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return vue.openBlock(), vue.createBlock(ListWraper, {
|
|
31
|
+
isEmpty: !aiThumbListReal.value.length
|
|
32
|
+
}, {
|
|
33
|
+
"footer-extra": vue.withCtx(() => [
|
|
34
|
+
vue.renderSlot(_ctx.$slots, "footer-extra")
|
|
35
|
+
]),
|
|
36
|
+
default: vue.withCtx(() => [
|
|
37
|
+
aiThumbListReal.value.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
38
|
+
_hoisted_1,
|
|
39
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
40
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(aiThumbListReal.value, (item) => {
|
|
41
|
+
return vue.renderSlot(_ctx.$slots, "item", {
|
|
42
|
+
key: item.url,
|
|
43
|
+
item
|
|
44
|
+
});
|
|
45
|
+
}), 128))
|
|
46
|
+
])
|
|
47
|
+
], 64)) : vue.createCommentVNode("v-if", true)
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, ["isEmpty"]);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
module.exports = _sfc_main;
|
|
@@ -33,7 +33,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
33
33
|
});
|
|
34
34
|
return (_ctx, _cache) => {
|
|
35
35
|
return vue.openBlock(), vue.createBlock(ListWraper, {
|
|
36
|
-
list: vue.unref(list),
|
|
37
36
|
loading: vue.unref(loading),
|
|
38
37
|
"is-empty": vue.unref(list).length === 0
|
|
39
38
|
}, {
|
|
@@ -71,7 +70,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
71
70
|
])
|
|
72
71
|
]),
|
|
73
72
|
_: 3
|
|
74
|
-
}, 8, ["
|
|
73
|
+
}, 8, ["loading", "is-empty"]);
|
|
75
74
|
};
|
|
76
75
|
}
|
|
77
76
|
});
|
|
@@ -61,7 +61,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
61
61
|
});
|
|
62
62
|
return (_ctx, _cache) => {
|
|
63
63
|
return vue.openBlock(), vue.createBlock(ListWraper, {
|
|
64
|
-
list: _ctx.list,
|
|
65
64
|
loading: loading.value,
|
|
66
65
|
"is-empty": isEmpty.value
|
|
67
66
|
}, {
|
|
@@ -103,7 +102,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
103
102
|
}), 128))
|
|
104
103
|
]),
|
|
105
104
|
_: 3
|
|
106
|
-
}, 8, ["
|
|
105
|
+
}, 8, ["loading", "is-empty"]);
|
|
107
106
|
};
|
|
108
107
|
}
|
|
109
108
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var index = require("../../../../videoThumb/index.js");
|
|
4
|
+
var ListWraper = require("../ListWraper.js");
|
|
5
|
+
const _sfc_main = vue.defineComponent({
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const videoThumbOptions = vue.inject("videoThumbOptions");
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return vue.openBlock(), vue.createBlock(ListWraper, null, {
|
|
11
|
+
"footer-extra": vue.withCtx(() => []),
|
|
12
|
+
default: vue.withCtx(() => [
|
|
13
|
+
vue.unref(videoThumbOptions) ? (vue.openBlock(), vue.createBlock(vue.unref(index), vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(videoThumbOptions))), null, 16)) : vue.createCommentVNode("v-if", true)
|
|
14
|
+
]),
|
|
15
|
+
_: 1
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
module.exports = _sfc_main;
|
|
@@ -24,6 +24,8 @@ function useCompoentLifycycle(props, emits) {
|
|
|
24
24
|
vue.provide("filterOptions", vue.computed(() => props.filterOptions));
|
|
25
25
|
vue.provide("userInfo", vue.computed(() => props.userInfo));
|
|
26
26
|
vue.provide("mediaUseType", vue.computed(() => props.mediaUseType));
|
|
27
|
+
vue.provide("aiThumbList", vue.computed(() => props.aiThumbList));
|
|
28
|
+
vue.provide("videoThumbOptions", vue.computed(() => props.videoThumbOptions));
|
|
27
29
|
return {
|
|
28
30
|
wrapProps,
|
|
29
31
|
close: () => emits("update:visible", false),
|
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
|
+
var index$4 = require("../components/List/ListVideo/index.js");
|
|
3
4
|
var index = require("../components/List/ListNormal/index.js");
|
|
4
5
|
var index$2 = require("../components/List/ListSystem/index.js");
|
|
5
6
|
var index$1 = require("../components/List/ListLocal/index.js");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"my",
|
|
9
|
-
"remind",
|
|
10
|
-
"local"
|
|
11
|
-
].join(",");
|
|
7
|
+
var index$3 = require("../components/List/ListAi/index.js");
|
|
8
|
+
const DEFAULT_TABS = ["all", "my", "remind", "local"];
|
|
12
9
|
const TAB_DICT = {
|
|
13
|
-
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: index
|
|
14
|
-
["my"]: { title: "\u6211\u7684\u7D20\u6750", component: index
|
|
15
|
-
["remind"]: { title: "\u63D0\u9192\u6211\u7684", component: index
|
|
16
|
-
["local"]: { title: "\u672C\u5730\u7D20\u6750", component: index$1
|
|
17
|
-
["system"]: { title: "\u5185\u7F6E\u7D20\u6750", component: index$2
|
|
18
|
-
["ai"]: { title: "AI\u4F18\u9009", component: index$
|
|
19
|
-
["video"]: { title: "\u89C6\u9891\u5C01\u9762", component: index$
|
|
10
|
+
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: index },
|
|
11
|
+
["my"]: { title: "\u6211\u7684\u7D20\u6750", component: index },
|
|
12
|
+
["remind"]: { title: "\u63D0\u9192\u6211\u7684", component: index },
|
|
13
|
+
["local"]: { title: "\u672C\u5730\u7D20\u6750", component: index$1 },
|
|
14
|
+
["system"]: { title: "\u5185\u7F6E\u7D20\u6750", component: index$2 },
|
|
15
|
+
["ai"]: { title: "AI\u4F18\u9009", component: index$3 },
|
|
16
|
+
["video"]: { title: "\u89C6\u9891\u5C01\u9762", component: index$4 }
|
|
20
17
|
};
|
|
21
18
|
function useTabFilter(props) {
|
|
22
19
|
const activeKey = vue.ref("all");
|
|
23
20
|
const curTab = vue.computed(() => TAB_DICT[activeKey.value]);
|
|
24
21
|
const tabKeyList = vue.computed(() => {
|
|
25
|
-
const
|
|
22
|
+
const { mediaUseType, aiThumbList, videoThumbOptions } = props;
|
|
23
|
+
const keys = JSON.parse(JSON.stringify(DEFAULT_TABS));
|
|
24
|
+
if (mediaUseType > 0)
|
|
25
|
+
keys.unshift("system");
|
|
26
|
+
if (aiThumbList && aiThumbList.length)
|
|
27
|
+
keys.unshift("ai");
|
|
28
|
+
if (videoThumbOptions)
|
|
29
|
+
keys.unshift("video");
|
|
30
|
+
[activeKey.value] = keys;
|
|
26
31
|
return keys.map((key) => ({
|
|
27
32
|
key,
|
|
28
33
|
title: TAB_DICT[key].title
|
|
29
34
|
}));
|
|
30
35
|
});
|
|
31
36
|
const activeComponent = vue.computed(() => curTab.value.component);
|
|
37
|
+
function handelChangeTab(tabKey) {
|
|
38
|
+
activeKey.value = tabKey;
|
|
39
|
+
}
|
|
32
40
|
return {
|
|
33
41
|
activeKey,
|
|
34
42
|
activeComponent,
|
|
35
|
-
tabKeyList
|
|
43
|
+
tabKeyList,
|
|
44
|
+
handelChangeTab
|
|
36
45
|
};
|
|
37
46
|
}
|
|
38
47
|
module.exports = useTabFilter;
|