@cmstops/pro-compo 0.3.44 → 0.3.46
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 +23 -15
- package/dist/index.min.css +1 -1
- package/es/appCenter/component.js +30 -1
- package/es/appCenter/script/api.js +8 -1
- package/es/appCenter/style/index.css +17 -14
- package/es/appCenter/style/index.less +33 -15
- package/es/docHistory/component.js +1 -0
- package/es/docPreview/component.js +46 -40
- package/es/hooks/useAttachement.js +2 -0
- package/es/hooks/useLocalStorage.js +31 -0
- package/es/hooks/useUpload.js +6 -2
- package/es/index.css +23 -15
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +3 -3
- package/es/selectResourceModal/component.js +188 -43
- package/es/selectResourceModal/components/ListFilter/index.js +13 -1
- package/es/selectResourceModal/components/ListSelected/index.js +2 -0
- package/es/selectResourceModal/components/ListTabs/index.js +62 -0
- package/es/selectResourceModal/scripts/useResourceSelect.js +25 -0
- package/es/selectResourceModal/style/index.css +6 -1
- package/es/selectResourceModal/style/listSelected.less +7 -1
- package/es/utils/typeMap.js +1 -2
- package/lib/appCenter/component.js +29 -0
- package/lib/appCenter/script/api.js +8 -0
- package/lib/appCenter/style/index.css +17 -14
- package/lib/appCenter/style/index.less +33 -15
- package/lib/docHistory/component.js +1 -0
- package/lib/docPreview/component.js +45 -39
- package/lib/hooks/useAttachement.js +2 -0
- package/lib/hooks/useLocalStorage.js +34 -0
- package/lib/hooks/useUpload.js +5 -1
- package/lib/index.css +23 -15
- package/lib/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +2 -2
- package/lib/selectResourceModal/component.js +186 -41
- package/lib/selectResourceModal/components/ListFilter/index.js +13 -1
- package/lib/selectResourceModal/components/ListSelected/index.js +2 -0
- package/lib/selectResourceModal/components/ListTabs/index.js +63 -0
- package/lib/selectResourceModal/scripts/useResourceSelect.js +27 -0
- package/lib/selectResourceModal/style/index.css +6 -1
- package/lib/selectResourceModal/style/listSelected.less +7 -1
- package/lib/utils/typeMap.js +1 -2
- package/package.json +1 -1
- package/es/appCenter/component.d.ts +0 -0
- package/es/appCenter/index.d.ts +0 -2
- package/es/appCenter/script/api.d.ts +0 -10
- package/es/appCenter/script/apps.d.ts +0 -14
- package/es/appCenter/script/permissionMap.d.ts +0 -6
- package/es/appCenter/script/routeMap.d.ts +0 -4
- package/es/appCenter/style/index.d.ts +0 -1
- package/es/baseFilter/component.d.ts +0 -0
- package/es/baseFilter/components/FilterGroup.d.ts +0 -0
- package/es/baseFilter/components/filterItem.d.ts +0 -0
- package/es/baseFilter/index.d.ts +0 -2
- package/es/baseFilter/style/index.d.ts +0 -1
- package/es/baseFilter/useCalcWidth.d.ts +0 -16
- package/es/colorPalette/component.d.ts +0 -0
- package/es/colorPalette/components/colorPicker.d.ts +0 -0
- package/es/colorPalette/index.d.ts +0 -2
- package/es/colorPalette/style/index.d.ts +0 -1
- package/es/components.d.ts +0 -5
- package/es/config.d.ts +0 -4
- package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
- package/es/contentDetailList/component.d.ts +0 -0
- package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/index.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
- package/es/contentDetailList/components/Doc/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
- package/es/contentDetailList/index.d.ts +0 -2
- package/es/contentDetailList/script/api.d.ts +0 -6
- package/es/contentDetailList/style/index.d.ts +0 -1
- package/es/contentModal/component.d.ts +0 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
- package/es/contentModal/components/storeBox/index.d.ts +0 -0
- package/es/contentModal/index.d.ts +0 -2
- package/es/contentModal/script/api.d.ts +0 -14
- package/es/contentModal/style/index.d.ts +0 -1
- package/es/dataTags/component.d.ts +0 -0
- package/es/dataTags/index.d.ts +0 -2
- package/es/dataTags/style/index.d.ts +0 -1
- package/es/docHistory/component.d.ts +0 -0
- package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
- package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
- package/es/docHistory/index.d.ts +0 -2
- package/es/docHistory/scripts/diff.d.ts +0 -1
- package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
- package/es/docHistory/style/index.d.ts +0 -1
- package/es/docPreview/component.d.ts +0 -0
- package/es/docPreview/components/PreviewIframe.d.ts +0 -0
- package/es/docPreview/index.d.ts +0 -2
- package/es/docPreview/scripts/api.d.ts +0 -1
- package/es/docPreview/scripts/hook.d.ts +0 -20
- package/es/docPreview/style/index.d.ts +0 -1
- package/es/editMetaInfo/component.d.ts +0 -0
- package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
- package/es/editMetaInfo/index.d.ts +0 -2
- package/es/editMetaInfo/script/api.d.ts +0 -6
- package/es/editMetaInfo/script/restaurants.d.ts +0 -4
- package/es/editMetaInfo/style/index.d.ts +0 -1
- package/es/emptyData/component.d.ts +0 -0
- package/es/emptyData/index.d.ts +0 -2
- package/es/emptyData/style/index.d.ts +0 -1
- package/es/emptyData/svg/add.d.ts +0 -0
- package/es/hooks/assets.d.ts +0 -1
- package/es/hooks/batch.d.ts +0 -8
- package/es/hooks/dialogVisible.d.ts +0 -8
- package/es/hooks/source.d.ts +0 -9
- package/es/hooks/toggle.d.ts +0 -6
- package/es/hooks/useAttachement.d.ts +0 -25
- package/es/hooks/useLocalStorage.d.ts +0 -8
- package/es/hooks/useMediaContext.d.ts +0 -12
- package/es/hooks/usePopper.d.ts +0 -8
- package/es/hooks/useSelection.d.ts +0 -23
- package/es/hooks/useUpload.d.ts +0 -16
- package/es/hooks/user.d.ts +0 -9
- package/es/imageCrop/component.d.ts +0 -0
- package/es/imageCrop/index.d.ts +0 -2
- package/es/imageCrop/script/api.d.ts +0 -1
- package/es/imageCrop/style/index.d.ts +0 -1
- package/es/index.d.ts +0 -29
- package/es/mediaFilter/component.d.ts +0 -0
- package/es/mediaFilter/components/DocFilter.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
- package/es/mediaFilter/components/FilterItem.d.ts +0 -0
- package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
- package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
- package/es/mediaFilter/index.d.ts +0 -3
- package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
- package/es/mediaFilter/script/types.d.ts +0 -16
- package/es/mediaFilter/style/index.d.ts +0 -1
- package/es/mediaView/component.d.ts +0 -0
- package/es/mediaView/index.d.ts +0 -2
- package/es/mediaView/style/index.d.ts +0 -1
- package/es/messageBox/component.d.ts +0 -0
- package/es/messageBox/index.d.ts +0 -2
- package/es/messageBox/list.d.ts +0 -0
- package/es/messageBox/script/api.d.ts +0 -6
- package/es/messageBox/style/index.d.ts +0 -1
- package/es/previousVersion/component.d.ts +0 -0
- package/es/previousVersion/index.d.ts +0 -2
- package/es/previousVersion/script/api.d.ts +0 -15
- package/es/previousVersion/script/tool.d.ts +0 -6
- package/es/previousVersion/style/index.d.ts +0 -1
- package/es/resourceGridList/component.d.ts +0 -0
- package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceGridList/index.d.ts +0 -2
- package/es/resourceGridList/style/index.d.ts +0 -1
- package/es/resourceModal/component.d.ts +0 -0
- package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
- package/es/resourceModal/index.d.ts +0 -2
- package/es/resourceModal/script/api.d.ts +0 -25
- package/es/resourceModal/script/mediaSelection.d.ts +0 -14
- package/es/resourceModal/style/index.d.ts +0 -1
- package/es/selectAvatarList/component.d.ts +0 -0
- package/es/selectAvatarList/index.d.ts +0 -2
- package/es/selectAvatarList/style/index.d.ts +0 -1
- package/es/selectGategory/component.d.ts +0 -0
- package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
- package/es/selectGategory/index.d.ts +0 -2
- package/es/selectGategory/script/api.d.ts +0 -6
- package/es/selectGategory/style/index.d.ts +0 -1
- package/es/selectResourceModal/component.d.ts +0 -0
- package/es/selectResourceModal/components/ListCardWrapper/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListContent/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/components/Upload.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListFilter/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListFilter/scripts/api.d.ts +0 -1
- package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
- package/es/selectResourceModal/components/Main/index.d.ts +0 -0
- package/es/selectResourceModal/components/Main/index.js +0 -215
- package/es/selectResourceModal/index.d.ts +0 -2
- package/es/selectResourceModal/style/index.d.ts +0 -1
- package/es/selectThumb/component.d.ts +0 -0
- package/es/selectThumb/components/card.d.ts +0 -0
- package/es/selectThumb/components/colorPalette.d.ts +0 -0
- package/es/selectThumb/components/colorPicker.d.ts +0 -0
- package/es/selectThumb/index.d.ts +0 -2
- package/es/selectThumb/style/index.d.ts +0 -1
- package/es/thumbCard/component.d.ts +0 -0
- package/es/thumbCard/index.d.ts +0 -2
- package/es/thumbCard/style/index.d.ts +0 -1
- package/es/typeIcons/component.d.ts +0 -0
- package/es/typeIcons/index.d.ts +0 -2
- package/es/typeIcons/style/index.d.ts +0 -1
- package/es/uploadBefore/component.d.ts +0 -0
- package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
- package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
- package/es/uploadBefore/index.d.ts +0 -2
- package/es/uploadBefore/script/api.d.ts +0 -16
- package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
- package/es/uploadBefore/script/fileUpload.d.ts +0 -7
- package/es/uploadBefore/script/uploadHooks.d.ts +0 -55
- package/es/uploadBefore/style/index.d.ts +0 -1
- package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
- package/es/uploadStep/component.d.ts +0 -0
- package/es/uploadStep/index.d.ts +0 -2
- package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
- package/es/uploadStep/style/index.d.ts +0 -1
- package/es/userAvater/component.d.ts +0 -0
- package/es/userAvater/index.d.ts +0 -2
- package/es/userAvater/script/api.d.ts +0 -8
- package/es/userAvater/style/index.d.ts +0 -1
- package/es/userDirector/component.d.ts +0 -0
- package/es/userDirector/components/userTree.d.ts +0 -0
- package/es/userDirector/index.d.ts +0 -2
- package/es/userDirector/script/api.d.ts +0 -10
- package/es/userDirector/style/index.d.ts +0 -1
- package/es/utils/auth.d.ts +0 -5
- package/es/utils/date.d.ts +0 -3
- package/es/utils/doc.d.ts +0 -76
- package/es/utils/filter.d.ts +0 -9
- package/es/utils/index.d.ts +0 -17
- package/es/utils/request.d.ts +0 -9
- package/es/utils/transcodeMedia.d.ts +0 -13
- package/es/utils/tusUpload.d.ts +0 -16
- package/es/utils/typeMap.d.ts +0 -186
- package/es/utils/uploadCatalog.d.ts +0 -1
- package/es/videoThumb/component.d.ts +0 -0
- package/es/videoThumb/index.d.ts +0 -2
- package/es/videoThumb/scripts/api.d.ts +0 -9
- package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -7
- package/es/videoThumb/style/index.d.ts +0 -1
- package/lib/selectResourceModal/components/Main/index.js +0 -216
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, createBlock, unref, withCtx,
|
|
2
|
-
import { Drawer, Modal } from "@arco-design/web-vue";
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent, computed, ref, provide, watch, openBlock, createElementBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createElementVNode, createCommentVNode, createVNode, withDirectives, vShow, isRef, createTextVNode } from "vue";
|
|
2
|
+
import { Drawer, Modal, Scrollbar, Pagination, Button } from "@arco-design/web-vue";
|
|
3
|
+
import emptyData from "../emptyData/index.js";
|
|
4
|
+
import _sfc_main$1 from "./components/ListTabs/index.js";
|
|
5
|
+
import _sfc_main$2 from "./components/ListFilter/index.js";
|
|
6
|
+
import _sfc_main$3 from "./components/ListContent/index.js";
|
|
7
|
+
import _sfc_main$5 from "./components/ListSelected/index.js";
|
|
8
|
+
import _sfc_main$4 from "./components/ListContentLocal/index.js";
|
|
9
|
+
import useAttachement from "../hooks/useAttachement.js";
|
|
10
|
+
import { DEFAULT_BASE_API } from "../config.js";
|
|
11
|
+
import { useResourceSelect } from "./scripts/useResourceSelect.js";
|
|
4
12
|
const _hoisted_1 = { class: "resource-select-wrap" };
|
|
13
|
+
const _hoisted_2 = { class: "resource-select-main" };
|
|
14
|
+
const _hoisted_3 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "resource-select-container"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_4 = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "resource-select-filter"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_5 = { class: "resource-select-content" };
|
|
23
|
+
const _hoisted_6 = { class: "resource-select-footer" };
|
|
24
|
+
const _hoisted_7 = { class: "footer-left" };
|
|
25
|
+
const _hoisted_8 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "footer-right"
|
|
28
|
+
};
|
|
5
29
|
const _sfc_main = defineComponent({
|
|
6
30
|
...{ name: "selectResourceModal" },
|
|
7
31
|
__name: "component",
|
|
@@ -17,55 +41,176 @@ const _sfc_main = defineComponent({
|
|
|
17
41
|
setup(__props, { emit: __emit }) {
|
|
18
42
|
const props = __props;
|
|
19
43
|
const emits = __emit;
|
|
20
|
-
const
|
|
21
|
-
const
|
|
44
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
45
|
+
const wrapProps = computed(() => {
|
|
46
|
+
if (props.wrap === "drawer") {
|
|
47
|
+
return {
|
|
48
|
+
class: "resource-select-drawer",
|
|
49
|
+
header: false,
|
|
50
|
+
width: "1024px",
|
|
51
|
+
footer: false
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
bodyClass: "resource-select-modal-body",
|
|
56
|
+
width: "986px",
|
|
57
|
+
closable: false,
|
|
58
|
+
hideTitle: false,
|
|
59
|
+
footer: false
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
const activeKey = ref("all");
|
|
63
|
+
provide("userInfo", computed(() => props.userInfo));
|
|
64
|
+
provide("baseAPI", BASE_API);
|
|
65
|
+
const {
|
|
66
|
+
list,
|
|
67
|
+
total,
|
|
68
|
+
limit,
|
|
69
|
+
pageIdx,
|
|
70
|
+
loading,
|
|
71
|
+
changeKey,
|
|
72
|
+
changeFilter,
|
|
73
|
+
changePage,
|
|
74
|
+
changeSize
|
|
75
|
+
} = useAttachement({ key: "all", BASE_API });
|
|
76
|
+
const {
|
|
77
|
+
selected,
|
|
78
|
+
selectedKeys,
|
|
79
|
+
disableSelect,
|
|
80
|
+
handleSelect,
|
|
81
|
+
handleClear
|
|
82
|
+
} = useResourceSelect(props);
|
|
83
|
+
function handleClose() {
|
|
84
|
+
handleClear();
|
|
22
85
|
emits("update:visible", false);
|
|
23
|
-
}
|
|
86
|
+
}
|
|
24
87
|
const handleSubmit = (data) => {
|
|
25
88
|
emits("submit", JSON.parse(JSON.stringify(data)));
|
|
26
89
|
};
|
|
90
|
+
const handleSelectOne = (params) => {
|
|
91
|
+
if (Array.isArray(params))
|
|
92
|
+
handleSubmit(params);
|
|
93
|
+
else
|
|
94
|
+
handleSubmit([params]);
|
|
95
|
+
handleClose();
|
|
96
|
+
};
|
|
97
|
+
function handleConfirm() {
|
|
98
|
+
handleSelectOne(selected.value);
|
|
99
|
+
}
|
|
100
|
+
function handleToUpload() {
|
|
101
|
+
changeKey("local");
|
|
102
|
+
activeKey.value = "local";
|
|
103
|
+
}
|
|
104
|
+
watch(
|
|
105
|
+
() => props.visible,
|
|
106
|
+
() => {
|
|
107
|
+
if (props.visible) {
|
|
108
|
+
activeKey.value = "all";
|
|
109
|
+
changeKey("all");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
);
|
|
27
113
|
return (_ctx, _cache) => {
|
|
28
114
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
|
-
|
|
30
|
-
key: 0,
|
|
31
|
-
visible: _ctx.visible,
|
|
32
|
-
width: "1024px",
|
|
33
|
-
header: false,
|
|
34
|
-
footer: false,
|
|
35
|
-
class: "resource-select-drawer"
|
|
36
|
-
}, {
|
|
37
|
-
default: withCtx(() => [
|
|
38
|
-
createVNode(_sfc_main$1, {
|
|
39
|
-
BASE_API: _ctx.BASE_API,
|
|
40
|
-
userInfo: _ctx.userInfo,
|
|
41
|
-
maxcount: _ctx.maxcount,
|
|
42
|
-
filterOptions: _ctx.filterOptions,
|
|
43
|
-
onClose: handleClose,
|
|
44
|
-
onSubmit: handleSubmit
|
|
45
|
-
}, null, 8, ["BASE_API", "userInfo", "maxcount", "filterOptions"])
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
}, 8, ["visible"])) : wrapMode.value === "modal" ? (openBlock(), createBlock(unref(Modal), {
|
|
49
|
-
key: 1,
|
|
50
|
-
visible: _ctx.visible,
|
|
51
|
-
width: "986px",
|
|
52
|
-
"body-class": "resource-select-modal-body",
|
|
53
|
-
"hide-title": false,
|
|
54
|
-
closable: false,
|
|
55
|
-
footer: false
|
|
56
|
-
}, {
|
|
115
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.wrap === "drawer" ? unref(Drawer) : unref(Modal)), mergeProps({ visible: _ctx.visible }, wrapProps.value), {
|
|
57
116
|
default: withCtx(() => [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
117
|
+
createElementVNode("div", _hoisted_2, [
|
|
118
|
+
_ctx.userInfo ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
119
|
+
createCommentVNode(" \u5934\u90E8 "),
|
|
120
|
+
createVNode(_sfc_main$1, {
|
|
121
|
+
"model-value": activeKey.value,
|
|
122
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
123
|
+
onChange: unref(changeKey),
|
|
124
|
+
onClose: handleClose
|
|
125
|
+
}, null, 8, ["model-value", "onChange"]),
|
|
126
|
+
createCommentVNode(" \u7B5B\u9009 "),
|
|
127
|
+
activeKey.value !== "local" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
128
|
+
createVNode(_sfc_main$2, {
|
|
129
|
+
"disable-upload-by": !["all", "remind"].includes(activeKey.value),
|
|
130
|
+
filterOptions: _ctx.filterOptions,
|
|
131
|
+
onChange: unref(changeFilter),
|
|
132
|
+
onUpload: handleToUpload
|
|
133
|
+
}, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
|
|
134
|
+
])) : createCommentVNode("v-if", true),
|
|
135
|
+
createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
|
|
136
|
+
createElementVNode("div", _hoisted_5, [
|
|
137
|
+
createVNode(unref(Scrollbar), {
|
|
138
|
+
"outer-style": { height: "100%" },
|
|
139
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
140
|
+
}, {
|
|
141
|
+
default: withCtx(() => [
|
|
142
|
+
withDirectives(createVNode(_sfc_main$3, {
|
|
143
|
+
loading: unref(loading),
|
|
144
|
+
list: unref(list),
|
|
145
|
+
disable: unref(disableSelect),
|
|
146
|
+
"select-keys": unref(selectedKeys),
|
|
147
|
+
onSelect: unref(handleSelect),
|
|
148
|
+
onSelectOne: handleSelectOne
|
|
149
|
+
}, null, 8, ["loading", "list", "disable", "select-keys", "onSelect"]), [
|
|
150
|
+
[vShow, activeKey.value !== "local"]
|
|
151
|
+
]),
|
|
152
|
+
withDirectives(createVNode(_sfc_main$4, {
|
|
153
|
+
disable: unref(disableSelect),
|
|
154
|
+
"select-keys": unref(selectedKeys),
|
|
155
|
+
onSelect: unref(handleSelect),
|
|
156
|
+
onSelectOne: handleSelectOne
|
|
157
|
+
}, null, 8, ["disable", "select-keys", "onSelect"]), [
|
|
158
|
+
[vShow, activeKey.value === "local"]
|
|
159
|
+
])
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
})
|
|
163
|
+
]),
|
|
164
|
+
createCommentVNode(" \u5E95\u90E8 "),
|
|
165
|
+
createElementVNode("div", _hoisted_6, [
|
|
166
|
+
createElementVNode("div", _hoisted_7, [
|
|
167
|
+
activeKey.value !== "local" ? (openBlock(), createBlock(unref(Pagination), {
|
|
168
|
+
key: 0,
|
|
169
|
+
current: unref(pageIdx),
|
|
170
|
+
"onUpdate:current": _cache[1] || (_cache[1] = ($event) => isRef(pageIdx) ? pageIdx.value = $event : null),
|
|
171
|
+
total: unref(total),
|
|
172
|
+
"page-size": unref(limit),
|
|
173
|
+
"show-total": "",
|
|
174
|
+
"show-page-size": "",
|
|
175
|
+
"base-size": 3,
|
|
176
|
+
"buffer-size": 1,
|
|
177
|
+
onChange: _cache[2] || (_cache[2] = (e) => unref(changePage)((e - 1) * unref(limit))),
|
|
178
|
+
onPageSizeChange: unref(changeSize)
|
|
179
|
+
}, null, 8, ["current", "total", "page-size", "onPageSizeChange"])) : createCommentVNode("v-if", true)
|
|
180
|
+
]),
|
|
181
|
+
unref(selected).length ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
182
|
+
createVNode(_sfc_main$5, {
|
|
183
|
+
maxcount: _ctx.maxcount,
|
|
184
|
+
selected: unref(selected),
|
|
185
|
+
onRemove: unref(handleSelect),
|
|
186
|
+
onClear: unref(handleClear)
|
|
187
|
+
}, null, 8, ["maxcount", "selected", "onRemove", "onClear"]),
|
|
188
|
+
createVNode(unref(Button), { onClick: handleClose }, {
|
|
189
|
+
default: withCtx(() => [
|
|
190
|
+
createTextVNode("\u53D6\u6D88")
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}),
|
|
194
|
+
createVNode(unref(Button), {
|
|
195
|
+
type: "primary",
|
|
196
|
+
onClick: handleConfirm
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
createTextVNode("\u786E\u5B9A")
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
})
|
|
203
|
+
])) : createCommentVNode("v-if", true)
|
|
204
|
+
])
|
|
205
|
+
])) : (openBlock(), createBlock(unref(emptyData), {
|
|
206
|
+
key: 1,
|
|
207
|
+
type: "empty",
|
|
208
|
+
customTip: "\u6682\u65E0\u6743\u9650"
|
|
209
|
+
}))
|
|
210
|
+
])
|
|
66
211
|
]),
|
|
67
212
|
_: 1
|
|
68
|
-
},
|
|
213
|
+
}, 16, ["visible"]))
|
|
69
214
|
]);
|
|
70
215
|
};
|
|
71
216
|
}
|
|
@@ -107,14 +107,26 @@ const _sfc_main = defineComponent({
|
|
|
107
107
|
if (!result[key])
|
|
108
108
|
delete result[key];
|
|
109
109
|
});
|
|
110
|
+
if (!result.catalog)
|
|
111
|
+
result.catalog = "image,video,audio";
|
|
110
112
|
emits("change", result);
|
|
111
113
|
},
|
|
112
114
|
{ deep: true, immediate: true }
|
|
113
115
|
);
|
|
116
|
+
watch(
|
|
117
|
+
() => props.filterOptions,
|
|
118
|
+
() => {
|
|
119
|
+
var _a;
|
|
120
|
+
if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
|
|
121
|
+
filter.value.catalog = props.filterOptions.mediaType;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{ immediate: true }
|
|
125
|
+
);
|
|
114
126
|
onMounted(() => {
|
|
115
127
|
var _a;
|
|
116
128
|
load();
|
|
117
|
-
if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
|
|
129
|
+
if (((_a = props.filterOptions) == null ? void 0 : _a.mediaType) && !props.filterOptions.mediaTypeStrict) {
|
|
118
130
|
filter.value.catalog = props.filterOptions.mediaType;
|
|
119
131
|
originFilter.catalog = props.filterOptions.mediaType;
|
|
120
132
|
}
|
|
@@ -58,12 +58,14 @@ const _sfc_main = defineComponent({
|
|
|
58
58
|
createElementVNode("div", _hoisted_6, [
|
|
59
59
|
["image", "video"].includes(item.catalog) ? (openBlock(), createBlock(unref(Image), {
|
|
60
60
|
key: 0,
|
|
61
|
+
preview: false,
|
|
61
62
|
width: "100%",
|
|
62
63
|
height: "100%",
|
|
63
64
|
src: item.thumb || item.url
|
|
64
65
|
}, null, 8, ["src"])) : createCommentVNode("v-if", true),
|
|
65
66
|
["audio"].includes(item.catalog) ? (openBlock(), createBlock(unref(Image), {
|
|
66
67
|
key: 1,
|
|
68
|
+
preview: false,
|
|
67
69
|
width: "100%",
|
|
68
70
|
height: "100%",
|
|
69
71
|
fit: "cover",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx } from "vue";
|
|
2
|
+
import { IconClose } from "@arco-design/web-vue/es/icon";
|
|
3
|
+
import { Tabs, Button, TabPane } from "@arco-design/web-vue";
|
|
4
|
+
const _hoisted_1 = { class: "resource-select-header" };
|
|
5
|
+
const _sfc_main = defineComponent({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:model-value", "change", "close"],
|
|
11
|
+
setup(__props, { emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emits = __emit;
|
|
14
|
+
const activeKey = computed({
|
|
15
|
+
get: () => props.modelValue,
|
|
16
|
+
set: (value) => emits("update:model-value", value)
|
|
17
|
+
});
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
20
|
+
createVNode(unref(Tabs), {
|
|
21
|
+
"active-key": activeKey.value,
|
|
22
|
+
"onUpdate:activeKey": _cache[1] || (_cache[1] = ($event) => activeKey.value = $event),
|
|
23
|
+
onChange: _cache[2] || (_cache[2] = (e) => emits("change", e))
|
|
24
|
+
}, {
|
|
25
|
+
extra: withCtx(() => [
|
|
26
|
+
createVNode(unref(Button), {
|
|
27
|
+
type: "text",
|
|
28
|
+
shape: "round",
|
|
29
|
+
style: { "color": "black", "transform": "translateX(-8px)" },
|
|
30
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emits("close"))
|
|
31
|
+
}, {
|
|
32
|
+
icon: withCtx(() => [
|
|
33
|
+
createVNode(unref(IconClose))
|
|
34
|
+
]),
|
|
35
|
+
_: 1
|
|
36
|
+
})
|
|
37
|
+
]),
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
createVNode(unref(TabPane), {
|
|
40
|
+
key: "all",
|
|
41
|
+
title: "\u5168\u90E8\u7D20\u6750"
|
|
42
|
+
}),
|
|
43
|
+
createVNode(unref(TabPane), {
|
|
44
|
+
key: "my",
|
|
45
|
+
title: "\u6211\u7684\u7D20\u6750"
|
|
46
|
+
}),
|
|
47
|
+
createVNode(unref(TabPane), {
|
|
48
|
+
key: "remind",
|
|
49
|
+
title: "\u63D0\u9192\u6211\u7684"
|
|
50
|
+
}),
|
|
51
|
+
createVNode(unref(TabPane), {
|
|
52
|
+
key: "local",
|
|
53
|
+
title: "\u672C\u5730\u7D20\u6750"
|
|
54
|
+
})
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
}, 8, ["active-key"])
|
|
58
|
+
]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
function useResourceSelect(props) {
|
|
3
|
+
const selected = ref([]);
|
|
4
|
+
const selectedKeys = computed(() => selected.value.map((item) => item.id));
|
|
5
|
+
const disableSelect = computed(() => props.maxcount && selected.value.length >= props.maxcount);
|
|
6
|
+
function handleSelect(params) {
|
|
7
|
+
const { id } = params;
|
|
8
|
+
const index = selected.value.findIndex((item) => item.id === id);
|
|
9
|
+
if (index > -1)
|
|
10
|
+
selected.value.splice(index, 1);
|
|
11
|
+
else
|
|
12
|
+
selected.value.push(params);
|
|
13
|
+
}
|
|
14
|
+
function handleClear() {
|
|
15
|
+
selected.value = [];
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
selected,
|
|
19
|
+
selectedKeys,
|
|
20
|
+
disableSelect,
|
|
21
|
+
handleSelect,
|
|
22
|
+
handleClear
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export { useResourceSelect };
|
|
@@ -61,7 +61,12 @@
|
|
|
61
61
|
overflow-y: scroll;
|
|
62
62
|
}
|
|
63
63
|
.list-panel-wrapper .list-selected-record::-webkit-scrollbar {
|
|
64
|
-
|
|
64
|
+
width: 6px;
|
|
65
|
+
}
|
|
66
|
+
.list-panel-wrapper .list-selected-record::-webkit-scrollbar-thumb {
|
|
67
|
+
background-color: #ececec;
|
|
68
|
+
-webkit-border-radius: 6px;
|
|
69
|
+
opacity: 0.5;
|
|
65
70
|
}
|
|
66
71
|
.list-panel-wrapper .list-selected-record .list-selected-item {
|
|
67
72
|
display: flex;
|
package/es/utils/typeMap.js
CHANGED
|
@@ -170,8 +170,7 @@ const RESOURCE_SOURCE_DICT = {
|
|
|
170
170
|
const RESOURCE_CATALOG_DICT = {
|
|
171
171
|
image: "\u56FE\u7247",
|
|
172
172
|
video: "\u89C6\u9891",
|
|
173
|
-
audio: "\u97F3\u9891"
|
|
174
|
-
other: "\u5176\u4ED6"
|
|
173
|
+
audio: "\u97F3\u9891"
|
|
175
174
|
};
|
|
176
175
|
const RESOURCE_SOURCE_OPTIONS = object2LabelList(RESOURCE_SOURCE_DICT);
|
|
177
176
|
const RESOURCE_CATALOG_OPTIONS = object2LabelList(RESOURCE_CATALOG_DICT);
|
|
@@ -111,8 +111,37 @@ const _sfc_main = vue.defineComponent({
|
|
|
111
111
|
}, 500);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
+
const getAppBtnSlot = async () => {
|
|
115
|
+
await api.getPubApps(BASE_API, { rid, type: "2,3" });
|
|
116
|
+
const params = {
|
|
117
|
+
slot_key: "head-applist-panel"
|
|
118
|
+
};
|
|
119
|
+
api.getBtnSlot(BASE_API, params).then((res) => {
|
|
120
|
+
if (res.code === 0 && res.data.buttons && res.data.buttons["head-applist-panel"] && res.data.buttons["head-applist-panel"].buttons) {
|
|
121
|
+
const appLists = res.data.buttons["head-applist-panel"].buttons.map(
|
|
122
|
+
(item) => ({
|
|
123
|
+
alias: item.name,
|
|
124
|
+
actions: [
|
|
125
|
+
{
|
|
126
|
+
alias: item.name,
|
|
127
|
+
brief: item.name,
|
|
128
|
+
key: "appSlotBtn",
|
|
129
|
+
icon: item.app_icon,
|
|
130
|
+
real: item.permission,
|
|
131
|
+
params: item,
|
|
132
|
+
target_url: "",
|
|
133
|
+
type: 3
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
StorePubApplication.value.push(...appLists);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
};
|
|
114
142
|
vue.onMounted(() => {
|
|
115
143
|
load();
|
|
144
|
+
getAppBtnSlot();
|
|
116
145
|
});
|
|
117
146
|
return (_ctx, _cache) => {
|
|
118
147
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
@@ -26,6 +26,14 @@ function setResentApp(BASE_API, params) {
|
|
|
26
26
|
method: "post"
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
function getBtnSlot(BASE_API, params) {
|
|
30
|
+
return request(BASE_API, {
|
|
31
|
+
url: "/poplar/v3/cosmos-center/buttons",
|
|
32
|
+
method: "get",
|
|
33
|
+
params
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exports.getBtnSlot = getBtnSlot;
|
|
29
37
|
exports.getPubApps = getPubApps;
|
|
30
38
|
exports.getResentApp = getResentApp;
|
|
31
39
|
exports.getUserRepoActs = getUserRepoActs;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
.reference-btn {
|
|
2
|
-
border: none;
|
|
3
2
|
padding: 12px 16px;
|
|
4
|
-
border-radius: 4px;
|
|
5
3
|
color: #5f5f5f;
|
|
4
|
+
border: none;
|
|
5
|
+
border-radius: 4px;
|
|
6
6
|
}
|
|
7
7
|
.apps-box-popover {
|
|
8
8
|
position: relative;
|
|
9
9
|
padding: 10px;
|
|
10
10
|
}
|
|
11
11
|
.app-title {
|
|
12
|
-
|
|
12
|
+
padding: 0 15px;
|
|
13
13
|
font-weight: bold;
|
|
14
|
-
|
|
14
|
+
font-size: 16px;
|
|
15
15
|
}
|
|
16
16
|
.ul-list {
|
|
17
|
-
list-style: none;
|
|
18
|
-
overflow: hidden;
|
|
19
17
|
width: 435px !important;
|
|
20
|
-
text-align: center;
|
|
21
|
-
padding: 0;
|
|
22
18
|
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-align: center;
|
|
22
|
+
list-style: none;
|
|
23
23
|
}
|
|
24
24
|
.ul-list .li_item {
|
|
25
|
+
position: relative;
|
|
25
26
|
float: left;
|
|
26
27
|
width: 85px;
|
|
27
28
|
height: 90px;
|
|
28
|
-
text-align: center;
|
|
29
29
|
margin: 13px 0;
|
|
30
|
-
|
|
30
|
+
text-align: center;
|
|
31
31
|
}
|
|
32
32
|
.ul-list .li_item .icon-logo .svg-icon {
|
|
33
33
|
width: 4em;
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
display: block;
|
|
43
43
|
}
|
|
44
44
|
.ul-list .li_item .wrap_icon {
|
|
45
|
-
width: 70px;
|
|
46
45
|
display: inline-block;
|
|
46
|
+
width: 70px;
|
|
47
47
|
margin-top: 6px;
|
|
48
48
|
}
|
|
49
49
|
.ul-list .li_item .wrap_icon .wrap_ .icon-logo {
|
|
@@ -52,8 +52,11 @@
|
|
|
52
52
|
margin-bottom: 4px;
|
|
53
53
|
}
|
|
54
54
|
.ul-list .li_item .wrap_icon .wrap_ .icon-logo img {
|
|
55
|
+
width: 50px;
|
|
55
56
|
max-width: 100%;
|
|
57
|
+
height: 50px;
|
|
56
58
|
max-height: 100%;
|
|
59
|
+
border-radius: 50%;
|
|
57
60
|
}
|
|
58
61
|
.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo {
|
|
59
62
|
line-height: 77px;
|
|
@@ -66,8 +69,8 @@
|
|
|
66
69
|
width: 73px;
|
|
67
70
|
height: 20px;
|
|
68
71
|
overflow: hidden;
|
|
69
|
-
text-overflow: ellipsis;
|
|
70
72
|
white-space: nowrap;
|
|
73
|
+
text-overflow: ellipsis;
|
|
71
74
|
}
|
|
72
75
|
.ul-list .li_item .wrap_icon .quick-add .icon-logo {
|
|
73
76
|
width: 40px;
|
|
@@ -78,13 +81,13 @@
|
|
|
78
81
|
border-radius: 50%;
|
|
79
82
|
}
|
|
80
83
|
.ul-list .li_item .wrap_icon .quick-add .icon-logo i {
|
|
81
|
-
line-height: 40px;
|
|
82
84
|
color: rgba(0, 0, 0, 0.85);
|
|
83
85
|
font-size: 14px;
|
|
86
|
+
line-height: 40px;
|
|
84
87
|
}
|
|
85
88
|
.ul-list .li_item .icon-gengduo {
|
|
86
|
-
display: none;
|
|
87
89
|
position: absolute;
|
|
88
90
|
top: 2px;
|
|
89
91
|
right: 4px;
|
|
92
|
+
display: none;
|
|
90
93
|
}
|