@cmstops/pro-compo 0.3.49 → 0.3.51
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 +30 -13
- package/dist/index.min.css +1 -1
- package/es/docPreview/component.js +33 -30
- package/es/hooks/useUpload.d.ts +1 -0
- package/es/hooks/useUpload.js +26 -8
- package/es/index.css +30 -13
- package/es/selectResourceModal/components/ListCardWrapper/index.js +19 -15
- package/es/selectResourceModal/components/ListContent/index.js +5 -2
- package/es/selectResourceModal/components/ListContentLocal/index.js +28 -4
- package/es/selectResourceModal/components/ListFilter/index.js +12 -2
- package/es/selectResourceModal/style/index.css +7 -1
- package/es/selectResourceModal/style/listCardWrapper.less +11 -1
- package/es/thumbCard/component.js +36 -35
- package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
- package/es/thumbCard/components/ThumbUploading/index.js +42 -0
- package/es/thumbCard/style/index.css +23 -12
- package/es/thumbCard/style/index.less +6 -16
- package/es/thumbCard/style/thumbUploading.less +26 -0
- package/es/userAvater/component.js +3 -3
- package/lib/docPreview/component.js +33 -30
- package/lib/hooks/useUpload.js +26 -8
- package/lib/index.css +30 -13
- package/lib/selectResourceModal/components/ListCardWrapper/index.js +19 -15
- package/lib/selectResourceModal/components/ListContent/index.js +5 -2
- package/lib/selectResourceModal/components/ListContentLocal/index.js +28 -4
- package/lib/selectResourceModal/components/ListFilter/index.js +12 -2
- package/lib/selectResourceModal/style/index.css +7 -1
- package/lib/selectResourceModal/style/listCardWrapper.less +11 -1
- package/lib/thumbCard/component.js +35 -34
- package/lib/thumbCard/components/ThumbUploading/index.js +43 -0
- package/lib/thumbCard/style/index.css +23 -12
- package/lib/thumbCard/style/index.less +6 -16
- package/lib/thumbCard/style/thumbUploading.less +26 -0
- package/lib/userAvater/component.js +3 -3
- package/package.json +1 -1
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
.thumb-
|
|
2
|
-
position: relative;
|
|
1
|
+
.thumb-upload-loading {
|
|
3
2
|
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
9
|
+
}
|
|
10
|
+
.thumb-upload-loading .arco-progress-circle-text {
|
|
11
|
+
color: #fff;
|
|
12
|
+
}
|
|
13
|
+
.thumb-upload-loading .thumb-upload-text {
|
|
14
|
+
color: #fff;
|
|
15
|
+
}
|
|
16
|
+
.thumb-upload-loading .thumb-upload-text-success {
|
|
17
|
+
color: rgb(var(--success-2));
|
|
11
18
|
}
|
|
12
|
-
.thumb-
|
|
19
|
+
.thumb-upload-loading .thumb-upload-text-error {
|
|
20
|
+
color: rgb(var(--danger-6));
|
|
21
|
+
}
|
|
22
|
+
.thumb-select-wrapper {
|
|
23
|
+
position: relative;
|
|
13
24
|
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
25
|
align-items: center;
|
|
16
26
|
justify-content: center;
|
|
17
27
|
width: 100%;
|
|
18
28
|
height: 100%;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.thumb-select-wrapper .thumb-upload-loading .arco-progress-circle-text {
|
|
23
|
-
color: #fff;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
border-radius: 2px;
|
|
31
|
+
cursor: pointer;
|
|
24
32
|
}
|
|
25
33
|
.thumb-select-wrapper .thumb-image img {
|
|
26
34
|
width: 100%;
|
|
@@ -40,6 +48,9 @@
|
|
|
40
48
|
opacity: 0;
|
|
41
49
|
transition: all 0.3s ease-in-out;
|
|
42
50
|
}
|
|
51
|
+
.thumb-select-wrapper .thumb-handler-list.thumb-handler-always {
|
|
52
|
+
opacity: 1 !important;
|
|
53
|
+
}
|
|
43
54
|
.thumb-select-wrapper .thumb-handler-list .handler-item {
|
|
44
55
|
padding: 0 8px;
|
|
45
56
|
color: #fff;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import './thumbUploading.less';
|
|
2
|
+
|
|
1
3
|
.thumb-select-wrapper {
|
|
2
4
|
position: relative;
|
|
3
5
|
display: flex;
|
|
@@ -10,22 +12,6 @@
|
|
|
10
12
|
border-radius: 2px;
|
|
11
13
|
cursor: pointer;
|
|
12
14
|
|
|
13
|
-
// loading 模式
|
|
14
|
-
.thumb-upload-loading {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
color: #fff;
|
|
22
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
23
|
-
|
|
24
|
-
.arco-progress-circle-text {
|
|
25
|
-
color: #fff;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
15
|
// 样式
|
|
30
16
|
.thumb-image {
|
|
31
17
|
img {
|
|
@@ -49,6 +35,10 @@
|
|
|
49
35
|
opacity: 0;
|
|
50
36
|
transition: all 0.3s ease-in-out;
|
|
51
37
|
|
|
38
|
+
&.thumb-handler-always {
|
|
39
|
+
opacity: 1 !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
52
42
|
.handler-item {
|
|
53
43
|
padding: 0 8px;
|
|
54
44
|
color: #fff;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// loading 模式
|
|
2
|
+
.thumb-upload-loading {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
10
|
+
|
|
11
|
+
.arco-progress-circle-text {
|
|
12
|
+
color: #fff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.thumb-upload-text {
|
|
16
|
+
color: #fff;
|
|
17
|
+
|
|
18
|
+
&-success {
|
|
19
|
+
color: rgb(var(--success-2));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-error {
|
|
23
|
+
color: rgb(var(--danger-6));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -84,7 +84,7 @@ const _sfc_main = defineComponent({
|
|
|
84
84
|
"content-style": { padding: 0 }
|
|
85
85
|
}, {
|
|
86
86
|
content: withCtx(() => {
|
|
87
|
-
var _a;
|
|
87
|
+
var _a, _b;
|
|
88
88
|
return [
|
|
89
89
|
createElementVNode("div", _hoisted_4, [
|
|
90
90
|
createElementVNode("div", _hoisted_5, [
|
|
@@ -108,7 +108,7 @@ const _sfc_main = defineComponent({
|
|
|
108
108
|
createElementVNode("div", _hoisted_8, toDisplayString(userInfo.value.name), 1),
|
|
109
109
|
createElementVNode("div", _hoisted_9, toDisplayString(userInfo.value.mail || "\u6682\u65E0\u90AE\u7BB1"), 1),
|
|
110
110
|
((_a = userInfo.value.domains) == null ? void 0 : _a.length) === 1 && userInfo.value.currentDomain ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(userInfo.value.currentDomain), 1)) : createCommentVNode("v-if", true),
|
|
111
|
-
|
|
111
|
+
((_b = userInfo.value.domains) == null ? void 0 : _b.length) > 1 ? (openBlock(), createBlock(unref(Dropdown), { key: 1 }, {
|
|
112
112
|
content: withCtx(() => [
|
|
113
113
|
(openBlock(true), createElementBlock(Fragment, null, renderList(userInfo.value.domains, (item, index) => {
|
|
114
114
|
return openBlock(), createBlock(unref(Doption), {
|
|
@@ -131,7 +131,7 @@ const _sfc_main = defineComponent({
|
|
|
131
131
|
})
|
|
132
132
|
]),
|
|
133
133
|
_: 1
|
|
134
|
-
}),
|
|
134
|
+
})) : createCommentVNode("v-if", true),
|
|
135
135
|
createElementVNode("div", _hoisted_11, [
|
|
136
136
|
createVNode(unref(Button), {
|
|
137
137
|
type: "text",
|
|
@@ -7,23 +7,22 @@ var PreviewIframe = require("./components/PreviewIframe.js");
|
|
|
7
7
|
var hook = require("./scripts/hook.js");
|
|
8
8
|
const _hoisted_1 = { class: "preview-close" };
|
|
9
9
|
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share" }, null, -1);
|
|
10
|
-
const _hoisted_3 = { class: "doc-preview-share" };
|
|
11
|
-
const _hoisted_4 =
|
|
12
|
-
const _hoisted_5 =
|
|
13
|
-
const _hoisted_6 =
|
|
14
|
-
const _hoisted_7 =
|
|
15
|
-
const _hoisted_8 =
|
|
16
|
-
const _hoisted_9 = { class: "doc-preview-share-link" };
|
|
17
|
-
const _hoisted_10 = { class: "doc-preview-share-link-
|
|
18
|
-
const _hoisted_11 = { class: "doc-preview-share-
|
|
19
|
-
const _hoisted_12 = { class: "doc-preview-share-
|
|
20
|
-
const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-img" }, [
|
|
10
|
+
const _hoisted_3 = { class: "doc-preview-share-img" };
|
|
11
|
+
const _hoisted_4 = ["src"];
|
|
12
|
+
const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-tips" }, "\u626B\u63CF\u4E8C\u7EF4\u7801\u8BBF\u95EE", -1);
|
|
13
|
+
const _hoisted_6 = { class: "doc-preview-share-header" };
|
|
14
|
+
const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u9884\u89C8\u5730\u5740", -1);
|
|
15
|
+
const _hoisted_8 = { class: "doc-preview-share-link" };
|
|
16
|
+
const _hoisted_9 = { class: "doc-preview-share-link-value" };
|
|
17
|
+
const _hoisted_10 = { class: "doc-preview-share-link-hint" };
|
|
18
|
+
const _hoisted_11 = { class: "doc-preview-share-action" };
|
|
19
|
+
const _hoisted_12 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-img" }, [
|
|
21
20
|
/* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-img-hint" }, " \u6682\u65E0\u9884\u89C8 ")
|
|
22
21
|
], -1);
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
22
|
+
const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-tips" }, " \u5185\u5BB9\u6682\u65E0\u9884\u89C8\u94FE\u63A5\uFF0C\u53EF\u751F\u6210\u9884\u89C8\u94FE\u63A5 ", -1);
|
|
23
|
+
const _hoisted_14 = { class: "doc-preview-share-header" };
|
|
24
|
+
const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u94FE\u63A5\u6709\u6548\u65F6\u957F", -1);
|
|
25
|
+
const _hoisted_16 = { class: "doc-preview-share-action" };
|
|
27
26
|
const _sfc_main = vue.defineComponent({
|
|
28
27
|
...{ name: "docPreview" },
|
|
29
28
|
__name: "component",
|
|
@@ -52,7 +51,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
52
51
|
return (_ctx, _cache) => {
|
|
53
52
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
54
53
|
class: "doc-preview-container",
|
|
55
|
-
onClick: _cache[
|
|
54
|
+
onClick: _cache[7] || (_cache[7] = ($event) => emits("close"))
|
|
56
55
|
}, [
|
|
57
56
|
vue.createElementVNode("div", _hoisted_1, [
|
|
58
57
|
vue.createVNode(vue.unref(icon.IconClose), {
|
|
@@ -67,20 +66,24 @@ const _sfc_main = vue.defineComponent({
|
|
|
67
66
|
}, null, 8, ["src"]),
|
|
68
67
|
vue.createVNode(vue.unref(webVue.Spin), { loading: vue.unref(loading) }, {
|
|
69
68
|
default: vue.withCtx(() => [
|
|
70
|
-
vue.createElementVNode("div",
|
|
69
|
+
vue.createElementVNode("div", {
|
|
70
|
+
class: "doc-preview-share",
|
|
71
|
+
onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
|
|
72
|
+
}, ["stop"]))
|
|
73
|
+
}, [
|
|
71
74
|
vue.unref(shareData) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
72
75
|
vue.createCommentVNode(" \u4E8C\u7EF4\u7801 "),
|
|
73
|
-
vue.createElementVNode("div",
|
|
76
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
74
77
|
vue.createElementVNode("img", {
|
|
75
78
|
src: vue.unref(shareData).qrCode,
|
|
76
79
|
alt: ""
|
|
77
|
-
}, null, 8,
|
|
80
|
+
}, null, 8, _hoisted_4)
|
|
78
81
|
]),
|
|
79
82
|
vue.createCommentVNode(" \u5907\u6CE8 "),
|
|
80
|
-
|
|
83
|
+
_hoisted_5,
|
|
81
84
|
vue.createCommentVNode(" \u94FE\u63A5\u524D\u7F6E\u64CD\u4F5C "),
|
|
82
|
-
vue.createElementVNode("div",
|
|
83
|
-
|
|
85
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
86
|
+
_hoisted_7,
|
|
84
87
|
vue.createVNode(vue.unref(webVue.Link), {
|
|
85
88
|
type: "text",
|
|
86
89
|
onClick: vue.unref(copy)
|
|
@@ -92,12 +95,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
92
95
|
}, 8, ["onClick"])
|
|
93
96
|
]),
|
|
94
97
|
vue.createCommentVNode(" \u94FE\u63A5 "),
|
|
95
|
-
vue.createElementVNode("div",
|
|
96
|
-
vue.createElementVNode("div",
|
|
97
|
-
vue.createElementVNode("div",
|
|
98
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
99
|
+
vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(vue.unref(shareData).shareUrl), 1),
|
|
100
|
+
vue.createElementVNode("div", _hoisted_10, " \u94FE\u63A5\u5269\u4F59\u65F6\u95F4\uFF1A" + vue.toDisplayString(vue.unref(intervalTime)), 1)
|
|
98
101
|
]),
|
|
99
102
|
vue.createCommentVNode(" \u64CD\u4F5C "),
|
|
100
|
-
vue.createElementVNode("div",
|
|
103
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
101
104
|
vue.createVNode(vue.unref(webVue.Button), {
|
|
102
105
|
onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(cancel)())
|
|
103
106
|
}, {
|
|
@@ -117,10 +120,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
117
120
|
})
|
|
118
121
|
])
|
|
119
122
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
123
|
+
_hoisted_12,
|
|
120
124
|
_hoisted_13,
|
|
121
|
-
_hoisted_14,
|
|
122
|
-
|
|
123
|
-
_hoisted_16,
|
|
125
|
+
vue.createElementVNode("div", _hoisted_14, [
|
|
126
|
+
_hoisted_15,
|
|
124
127
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
125
128
|
modelValue: vue.unref(expireTime),
|
|
126
129
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(expireTime) ? expireTime.value = $event : null),
|
|
@@ -139,7 +142,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
139
142
|
_: 1
|
|
140
143
|
}, 8, ["modelValue"])
|
|
141
144
|
]),
|
|
142
|
-
vue.createElementVNode("div",
|
|
145
|
+
vue.createElementVNode("div", _hoisted_16, [
|
|
143
146
|
vue.createVNode(vue.unref(webVue.Button), {
|
|
144
147
|
type: "primary",
|
|
145
148
|
onClick: _cache[5] || (_cache[5] = () => vue.unref(generate)())
|
package/lib/hooks/useUpload.js
CHANGED
|
@@ -42,19 +42,28 @@ function useUpload() {
|
|
|
42
42
|
}
|
|
43
43
|
list.value = originList;
|
|
44
44
|
}
|
|
45
|
+
const removeRecord = (file) => {
|
|
46
|
+
const originList = list.value;
|
|
47
|
+
const taskIndex = originList.findIndex((task) => task.id === file.id);
|
|
48
|
+
if (taskIndex !== -1) {
|
|
49
|
+
originList.splice(taskIndex, 1);
|
|
50
|
+
list.value = originList;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
45
53
|
const uploadFile = (BASE_API, file, dir = 0, repoId, callback) => {
|
|
46
54
|
const newFile = {
|
|
47
|
-
id: index.generateUUID(),
|
|
55
|
+
id: file.id || index.generateUUID(),
|
|
48
56
|
sig_id: file.sig_id || index.generateUUID(),
|
|
49
57
|
name: file.name,
|
|
50
58
|
url: "",
|
|
51
59
|
size: file.size,
|
|
52
60
|
isUpload: true,
|
|
53
|
-
type: file.type
|
|
61
|
+
type: file.type,
|
|
62
|
+
originFile: file
|
|
54
63
|
};
|
|
55
64
|
const upload = new tusUpload.TusUploadTask(file);
|
|
56
65
|
newFile.abort = () => upload.abort();
|
|
57
|
-
recordTaskStatusChange(newFile, 0);
|
|
66
|
+
recordTaskStatusChange({ ...newFile, status: 1, msg: "\u4E0A\u4F20\u4E2D\u2026\u2026" }, 0);
|
|
58
67
|
const progress = (percent, total) => {
|
|
59
68
|
const progress2 = percent / total;
|
|
60
69
|
recordTaskStatusChange(newFile, progress2);
|
|
@@ -84,7 +93,9 @@ function useUpload() {
|
|
|
84
93
|
callback && callback({ ...message, sig_id: newFile.sig_id }, "success");
|
|
85
94
|
}).catch((e) => {
|
|
86
95
|
console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u4E0A\u4F20\u5931\u8D25\uFF1A", e);
|
|
87
|
-
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
recordTaskStatusChange({ ...newFile, status: 2, msg: "\u4E0A\u4F20\u5931\u8D25" }, -1);
|
|
98
|
+
}, 1e3);
|
|
88
99
|
callback && callback(newFile, "fail");
|
|
89
100
|
});
|
|
90
101
|
};
|
|
@@ -98,7 +109,7 @@ function useUpload() {
|
|
|
98
109
|
if (idx === -1)
|
|
99
110
|
return;
|
|
100
111
|
const item = list.value[idx];
|
|
101
|
-
recordTaskStatusChange(item, 0, true);
|
|
112
|
+
recordTaskStatusChange({ ...item, status: 1, msg: "\u8F6C\u7801\u4E2D\u2026\u2026" }, 0, true);
|
|
102
113
|
const progress = (progress2) => recordTaskStatusChange(item, progress2);
|
|
103
114
|
const transing = task.start(BASE_API, progress);
|
|
104
115
|
transing.then(async (res) => {
|
|
@@ -108,11 +119,17 @@ function useUpload() {
|
|
|
108
119
|
setTimeout(() => uploadSuccess(file), 200);
|
|
109
120
|
} else {
|
|
110
121
|
console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u8F6C\u7801\u5931\u8D25\uFF1A", item);
|
|
111
|
-
recordTaskStatusChange(
|
|
122
|
+
recordTaskStatusChange(
|
|
123
|
+
{ ...item, mediaFile: file, status: 3, msg: "\u8F6C\u7801\u5931\u8D25" },
|
|
124
|
+
-1
|
|
125
|
+
);
|
|
112
126
|
}
|
|
113
127
|
}).catch((e) => {
|
|
114
128
|
console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u8F6C\u7801\u5931\u8D25", e);
|
|
115
|
-
recordTaskStatusChange(
|
|
129
|
+
recordTaskStatusChange(
|
|
130
|
+
{ ...item, mediaFile: file, status: 3, msg: "\u8F6C\u7801\u5931\u8D25" },
|
|
131
|
+
-1
|
|
132
|
+
);
|
|
116
133
|
});
|
|
117
134
|
};
|
|
118
135
|
vue.watch(() => list.value, set, { deep: true });
|
|
@@ -121,7 +138,8 @@ function useUpload() {
|
|
|
121
138
|
list,
|
|
122
139
|
uploadFile,
|
|
123
140
|
transcodingFile,
|
|
124
|
-
recordTaskStatusChange
|
|
141
|
+
recordTaskStatusChange,
|
|
142
|
+
removeRecord
|
|
125
143
|
};
|
|
126
144
|
}
|
|
127
145
|
exports.addMedia = addMedia;
|
package/lib/index.css
CHANGED
|
@@ -4246,29 +4246,37 @@
|
|
|
4246
4246
|
color: #fff;
|
|
4247
4247
|
font-size: 18px;
|
|
4248
4248
|
}
|
|
4249
|
-
.thumb-
|
|
4250
|
-
position: relative;
|
|
4249
|
+
.thumb-upload-loading {
|
|
4251
4250
|
display: flex;
|
|
4251
|
+
flex-direction: column;
|
|
4252
4252
|
align-items: center;
|
|
4253
4253
|
justify-content: center;
|
|
4254
4254
|
width: 100%;
|
|
4255
4255
|
height: 100%;
|
|
4256
|
-
|
|
4257
|
-
border-radius: 2px;
|
|
4258
|
-
cursor: pointer;
|
|
4256
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
4259
4257
|
}
|
|
4260
|
-
.thumb-
|
|
4258
|
+
.thumb-upload-loading .arco-progress-circle-text {
|
|
4259
|
+
color: #fff;
|
|
4260
|
+
}
|
|
4261
|
+
.thumb-upload-loading .thumb-upload-text {
|
|
4262
|
+
color: #fff;
|
|
4263
|
+
}
|
|
4264
|
+
.thumb-upload-loading .thumb-upload-text-success {
|
|
4265
|
+
color: rgb(var(--success-2));
|
|
4266
|
+
}
|
|
4267
|
+
.thumb-upload-loading .thumb-upload-text-error {
|
|
4268
|
+
color: rgb(var(--danger-6));
|
|
4269
|
+
}
|
|
4270
|
+
.thumb-select-wrapper {
|
|
4271
|
+
position: relative;
|
|
4261
4272
|
display: flex;
|
|
4262
|
-
flex-direction: column;
|
|
4263
4273
|
align-items: center;
|
|
4264
4274
|
justify-content: center;
|
|
4265
4275
|
width: 100%;
|
|
4266
4276
|
height: 100%;
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
.thumb-select-wrapper .thumb-upload-loading .arco-progress-circle-text {
|
|
4271
|
-
color: #fff;
|
|
4277
|
+
overflow: hidden;
|
|
4278
|
+
border-radius: 2px;
|
|
4279
|
+
cursor: pointer;
|
|
4272
4280
|
}
|
|
4273
4281
|
.thumb-select-wrapper .thumb-image img {
|
|
4274
4282
|
width: 100%;
|
|
@@ -4288,6 +4296,9 @@
|
|
|
4288
4296
|
opacity: 0;
|
|
4289
4297
|
transition: all 0.3s ease-in-out;
|
|
4290
4298
|
}
|
|
4299
|
+
.thumb-select-wrapper .thumb-handler-list.thumb-handler-always {
|
|
4300
|
+
opacity: 1 !important;
|
|
4301
|
+
}
|
|
4291
4302
|
.thumb-select-wrapper .thumb-handler-list .handler-item {
|
|
4292
4303
|
padding: 0 8px;
|
|
4293
4304
|
color: #fff;
|
|
@@ -4463,6 +4474,8 @@
|
|
|
4463
4474
|
.card-wrapper-image {
|
|
4464
4475
|
position: relative;
|
|
4465
4476
|
overflow: hidden;
|
|
4477
|
+
user-select: none;
|
|
4478
|
+
-webkit-user-drag: none;
|
|
4466
4479
|
}
|
|
4467
4480
|
.card-wrapper-image .card-wrapper {
|
|
4468
4481
|
position: relative;
|
|
@@ -4471,9 +4484,13 @@
|
|
|
4471
4484
|
transition: all 0.3s ease-in-out;
|
|
4472
4485
|
aspect-ratio: 4 / 3;
|
|
4473
4486
|
}
|
|
4474
|
-
.card-wrapper-image .card-wrapper.disable:not(.active) {
|
|
4487
|
+
.card-wrapper-image .card-wrapper.disable:not(.active) .thumb-image {
|
|
4488
|
+
cursor: not-allowed;
|
|
4475
4489
|
opacity: 0.4;
|
|
4476
4490
|
}
|
|
4491
|
+
.card-wrapper-image .card-wrapper.disable:not(.active) .thumb-upload-loading {
|
|
4492
|
+
cursor: not-allowed;
|
|
4493
|
+
}
|
|
4477
4494
|
.card-wrapper-image .card-wrapper .mask {
|
|
4478
4495
|
position: absolute;
|
|
4479
4496
|
top: 0;
|
|
@@ -19,7 +19,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
19
19
|
selectKeys: {},
|
|
20
20
|
disable: { type: Boolean }
|
|
21
21
|
},
|
|
22
|
-
emits: ["select", "select-one"],
|
|
22
|
+
emits: ["select", "select-one", "options"],
|
|
23
23
|
setup(__props, { emit: __emit }) {
|
|
24
24
|
const props = __props;
|
|
25
25
|
const emits = __emit;
|
|
@@ -32,17 +32,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
32
32
|
});
|
|
33
33
|
return result;
|
|
34
34
|
});
|
|
35
|
-
function handleCheck() {
|
|
36
|
-
if (props.disable && !selectedOrder.value[props.item.id])
|
|
37
|
-
return;
|
|
38
|
-
emits("select", props.item);
|
|
39
|
-
}
|
|
40
|
-
function handleOption(params) {
|
|
41
|
-
const { key, item } = params;
|
|
42
|
-
if (key === "select") {
|
|
43
|
-
emits("select-one", item);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
35
|
const canIUse = vue.computed(() => {
|
|
47
36
|
if (props.disable)
|
|
48
37
|
return false;
|
|
@@ -57,10 +46,25 @@ const _sfc_main = vue.defineComponent({
|
|
|
57
46
|
});
|
|
58
47
|
const handlersKey = vue.computed(() => {
|
|
59
48
|
var _a;
|
|
60
|
-
if (
|
|
49
|
+
if (props.item.status === 2) {
|
|
50
|
+
return [
|
|
51
|
+
{ label: "\u91CD\u65B0\u4E0A\u4F20", key: "reupload" },
|
|
52
|
+
{ label: "\u5220\u9664\u8BB0\u5F55", key: "remove" }
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
if (props.item.status === 3) {
|
|
56
|
+
return [{ label: "\u91CD\u65B0\u8F6C\u7801", key: "retranscode" }];
|
|
57
|
+
}
|
|
58
|
+
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable || !canIUse.value) {
|
|
61
59
|
return [];
|
|
62
|
-
|
|
60
|
+
}
|
|
61
|
+
return [{ label: "\u9009\u7528", key: "select-one" }].concat(props.extraKeys || []);
|
|
63
62
|
});
|
|
63
|
+
function handleCheck() {
|
|
64
|
+
if (!canIUse.value && !selectedOrder.value[props.item.id])
|
|
65
|
+
return;
|
|
66
|
+
emits("select", props.item);
|
|
67
|
+
}
|
|
64
68
|
return (_ctx, _cache) => {
|
|
65
69
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
66
70
|
class: "card-wrapper-image",
|
|
@@ -79,7 +83,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
79
83
|
},
|
|
80
84
|
"use-mask": true,
|
|
81
85
|
"handlers-key": handlersKey.value,
|
|
82
|
-
onHandle:
|
|
86
|
+
onHandle: _cache[0] || (_cache[0] = (e) => emits("options", e))
|
|
83
87
|
}, null, 8, ["url", "thumb", "catalog", "meta", "options", "handlers-key"]),
|
|
84
88
|
_hoisted_1
|
|
85
89
|
], 2),
|
|
@@ -15,6 +15,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
15
15
|
emits: ["select", "select-one"],
|
|
16
16
|
setup(__props, { emit: __emit }) {
|
|
17
17
|
const emits = __emit;
|
|
18
|
+
function handleOptions(e) {
|
|
19
|
+
emits(e.key, e.item);
|
|
20
|
+
}
|
|
18
21
|
return (_ctx, _cache) => {
|
|
19
22
|
var _a, _b;
|
|
20
23
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -25,8 +28,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
25
28
|
"select-keys": _ctx.selectKeys,
|
|
26
29
|
disable: _ctx.disable,
|
|
27
30
|
onSelect: () => emits("select", item),
|
|
28
|
-
|
|
29
|
-
}, null, 8, ["item", "select-keys", "disable", "onSelect"
|
|
31
|
+
onOptions: handleOptions
|
|
32
|
+
}, null, 8, ["item", "select-keys", "disable", "onSelect"]);
|
|
30
33
|
}), 128)),
|
|
31
34
|
vue.createCommentVNode(" \u7A7A\u72B6\u6001 "),
|
|
32
35
|
((_a = _ctx.list) == null ? void 0 : _a.length) === 0 && _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Spin), {
|
|
@@ -17,7 +17,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
17
17
|
selectKeys: {},
|
|
18
18
|
disable: { type: Boolean }
|
|
19
19
|
},
|
|
20
|
-
emits: ["select", "select-one"],
|
|
20
|
+
emits: ["select", "select-one", "reupload"],
|
|
21
21
|
setup(__props, { emit: __emit }) {
|
|
22
22
|
const emits = __emit;
|
|
23
23
|
const userInfo = vue.inject("userInfo");
|
|
@@ -26,7 +26,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
26
26
|
var _a;
|
|
27
27
|
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
28
28
|
});
|
|
29
|
-
const { list, uploadFile, transcodingFile } = useUpload["default"]();
|
|
29
|
+
const { list, uploadFile, transcodingFile, removeRecord } = useUpload["default"]();
|
|
30
30
|
function handleChange(file) {
|
|
31
31
|
if (!baseAPI || !repoId.value)
|
|
32
32
|
return;
|
|
@@ -38,6 +38,30 @@ const _sfc_main = vue.defineComponent({
|
|
|
38
38
|
(media) => transcodingFile(baseAPI, media)
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
+
function handleOptions(e) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (e.key === "reupload") {
|
|
44
|
+
if (!e.item || !((_a = e.item) == null ? void 0 : _a.originFile))
|
|
45
|
+
return;
|
|
46
|
+
e.item.originFile.sig_id = e.item.sig_id;
|
|
47
|
+
e.item.originFile.id = e.item.id;
|
|
48
|
+
handleChange({ file: e.item.originFile });
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (e.key === "retranscode") {
|
|
52
|
+
if (!baseAPI || !((_b = e.item) == null ? void 0 : _b.mediaFile))
|
|
53
|
+
return;
|
|
54
|
+
transcodingFile(baseAPI, e.item.mediaFile);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (e.key === "remove") {
|
|
58
|
+
if (!e.item)
|
|
59
|
+
return;
|
|
60
|
+
removeRecord(e.item);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
emits(e.key, e.item);
|
|
64
|
+
}
|
|
41
65
|
return (_ctx, _cache) => {
|
|
42
66
|
var _a, _b;
|
|
43
67
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -56,8 +80,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
56
80
|
"select-keys": _ctx.selectKeys,
|
|
57
81
|
disable: _ctx.disable,
|
|
58
82
|
onSelect: () => emits("select", item),
|
|
59
|
-
|
|
60
|
-
}, null, 8, ["item", "select-keys", "disable", "onSelect"
|
|
83
|
+
onOptions: handleOptions
|
|
84
|
+
}, null, 8, ["item", "select-keys", "disable", "onSelect"]);
|
|
61
85
|
}), 128))
|
|
62
86
|
])
|
|
63
87
|
])
|
|
@@ -75,8 +75,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
75
75
|
set(val) {
|
|
76
76
|
if (val) {
|
|
77
77
|
const [start, end] = val;
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
const created_begin = new Date(start);
|
|
79
|
+
const created_end = new Date(end);
|
|
80
|
+
created_begin.setHours(0, 0, 0, 0);
|
|
81
|
+
created_end.setHours(23, 59, 59, 0);
|
|
82
|
+
filter.value.created_begin = parseInt(
|
|
83
|
+
(created_begin.getTime() / 1e3).toFixed(0),
|
|
84
|
+
10
|
|
85
|
+
);
|
|
86
|
+
filter.value.created_end = parseInt(
|
|
87
|
+
(created_end.getTime() / 1e3).toFixed(0),
|
|
88
|
+
10
|
|
89
|
+
);
|
|
80
90
|
} else {
|
|
81
91
|
filter.value.created_begin = "";
|
|
82
92
|
filter.value.created_end = "";
|
|
@@ -135,6 +135,8 @@
|
|
|
135
135
|
.card-wrapper-image {
|
|
136
136
|
position: relative;
|
|
137
137
|
overflow: hidden;
|
|
138
|
+
user-select: none;
|
|
139
|
+
-webkit-user-drag: none;
|
|
138
140
|
}
|
|
139
141
|
.card-wrapper-image .card-wrapper {
|
|
140
142
|
position: relative;
|
|
@@ -143,9 +145,13 @@
|
|
|
143
145
|
transition: all 0.3s ease-in-out;
|
|
144
146
|
aspect-ratio: 4 / 3;
|
|
145
147
|
}
|
|
146
|
-
.card-wrapper-image .card-wrapper.disable:not(.active) {
|
|
148
|
+
.card-wrapper-image .card-wrapper.disable:not(.active) .thumb-image {
|
|
149
|
+
cursor: not-allowed;
|
|
147
150
|
opacity: 0.4;
|
|
148
151
|
}
|
|
152
|
+
.card-wrapper-image .card-wrapper.disable:not(.active) .thumb-upload-loading {
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
}
|
|
149
155
|
.card-wrapper-image .card-wrapper .mask {
|
|
150
156
|
position: absolute;
|
|
151
157
|
top: 0;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
.card-wrapper-image {
|
|
2
2
|
position: relative;
|
|
3
3
|
overflow: hidden;
|
|
4
|
+
user-select: none;
|
|
5
|
+
-webkit-user-drag: none;
|
|
4
6
|
|
|
5
7
|
.card-wrapper {
|
|
6
8
|
position: relative;
|
|
@@ -11,7 +13,15 @@
|
|
|
11
13
|
aspect-ratio: 4 / 3;
|
|
12
14
|
|
|
13
15
|
&.disable:not(.active) {
|
|
14
|
-
|
|
16
|
+
// disabled 下禁用
|
|
17
|
+
.thumb-image {
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
opacity: 0.4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.thumb-upload-loading {
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
26
|
|
|
17
27
|
.mask {
|