@cmstops/pro-compo 0.3.47 → 0.3.49
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 +3 -0
- package/dist/index.min.css +1 -1
- package/es/docHistory/component.js +27 -6
- package/es/docHistory/style/index.css +3 -0
- package/es/docHistory/style/index.less +4 -0
- package/es/docPreview/component.js +31 -29
- package/es/docPreview/scripts/hook.js +1 -1
- package/es/hooks/useAttachement.js +1 -1
- package/es/hooks/useUpload.js +2 -2
- package/es/index.css +3 -0
- package/es/selectResourceModal/component.js +1 -0
- package/es/selectResourceModal/components/ListCardWrapper/index.js +43 -5
- package/es/selectResourceModal/components/ListContent/index.js +4 -33
- package/es/selectResourceModal/components/ListContentLocal/index.js +4 -33
- package/es/selectResourceModal/components/ListFilter/index.js +12 -16
- package/lib/docHistory/component.js +25 -4
- package/lib/docHistory/style/index.css +3 -0
- package/lib/docHistory/style/index.less +4 -0
- package/lib/docPreview/component.js +31 -29
- package/lib/docPreview/scripts/hook.js +1 -1
- package/lib/hooks/useAttachement.js +1 -1
- package/lib/hooks/useUpload.js +2 -2
- package/lib/index.css +3 -0
- package/lib/selectResourceModal/component.js +1 -0
- package/lib/selectResourceModal/components/ListCardWrapper/index.js +44 -6
- package/lib/selectResourceModal/components/ListContent/index.js +5 -34
- package/lib/selectResourceModal/components/ListContentLocal/index.js +3 -32
- package/lib/selectResourceModal/components/ListFilter/index.js +12 -16
- package/package.json +1 -1
|
@@ -5,23 +5,24 @@ import { DEFAULT_BASE_API } from "../config.js";
|
|
|
5
5
|
import _sfc_main$1 from "./components/PreviewIframe.js";
|
|
6
6
|
import { useDocPreview, EXPIRE_TIME_OPTIONS } from "./scripts/hook.js";
|
|
7
7
|
const _hoisted_1 = { class: "preview-close" };
|
|
8
|
-
const _hoisted_2 = { class: "doc-preview-share" };
|
|
9
|
-
const _hoisted_3 = { class: "doc-preview-share
|
|
10
|
-
const _hoisted_4 =
|
|
11
|
-
const _hoisted_5 =
|
|
12
|
-
const _hoisted_6 = { class: "doc-preview-share-
|
|
13
|
-
const _hoisted_7 =
|
|
14
|
-
const _hoisted_8 =
|
|
15
|
-
const _hoisted_9 = { class: "doc-preview-share-link
|
|
16
|
-
const _hoisted_10 = { class: "doc-preview-share-link-
|
|
17
|
-
const _hoisted_11 = { class: "doc-preview-share-
|
|
18
|
-
const _hoisted_12 =
|
|
8
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("div", { class: "doc-preview-share" }, null, -1);
|
|
9
|
+
const _hoisted_3 = { class: "doc-preview-share" };
|
|
10
|
+
const _hoisted_4 = { class: "doc-preview-share-img" };
|
|
11
|
+
const _hoisted_5 = ["src"];
|
|
12
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "doc-preview-share-tips" }, "\u626B\u63CF\u4E8C\u7EF4\u7801\u8BBF\u95EE", -1);
|
|
13
|
+
const _hoisted_7 = { class: "doc-preview-share-header" };
|
|
14
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("span", null, "\u9884\u89C8\u5730\u5740", -1);
|
|
15
|
+
const _hoisted_9 = { class: "doc-preview-share-link" };
|
|
16
|
+
const _hoisted_10 = { class: "doc-preview-share-link-value" };
|
|
17
|
+
const _hoisted_11 = { class: "doc-preview-share-link-hint" };
|
|
18
|
+
const _hoisted_12 = { class: "doc-preview-share-action" };
|
|
19
|
+
const _hoisted_13 = /* @__PURE__ */ createElementVNode("div", { class: "doc-preview-share-img" }, [
|
|
19
20
|
/* @__PURE__ */ createElementVNode("div", { class: "doc-preview-share-img-hint" }, " \u6682\u65E0\u9884\u89C8 ")
|
|
20
21
|
], -1);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
22
|
+
const _hoisted_14 = /* @__PURE__ */ 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_15 = { class: "doc-preview-share-header" };
|
|
24
|
+
const _hoisted_16 = /* @__PURE__ */ createElementVNode("span", null, "\u94FE\u63A5\u6709\u6548\u65F6\u957F", -1);
|
|
25
|
+
const _hoisted_17 = { class: "doc-preview-share-action" };
|
|
25
26
|
const _sfc_main = defineComponent({
|
|
26
27
|
...{ name: "docPreview" },
|
|
27
28
|
__name: "component",
|
|
@@ -57,6 +58,7 @@ const _sfc_main = defineComponent({
|
|
|
57
58
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emits("close"), ["stop"]))
|
|
58
59
|
})
|
|
59
60
|
]),
|
|
61
|
+
_hoisted_2,
|
|
60
62
|
createVNode(_sfc_main$1, {
|
|
61
63
|
src: unref(innerUrl),
|
|
62
64
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -64,20 +66,20 @@ const _sfc_main = defineComponent({
|
|
|
64
66
|
}, null, 8, ["src"]),
|
|
65
67
|
createVNode(unref(Spin), { loading: unref(loading) }, {
|
|
66
68
|
default: withCtx(() => [
|
|
67
|
-
createElementVNode("div",
|
|
69
|
+
createElementVNode("div", _hoisted_3, [
|
|
68
70
|
unref(shareData) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
69
71
|
createCommentVNode(" \u4E8C\u7EF4\u7801 "),
|
|
70
|
-
createElementVNode("div",
|
|
72
|
+
createElementVNode("div", _hoisted_4, [
|
|
71
73
|
createElementVNode("img", {
|
|
72
74
|
src: unref(shareData).qrCode,
|
|
73
75
|
alt: ""
|
|
74
|
-
}, null, 8,
|
|
76
|
+
}, null, 8, _hoisted_5)
|
|
75
77
|
]),
|
|
76
78
|
createCommentVNode(" \u5907\u6CE8 "),
|
|
77
|
-
|
|
79
|
+
_hoisted_6,
|
|
78
80
|
createCommentVNode(" \u94FE\u63A5\u524D\u7F6E\u64CD\u4F5C "),
|
|
79
|
-
createElementVNode("div",
|
|
80
|
-
|
|
81
|
+
createElementVNode("div", _hoisted_7, [
|
|
82
|
+
_hoisted_8,
|
|
81
83
|
createVNode(unref(Link), {
|
|
82
84
|
type: "text",
|
|
83
85
|
onClick: unref(copy)
|
|
@@ -89,12 +91,12 @@ const _sfc_main = defineComponent({
|
|
|
89
91
|
}, 8, ["onClick"])
|
|
90
92
|
]),
|
|
91
93
|
createCommentVNode(" \u94FE\u63A5 "),
|
|
92
|
-
createElementVNode("div",
|
|
93
|
-
createElementVNode("div",
|
|
94
|
-
createElementVNode("div",
|
|
94
|
+
createElementVNode("div", _hoisted_9, [
|
|
95
|
+
createElementVNode("div", _hoisted_10, toDisplayString(unref(shareData).shareUrl), 1),
|
|
96
|
+
createElementVNode("div", _hoisted_11, " \u94FE\u63A5\u5269\u4F59\u65F6\u95F4\uFF1A" + toDisplayString(unref(intervalTime)), 1)
|
|
95
97
|
]),
|
|
96
98
|
createCommentVNode(" \u64CD\u4F5C "),
|
|
97
|
-
createElementVNode("div",
|
|
99
|
+
createElementVNode("div", _hoisted_12, [
|
|
98
100
|
createVNode(unref(Button), {
|
|
99
101
|
onClick: _cache[2] || (_cache[2] = ($event) => unref(cancel)())
|
|
100
102
|
}, {
|
|
@@ -114,10 +116,10 @@ const _sfc_main = defineComponent({
|
|
|
114
116
|
})
|
|
115
117
|
])
|
|
116
118
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
117
|
-
_hoisted_12,
|
|
118
119
|
_hoisted_13,
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
_hoisted_14,
|
|
121
|
+
createElementVNode("div", _hoisted_15, [
|
|
122
|
+
_hoisted_16,
|
|
121
123
|
createVNode(unref(Select), {
|
|
122
124
|
modelValue: unref(expireTime),
|
|
123
125
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(expireTime) ? expireTime.value = $event : null),
|
|
@@ -136,7 +138,7 @@ const _sfc_main = defineComponent({
|
|
|
136
138
|
_: 1
|
|
137
139
|
}, 8, ["modelValue"])
|
|
138
140
|
]),
|
|
139
|
-
createElementVNode("div",
|
|
141
|
+
createElementVNode("div", _hoisted_17, [
|
|
140
142
|
createVNode(unref(Button), {
|
|
141
143
|
type: "primary",
|
|
142
144
|
onClick: _cache[5] || (_cache[5] = () => unref(generate)())
|
|
@@ -23,7 +23,7 @@ function getAttachmentsMyMessage(BASE_API, query) {
|
|
|
23
23
|
}
|
|
24
24
|
function useAttachement(options) {
|
|
25
25
|
const key = ref(options.key);
|
|
26
|
-
const limit = ref(
|
|
26
|
+
const limit = ref(30);
|
|
27
27
|
const offset = ref(0);
|
|
28
28
|
const filter = ref({});
|
|
29
29
|
const params = computed(() => {
|
package/es/hooks/useUpload.js
CHANGED
|
@@ -28,7 +28,7 @@ function useUpload() {
|
|
|
28
28
|
const originList = list.value;
|
|
29
29
|
const taskIndex = originList.findIndex((task) => task.id === file.id);
|
|
30
30
|
if (taskIndex !== -1) {
|
|
31
|
-
progress !== -1 && (originList[taskIndex].progress =
|
|
31
|
+
progress !== -1 && (originList[taskIndex].progress = progress.toFixed(2));
|
|
32
32
|
file.status != null && (originList[taskIndex].status = file.status);
|
|
33
33
|
file.msg != null && (originList[taskIndex].msg = file.msg);
|
|
34
34
|
if (isTrans)
|
|
@@ -36,7 +36,7 @@ function useUpload() {
|
|
|
36
36
|
originList[taskIndex].url = file.url;
|
|
37
37
|
} else {
|
|
38
38
|
file.created_at = new Date().getTime();
|
|
39
|
-
originList.
|
|
39
|
+
originList.unshift({ ...file, progress, status: 1 });
|
|
40
40
|
}
|
|
41
41
|
list.value = originList;
|
|
42
42
|
}
|
package/es/index.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, withModifiers, createElementVNode, normalizeClass,
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, withModifiers, createElementVNode, normalizeClass, createVNode, unref, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import thumbCard from "../../../thumbCard/index.js";
|
|
2
3
|
const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "mask" }, null, -1);
|
|
3
4
|
const _hoisted_2 = { class: "card-alias" };
|
|
4
5
|
const _hoisted_3 = {
|
|
@@ -13,13 +14,15 @@ const _sfc_main = defineComponent({
|
|
|
13
14
|
__name: "index",
|
|
14
15
|
props: {
|
|
15
16
|
item: {},
|
|
17
|
+
extraKeys: {},
|
|
16
18
|
selectKeys: {},
|
|
17
19
|
disable: { type: Boolean }
|
|
18
20
|
},
|
|
19
|
-
emits: ["select"],
|
|
21
|
+
emits: ["select", "select-one"],
|
|
20
22
|
setup(__props, { emit: __emit }) {
|
|
21
23
|
const props = __props;
|
|
22
24
|
const emits = __emit;
|
|
25
|
+
const filterOptions = inject("filterOptions");
|
|
23
26
|
const selectedOrder = computed(() => {
|
|
24
27
|
var _a;
|
|
25
28
|
const result = {};
|
|
@@ -33,15 +36,50 @@ const _sfc_main = defineComponent({
|
|
|
33
36
|
return;
|
|
34
37
|
emits("select", props.item);
|
|
35
38
|
}
|
|
39
|
+
function handleOption(params) {
|
|
40
|
+
const { key, item } = params;
|
|
41
|
+
if (key === "select") {
|
|
42
|
+
emits("select-one", item);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const canIUse = computed(() => {
|
|
46
|
+
if (props.disable)
|
|
47
|
+
return false;
|
|
48
|
+
if (filterOptions == null ? void 0 : filterOptions.value) {
|
|
49
|
+
const { mediaType, mediaTypeStrict } = filterOptions.value;
|
|
50
|
+
if (mediaTypeStrict)
|
|
51
|
+
return props.item.catalog === mediaType;
|
|
52
|
+
}
|
|
53
|
+
if (props.item.progress >= 0)
|
|
54
|
+
return false;
|
|
55
|
+
return true;
|
|
56
|
+
});
|
|
57
|
+
const handlersKey = computed(() => {
|
|
58
|
+
var _a;
|
|
59
|
+
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable || !canIUse.value)
|
|
60
|
+
return [];
|
|
61
|
+
return [{ label: "\u9009\u7528", key: "select" }].concat(props.extraKeys || []);
|
|
62
|
+
});
|
|
36
63
|
return (_ctx, _cache) => {
|
|
37
64
|
return openBlock(), createElementBlock("div", {
|
|
38
65
|
class: "card-wrapper-image",
|
|
39
66
|
onClick: withModifiers(handleCheck, ["stop"])
|
|
40
67
|
}, [
|
|
41
68
|
createElementVNode("div", {
|
|
42
|
-
class: normalizeClass(["card-wrapper", { disable:
|
|
69
|
+
class: normalizeClass(["card-wrapper", { disable: !canIUse.value, active: selectedOrder.value[_ctx.item.id] }])
|
|
43
70
|
}, [
|
|
44
|
-
|
|
71
|
+
createVNode(unref(thumbCard), {
|
|
72
|
+
url: _ctx.item.url,
|
|
73
|
+
thumb: _ctx.item.thumb || _ctx.item.url,
|
|
74
|
+
catalog: _ctx.item.catalog,
|
|
75
|
+
meta: _ctx.item,
|
|
76
|
+
options: {
|
|
77
|
+
fit: _ctx.item.catalog === "image" ? "contain" : "cover"
|
|
78
|
+
},
|
|
79
|
+
"use-mask": true,
|
|
80
|
+
"handlers-key": handlersKey.value,
|
|
81
|
+
onHandle: handleOption
|
|
82
|
+
}, null, 8, ["url", "thumb", "catalog", "meta", "options", "handlers-key"]),
|
|
45
83
|
_hoisted_1
|
|
46
84
|
], 2),
|
|
47
85
|
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.item.alias), 1),
|
|
@@ -49,7 +87,7 @@ const _sfc_main = defineComponent({
|
|
|
49
87
|
class: "check-box-wrapper",
|
|
50
88
|
onClick: withModifiers(handleCheck, ["stop"])
|
|
51
89
|
}, [
|
|
52
|
-
selectedOrder.value[_ctx.item.id] ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(selectedOrder.value[_ctx.item.id]), 1)) :
|
|
90
|
+
selectedOrder.value[_ctx.item.id] ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(selectedOrder.value[_ctx.item.id]), 1)) : canIUse.value ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("v-if", true)
|
|
53
91
|
])
|
|
54
92
|
]);
|
|
55
93
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode, unref } from "vue";
|
|
2
2
|
import { Spin } from "@arco-design/web-vue";
|
|
3
3
|
import emptyData from "../../../emptyData/index.js";
|
|
4
|
-
import thumbCard from "../../../thumbCard/index.js";
|
|
5
4
|
import _sfc_main$1 from "../ListCardWrapper/index.js";
|
|
6
5
|
const _hoisted_1 = { class: "card-list-wrapper" };
|
|
7
6
|
const _sfc_main = defineComponent({
|
|
@@ -14,20 +13,7 @@ const _sfc_main = defineComponent({
|
|
|
14
13
|
},
|
|
15
14
|
emits: ["select", "select-one"],
|
|
16
15
|
setup(__props, { emit: __emit }) {
|
|
17
|
-
const props = __props;
|
|
18
16
|
const emits = __emit;
|
|
19
|
-
const handlersKey = computed(() => {
|
|
20
|
-
var _a;
|
|
21
|
-
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable)
|
|
22
|
-
return [];
|
|
23
|
-
return [{ label: "\u9009\u7528", key: "select" }];
|
|
24
|
-
});
|
|
25
|
-
function handleOption(params) {
|
|
26
|
-
const { key, item } = params;
|
|
27
|
-
if (key === "select") {
|
|
28
|
-
emits("select-one", item);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
17
|
return (_ctx, _cache) => {
|
|
32
18
|
var _a, _b;
|
|
33
19
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -37,24 +23,9 @@ const _sfc_main = defineComponent({
|
|
|
37
23
|
item,
|
|
38
24
|
"select-keys": _ctx.selectKeys,
|
|
39
25
|
disable: _ctx.disable,
|
|
40
|
-
onSelect: () => emits("select", item)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
createVNode(unref(thumbCard), {
|
|
44
|
-
url: item.url,
|
|
45
|
-
thumb: item.thumb,
|
|
46
|
-
catalog: item.catalog,
|
|
47
|
-
meta: item,
|
|
48
|
-
"use-mask": true,
|
|
49
|
-
"handlers-key": handlersKey.value,
|
|
50
|
-
options: {
|
|
51
|
-
fit: item.catalog === "image" ? "contain" : "cover"
|
|
52
|
-
},
|
|
53
|
-
onHandle: handleOption
|
|
54
|
-
}, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key", "options"])
|
|
55
|
-
]),
|
|
56
|
-
_: 2
|
|
57
|
-
}, 1032, ["item", "select-keys", "disable", "onSelect"]);
|
|
26
|
+
onSelect: () => emits("select", item),
|
|
27
|
+
onSelectOne: () => emits("select-one", item)
|
|
28
|
+
}, null, 8, ["item", "select-keys", "disable", "onSelect", "onSelectOne"]);
|
|
58
29
|
}), 128)),
|
|
59
30
|
createCommentVNode(" \u7A7A\u72B6\u6001 "),
|
|
60
31
|
((_a = _ctx.list) == null ? void 0 : _a.length) === 0 && _ctx.loading ? (openBlock(), createBlock(unref(Spin), {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, toDisplayString, Fragment, renderList, createBlock
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, toDisplayString, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import _sfc_main$1 from "./components/Upload.js";
|
|
3
3
|
import useUpload from "../../../hooks/useUpload.js";
|
|
4
|
-
import thumbCard from "../../../thumbCard/index.js";
|
|
5
4
|
import _sfc_main$2 from "../ListCardWrapper/index.js";
|
|
6
5
|
const _hoisted_1 = { class: "upload-list-wrapper" };
|
|
7
6
|
const _hoisted_2 = { class: "list-upload" };
|
|
@@ -19,7 +18,6 @@ const _sfc_main = defineComponent({
|
|
|
19
18
|
},
|
|
20
19
|
emits: ["select", "select-one"],
|
|
21
20
|
setup(__props, { emit: __emit }) {
|
|
22
|
-
const props = __props;
|
|
23
21
|
const emits = __emit;
|
|
24
22
|
const userInfo = inject("userInfo");
|
|
25
23
|
const baseAPI = inject("baseAPI");
|
|
@@ -27,18 +25,6 @@ const _sfc_main = defineComponent({
|
|
|
27
25
|
var _a;
|
|
28
26
|
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
29
27
|
});
|
|
30
|
-
const handlersKey = computed(() => {
|
|
31
|
-
var _a;
|
|
32
|
-
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable)
|
|
33
|
-
return [];
|
|
34
|
-
return [{ label: "\u9009\u7528", key: "select" }];
|
|
35
|
-
});
|
|
36
|
-
function handleOption(params) {
|
|
37
|
-
const { key, item } = params;
|
|
38
|
-
if (key === "select") {
|
|
39
|
-
emits("select-one", item);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
28
|
const { list, uploadFile, transcodingFile } = useUpload();
|
|
43
29
|
function handleChange(file) {
|
|
44
30
|
if (!baseAPI || !repoId.value)
|
|
@@ -68,24 +54,9 @@ const _sfc_main = defineComponent({
|
|
|
68
54
|
item,
|
|
69
55
|
"select-keys": _ctx.selectKeys,
|
|
70
56
|
disable: _ctx.disable,
|
|
71
|
-
onSelect: () => emits("select", item)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
createVNode(unref(thumbCard), {
|
|
75
|
-
url: item.url,
|
|
76
|
-
thumb: item.thumb || item.url,
|
|
77
|
-
catalog: item.catalog,
|
|
78
|
-
meta: item,
|
|
79
|
-
options: {
|
|
80
|
-
fit: item.catalog === "image" ? "contain" : "cover"
|
|
81
|
-
},
|
|
82
|
-
"use-mask": true,
|
|
83
|
-
"handlers-key": handlersKey.value,
|
|
84
|
-
onHandle: handleOption
|
|
85
|
-
}, null, 8, ["url", "thumb", "catalog", "meta", "options", "handlers-key"])
|
|
86
|
-
]),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1032, ["item", "select-keys", "disable", "onSelect"]);
|
|
57
|
+
onSelect: () => emits("select", item),
|
|
58
|
+
onSelectOne: () => emits("select-one", item)
|
|
59
|
+
}, null, 8, ["item", "select-keys", "disable", "onSelect", "onSelectOne"]);
|
|
89
60
|
}), 128))
|
|
90
61
|
])
|
|
91
62
|
])
|
|
@@ -56,8 +56,8 @@ const _sfc_main = defineComponent({
|
|
|
56
56
|
const originFilter = {
|
|
57
57
|
catalog: "",
|
|
58
58
|
source: "",
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
created_begin: "",
|
|
60
|
+
created_end: "",
|
|
61
61
|
keyword: "",
|
|
62
62
|
precise_keyword: "",
|
|
63
63
|
upload_by: null,
|
|
@@ -69,16 +69,16 @@ const _sfc_main = defineComponent({
|
|
|
69
69
|
};
|
|
70
70
|
const rangeTime = computed({
|
|
71
71
|
get() {
|
|
72
|
-
return filter.value.
|
|
72
|
+
return filter.value.created_begin && filter.value.created_end ? [filter.value.created_begin * 1e3, filter.value.created_end * 1e3] : null;
|
|
73
73
|
},
|
|
74
74
|
set(val) {
|
|
75
75
|
if (val) {
|
|
76
76
|
const [start, end] = val;
|
|
77
|
-
filter.value.
|
|
78
|
-
filter.value.
|
|
77
|
+
filter.value.created_begin = +new Date(start) / 1e3;
|
|
78
|
+
filter.value.created_end = +new Date(end) / 1e3;
|
|
79
79
|
} else {
|
|
80
|
-
filter.value.
|
|
81
|
-
filter.value.
|
|
80
|
+
filter.value.created_begin = "";
|
|
81
|
+
filter.value.created_end = "";
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
});
|
|
@@ -103,9 +103,7 @@ const _sfc_main = defineComponent({
|
|
|
103
103
|
watch(
|
|
104
104
|
() => searchType.value,
|
|
105
105
|
() => {
|
|
106
|
-
filter.value.
|
|
107
|
-
filter.value.precise_keyword = "";
|
|
108
|
-
filter.value.keyword = "";
|
|
106
|
+
searchInput.value = filter.value.keyword || filter.value.precise_keyword;
|
|
109
107
|
}
|
|
110
108
|
);
|
|
111
109
|
const isEmpty = computed(() => {
|
|
@@ -135,17 +133,15 @@ const _sfc_main = defineComponent({
|
|
|
135
133
|
var _a;
|
|
136
134
|
if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
|
|
137
135
|
filter.value.catalog = props.filterOptions.mediaType;
|
|
136
|
+
if (props.filterOptions.mediaTypeStrict) {
|
|
137
|
+
originFilter.catalog = props.filterOptions.mediaType;
|
|
138
|
+
}
|
|
138
139
|
}
|
|
139
140
|
},
|
|
140
|
-
{ immediate: true }
|
|
141
|
+
{ immediate: true, deep: true }
|
|
141
142
|
);
|
|
142
143
|
onMounted(() => {
|
|
143
|
-
var _a;
|
|
144
144
|
load();
|
|
145
|
-
if (((_a = props.filterOptions) == null ? void 0 : _a.mediaType) && !props.filterOptions.mediaTypeStrict) {
|
|
146
|
-
filter.value.catalog = props.filterOptions.mediaType;
|
|
147
|
-
originFilter.catalog = props.filterOptions.mediaType;
|
|
148
|
-
}
|
|
149
145
|
});
|
|
150
146
|
__expose({
|
|
151
147
|
resetFilter: handleReset
|
|
@@ -18,7 +18,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
18
18
|
docInfo: {},
|
|
19
19
|
pub: { type: Boolean }
|
|
20
20
|
},
|
|
21
|
-
emits: ["update:visible"],
|
|
21
|
+
emits: ["update:visible", "select"],
|
|
22
22
|
setup(__props, { emit: __emit }) {
|
|
23
23
|
const props = __props;
|
|
24
24
|
const emits = __emit;
|
|
@@ -38,6 +38,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
38
38
|
list,
|
|
39
39
|
current
|
|
40
40
|
} = useDocHistory.useDocHistory(BASE_API);
|
|
41
|
+
function handeRevert() {
|
|
42
|
+
emits("select", list.value[current.value]);
|
|
43
|
+
}
|
|
44
|
+
vue.watch(
|
|
45
|
+
() => vis.value,
|
|
46
|
+
(val) => {
|
|
47
|
+
if (!val)
|
|
48
|
+
return;
|
|
49
|
+
loadData();
|
|
50
|
+
},
|
|
51
|
+
{ immediate: true }
|
|
52
|
+
);
|
|
41
53
|
vue.onMounted(() => {
|
|
42
54
|
if (!props.docInfo)
|
|
43
55
|
return;
|
|
@@ -48,12 +60,21 @@ const _sfc_main = vue.defineComponent({
|
|
|
48
60
|
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
|
|
49
61
|
visible: vis.value,
|
|
50
62
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => vis.value = $event),
|
|
51
|
-
"unmount-on-close": "",
|
|
52
63
|
class: "doc-history-drawer",
|
|
53
64
|
title: "\u7248\u672C\u8BB0\u5F55",
|
|
54
|
-
width: 1e3
|
|
55
|
-
footer: false
|
|
65
|
+
width: 1e3
|
|
56
66
|
}, {
|
|
67
|
+
footer: vue.withCtx(() => [
|
|
68
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
69
|
+
type: "primary",
|
|
70
|
+
onClick: handeRevert
|
|
71
|
+
}, {
|
|
72
|
+
default: vue.withCtx(() => [
|
|
73
|
+
vue.createTextVNode("\u8FD8\u539F\u6B64\u7248\u672C")
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
57
78
|
default: vue.withCtx(() => [
|
|
58
79
|
vue.createElementVNode("div", _hoisted_1, [
|
|
59
80
|
vue.unref(list).length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
@@ -6,23 +6,24 @@ var config = require("../config.js");
|
|
|
6
6
|
var PreviewIframe = require("./components/PreviewIframe.js");
|
|
7
7
|
var hook = require("./scripts/hook.js");
|
|
8
8
|
const _hoisted_1 = { class: "preview-close" };
|
|
9
|
-
const _hoisted_2 = { class: "doc-preview-share" };
|
|
10
|
-
const _hoisted_3 = { class: "doc-preview-share
|
|
11
|
-
const _hoisted_4 =
|
|
12
|
-
const _hoisted_5 =
|
|
13
|
-
const _hoisted_6 = { class: "doc-preview-share-
|
|
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 =
|
|
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 = { class: "doc-preview-share-img" };
|
|
12
|
+
const _hoisted_5 = ["src"];
|
|
13
|
+
const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-tips" }, "\u626B\u63CF\u4E8C\u7EF4\u7801\u8BBF\u95EE", -1);
|
|
14
|
+
const _hoisted_7 = { class: "doc-preview-share-header" };
|
|
15
|
+
const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u9884\u89C8\u5730\u5740", -1);
|
|
16
|
+
const _hoisted_9 = { class: "doc-preview-share-link" };
|
|
17
|
+
const _hoisted_10 = { class: "doc-preview-share-link-value" };
|
|
18
|
+
const _hoisted_11 = { class: "doc-preview-share-link-hint" };
|
|
19
|
+
const _hoisted_12 = { class: "doc-preview-share-action" };
|
|
20
|
+
const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-img" }, [
|
|
20
21
|
/* @__PURE__ */ vue.createElementVNode("div", { class: "doc-preview-share-img-hint" }, " \u6682\u65E0\u9884\u89C8 ")
|
|
21
22
|
], -1);
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
23
|
+
const _hoisted_14 = /* @__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);
|
|
24
|
+
const _hoisted_15 = { class: "doc-preview-share-header" };
|
|
25
|
+
const _hoisted_16 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u94FE\u63A5\u6709\u6548\u65F6\u957F", -1);
|
|
26
|
+
const _hoisted_17 = { class: "doc-preview-share-action" };
|
|
26
27
|
const _sfc_main = vue.defineComponent({
|
|
27
28
|
...{ name: "docPreview" },
|
|
28
29
|
__name: "component",
|
|
@@ -58,6 +59,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
58
59
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emits("close"), ["stop"]))
|
|
59
60
|
})
|
|
60
61
|
]),
|
|
62
|
+
_hoisted_2,
|
|
61
63
|
vue.createVNode(PreviewIframe, {
|
|
62
64
|
src: vue.unref(innerUrl),
|
|
63
65
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
@@ -65,20 +67,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
65
67
|
}, null, 8, ["src"]),
|
|
66
68
|
vue.createVNode(vue.unref(webVue.Spin), { loading: vue.unref(loading) }, {
|
|
67
69
|
default: vue.withCtx(() => [
|
|
68
|
-
vue.createElementVNode("div",
|
|
70
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
69
71
|
vue.unref(shareData) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
70
72
|
vue.createCommentVNode(" \u4E8C\u7EF4\u7801 "),
|
|
71
|
-
vue.createElementVNode("div",
|
|
73
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
72
74
|
vue.createElementVNode("img", {
|
|
73
75
|
src: vue.unref(shareData).qrCode,
|
|
74
76
|
alt: ""
|
|
75
|
-
}, null, 8,
|
|
77
|
+
}, null, 8, _hoisted_5)
|
|
76
78
|
]),
|
|
77
79
|
vue.createCommentVNode(" \u5907\u6CE8 "),
|
|
78
|
-
|
|
80
|
+
_hoisted_6,
|
|
79
81
|
vue.createCommentVNode(" \u94FE\u63A5\u524D\u7F6E\u64CD\u4F5C "),
|
|
80
|
-
vue.createElementVNode("div",
|
|
81
|
-
|
|
82
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
83
|
+
_hoisted_8,
|
|
82
84
|
vue.createVNode(vue.unref(webVue.Link), {
|
|
83
85
|
type: "text",
|
|
84
86
|
onClick: vue.unref(copy)
|
|
@@ -90,12 +92,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
90
92
|
}, 8, ["onClick"])
|
|
91
93
|
]),
|
|
92
94
|
vue.createCommentVNode(" \u94FE\u63A5 "),
|
|
93
|
-
vue.createElementVNode("div",
|
|
94
|
-
vue.createElementVNode("div",
|
|
95
|
-
vue.createElementVNode("div",
|
|
95
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
96
|
+
vue.createElementVNode("div", _hoisted_10, vue.toDisplayString(vue.unref(shareData).shareUrl), 1),
|
|
97
|
+
vue.createElementVNode("div", _hoisted_11, " \u94FE\u63A5\u5269\u4F59\u65F6\u95F4\uFF1A" + vue.toDisplayString(vue.unref(intervalTime)), 1)
|
|
96
98
|
]),
|
|
97
99
|
vue.createCommentVNode(" \u64CD\u4F5C "),
|
|
98
|
-
vue.createElementVNode("div",
|
|
100
|
+
vue.createElementVNode("div", _hoisted_12, [
|
|
99
101
|
vue.createVNode(vue.unref(webVue.Button), {
|
|
100
102
|
onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(cancel)())
|
|
101
103
|
}, {
|
|
@@ -115,10 +117,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
115
117
|
})
|
|
116
118
|
])
|
|
117
119
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
118
|
-
_hoisted_12,
|
|
119
120
|
_hoisted_13,
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
_hoisted_14,
|
|
122
|
+
vue.createElementVNode("div", _hoisted_15, [
|
|
123
|
+
_hoisted_16,
|
|
122
124
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
123
125
|
modelValue: vue.unref(expireTime),
|
|
124
126
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(expireTime) ? expireTime.value = $event : null),
|
|
@@ -137,7 +139,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
137
139
|
_: 1
|
|
138
140
|
}, 8, ["modelValue"])
|
|
139
141
|
]),
|
|
140
|
-
vue.createElementVNode("div",
|
|
142
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
141
143
|
vue.createVNode(vue.unref(webVue.Button), {
|
|
142
144
|
type: "primary",
|
|
143
145
|
onClick: _cache[5] || (_cache[5] = () => vue.unref(generate)())
|