@cmstops/pro-compo 0.3.2 → 0.3.4
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 +85 -2
- package/dist/index.min.css +1 -1
- package/es/contentDetailList/component.js +12 -5
- package/es/contentDetailList/components/Content/DocItem/index.js +14 -8
- package/es/contentDetailList/components/Content/index.js +4 -2
- package/es/contentDetailList/components/Doc/index.js +4 -2
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.js +265 -0
- package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/index.js +66 -0
- package/es/contentDetailList/script/api.d.ts +6 -0
- package/es/contentDetailList/script/api.js +16 -0
- package/es/contentDetailList/style/QrCodeView.less +93 -0
- package/es/contentDetailList/style/ShowQRCode.less +3 -0
- package/es/contentDetailList/style/index.css +83 -0
- package/es/contentDetailList/style/index.less +2 -0
- package/es/contentModal/style/columnTree.less +1 -1
- package/es/contentModal/style/index.css +2 -2
- package/es/contentModal/style/index.less +6 -2
- package/es/hooks/usePopper.js +19 -1
- package/es/index.css +85 -2
- package/es/utils/date.d.ts +3 -0
- package/es/utils/date.js +27 -0
- package/lib/contentDetailList/component.js +12 -5
- package/lib/contentDetailList/components/Content/DocItem/index.js +9 -3
- package/lib/contentDetailList/components/Content/index.js +4 -2
- package/lib/contentDetailList/components/Doc/index.js +4 -2
- package/lib/contentDetailList/components/ShowQRCode/QrcodeView/index.js +271 -0
- package/lib/contentDetailList/components/ShowQRCode/index.js +67 -0
- package/lib/contentDetailList/script/api.js +19 -0
- package/lib/contentDetailList/style/QrCodeView.less +93 -0
- package/lib/contentDetailList/style/ShowQRCode.less +3 -0
- package/lib/contentDetailList/style/index.css +83 -0
- package/lib/contentDetailList/style/index.less +2 -0
- package/lib/contentModal/style/columnTree.less +1 -1
- package/lib/contentModal/style/index.css +2 -2
- package/lib/contentModal/style/index.less +6 -2
- package/lib/hooks/usePopper.js +19 -1
- package/lib/index.css +85 -2
- package/lib/utils/date.js +29 -0
- package/package.json +5 -2
|
@@ -97,7 +97,8 @@ const _sfc_main = defineComponent({
|
|
|
97
97
|
index: {},
|
|
98
98
|
abttrites: {},
|
|
99
99
|
extraAttrs: {},
|
|
100
|
-
parmas: {}
|
|
100
|
+
parmas: {},
|
|
101
|
+
BASE_API: {}
|
|
101
102
|
},
|
|
102
103
|
emits: [
|
|
103
104
|
"cellMouseEnter",
|
|
@@ -127,6 +128,7 @@ const _sfc_main = defineComponent({
|
|
|
127
128
|
item: { ..._ctx.item, index: _ctx.index },
|
|
128
129
|
abttrites: _ctx.abttrites,
|
|
129
130
|
extraAttrs: _ctx.extraAttrs,
|
|
131
|
+
BASE_API: _ctx.BASE_API,
|
|
130
132
|
onClickTitle: clickTitle,
|
|
131
133
|
onCellMouseEnter: cellMouseEnter,
|
|
132
134
|
onCellMouseLeave: cellMouseLeave
|
|
@@ -163,7 +165,7 @@ const _sfc_main = defineComponent({
|
|
|
163
165
|
})
|
|
164
166
|
]),
|
|
165
167
|
_: 3
|
|
166
|
-
}, 8, ["item", "abttrites", "extraAttrs"])) : _ctx.item.catalog === "contentList" && _ctx.item.list_type === 7 && _ctx.item.target_type === 6 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
168
|
+
}, 8, ["item", "abttrites", "extraAttrs", "BASE_API"])) : _ctx.item.catalog === "contentList" && _ctx.item.list_type === 7 && _ctx.item.target_type === 6 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
167
169
|
createCommentVNode(" \u7EC4\u4EF6 "),
|
|
168
170
|
(openBlock(), createBlock(_sfc_main$2, {
|
|
169
171
|
key: `compo-${_ctx.item.post_id}`,
|
|
@@ -6,7 +6,8 @@ const _sfc_main = defineComponent({
|
|
|
6
6
|
abttrites: {},
|
|
7
7
|
extraAttrs: {},
|
|
8
8
|
item: {},
|
|
9
|
-
index: {}
|
|
9
|
+
index: {},
|
|
10
|
+
BASE_API: {}
|
|
10
11
|
},
|
|
11
12
|
emits: ["cellMouseEnter", "cellMouseLeave", "clickTitle"],
|
|
12
13
|
setup(__props, { emit: __emit }) {
|
|
@@ -25,6 +26,7 @@ const _sfc_main = defineComponent({
|
|
|
25
26
|
item: _ctx.item,
|
|
26
27
|
abttrites: _ctx.abttrites,
|
|
27
28
|
extraAttrs: _ctx.extraAttrs,
|
|
29
|
+
BASE_API: _ctx.BASE_API,
|
|
28
30
|
onClickTitle: clickTitle,
|
|
29
31
|
onCellMouseEnter: cellMouseEnter,
|
|
30
32
|
onCellMouseLeave: cellMouseLeave
|
|
@@ -48,7 +50,7 @@ const _sfc_main = defineComponent({
|
|
|
48
50
|
})
|
|
49
51
|
]),
|
|
50
52
|
_: 3
|
|
51
|
-
}, 8, ["item", "abttrites", "extraAttrs"]);
|
|
53
|
+
}, 8, ["item", "abttrites", "extraAttrs", "BASE_API"]);
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
});
|
|
File without changes
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, openBlock, createElementBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, toDisplayString, createTextVNode, nextTick } from "vue";
|
|
2
|
+
import { Spin, Select, Option, Button, Message } from "@arco-design/web-vue";
|
|
3
|
+
import { IconQrcode } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import html2canvas from "html2canvas";
|
|
5
|
+
import QRCode from "qrcodejs2";
|
|
6
|
+
import { getSpaceDate } from "../../../../utils/date.js";
|
|
7
|
+
import { generateDocPreviewLink } from "../../../script/api.js";
|
|
8
|
+
const _hoisted_1 = { class: "preview-qrcode-iframe-container-v" };
|
|
9
|
+
const _hoisted_2 = { class: "doc-qrcode-preview-container-v" };
|
|
10
|
+
const _hoisted_3 = ["id"];
|
|
11
|
+
const _hoisted_4 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "qrcode"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_5 = { class: "no-pub" };
|
|
16
|
+
const _hoisted_6 = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "qrcode"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_7 = {
|
|
21
|
+
key: 2,
|
|
22
|
+
class: "qrcode-hint"
|
|
23
|
+
};
|
|
24
|
+
const _hoisted_8 = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "setting"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_9 = /* @__PURE__ */ createElementVNode("span", { class: "label" }, "\u94FE\u63A5\u6709\u6548\u65F6\u957F", -1);
|
|
29
|
+
const _hoisted_10 = {
|
|
30
|
+
key: 4,
|
|
31
|
+
class: "time-go"
|
|
32
|
+
};
|
|
33
|
+
const _hoisted_11 = {
|
|
34
|
+
key: 5,
|
|
35
|
+
class: "time-go"
|
|
36
|
+
};
|
|
37
|
+
const _hoisted_12 = { class: "btns" };
|
|
38
|
+
const _sfc_main = defineComponent({
|
|
39
|
+
__name: "index",
|
|
40
|
+
props: {
|
|
41
|
+
docData: {},
|
|
42
|
+
BASE_API: {}
|
|
43
|
+
},
|
|
44
|
+
setup(__props) {
|
|
45
|
+
const props = __props;
|
|
46
|
+
const qrcode = ref();
|
|
47
|
+
const dataInfo = ref(null);
|
|
48
|
+
const expirationOptions = ref([
|
|
49
|
+
{ label: "1\u5C0F\u65F6", value: 60 * 60 },
|
|
50
|
+
{ label: "6\u5C0F\u65F6", value: 60 * 60 * 6 },
|
|
51
|
+
{ label: "12\u5C0F\u65F6", value: 60 * 60 * 12 },
|
|
52
|
+
{ label: "24\u5C0F\u65F6", value: 60 * 60 * 24 },
|
|
53
|
+
{ label: "3\u5929", value: 60 * 60 * 24 * 3 },
|
|
54
|
+
{ label: "7\u5929", value: 60 * 60 * 24 * 7 },
|
|
55
|
+
{ label: "15\u5929", value: 60 * 60 * 24 * 15 },
|
|
56
|
+
{ label: "30\u5929", value: 60 * 60 * 24 * 30 }
|
|
57
|
+
]);
|
|
58
|
+
const expiration = ref(60 * 60 * 24);
|
|
59
|
+
const loading = ref(false);
|
|
60
|
+
const interval = ref(null);
|
|
61
|
+
const time = ref("");
|
|
62
|
+
const local_url = ref("");
|
|
63
|
+
const is_publish = computed(() => {
|
|
64
|
+
var _a;
|
|
65
|
+
return dataInfo.value && [14, 15, 19].includes((_a = dataInfo.value) == null ? void 0 : _a.state);
|
|
66
|
+
});
|
|
67
|
+
const is_share = computed(() => {
|
|
68
|
+
var _a;
|
|
69
|
+
return (_a = dataInfo == null ? void 0 : dataInfo.value) == null ? void 0 : _a.share;
|
|
70
|
+
});
|
|
71
|
+
const dynamicQRId = computed(() => {
|
|
72
|
+
var _a;
|
|
73
|
+
return `qrcode-${(_a = dataInfo.value) == null ? void 0 : _a.id}`;
|
|
74
|
+
});
|
|
75
|
+
const showGetLink = computed(() => {
|
|
76
|
+
return !is_share.value || !is_publish.value && is_share.value && !is_share.value.expired_at;
|
|
77
|
+
});
|
|
78
|
+
const needLoadQR = computed(() => {
|
|
79
|
+
var _a;
|
|
80
|
+
const flag = false;
|
|
81
|
+
if (is_publish.value)
|
|
82
|
+
return true;
|
|
83
|
+
if (is_share.value && ((_a = is_share.value) == null ? void 0 : _a.expired_at))
|
|
84
|
+
return true;
|
|
85
|
+
return flag;
|
|
86
|
+
});
|
|
87
|
+
const clip = (data) => {
|
|
88
|
+
const clipboard = typeof data === "string" ? navigator.clipboard.writeText(data) : navigator.clipboard.write(data);
|
|
89
|
+
clipboard.then(
|
|
90
|
+
() => {
|
|
91
|
+
Message.success({
|
|
92
|
+
content: "\u5DF2\u4FDD\u5B58\u5230\u7C98\u8D34\u677F"
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
() => {
|
|
96
|
+
Message.success({
|
|
97
|
+
content: "\u4FDD\u5B58\u5931\u8D25"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
const clipUrl = (type) => {
|
|
103
|
+
if (!dataInfo.value.share.share_url)
|
|
104
|
+
return;
|
|
105
|
+
if (type === "text") {
|
|
106
|
+
clip(dataInfo.value.share.share_url);
|
|
107
|
+
} else {
|
|
108
|
+
const img = document.querySelector(`#${dynamicQRId.value} img`);
|
|
109
|
+
html2canvas(img).then((canvas) => {
|
|
110
|
+
canvas.toBlob((blob) => {
|
|
111
|
+
const data = [new ClipboardItem({ [blob.type]: blob })];
|
|
112
|
+
clip(data);
|
|
113
|
+
}, "image/png");
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const genTimeLink = async (expiration2, force = true, tip = true) => {
|
|
118
|
+
loading.value = true;
|
|
119
|
+
const data = {
|
|
120
|
+
force,
|
|
121
|
+
hash_id: dataInfo.value.hash_id || dataInfo.value.hashid
|
|
122
|
+
};
|
|
123
|
+
if (expiration2) {
|
|
124
|
+
data.expiration = expiration2;
|
|
125
|
+
}
|
|
126
|
+
const { code, message } = await generateDocPreviewLink(props.BASE_API, data);
|
|
127
|
+
if (code === 0) {
|
|
128
|
+
if (expiration2 || !force) {
|
|
129
|
+
tip && Message.success("\u94FE\u63A5\u751F\u6210\u6210\u529F");
|
|
130
|
+
dataInfo.value.share = message;
|
|
131
|
+
const reqTime = `${new Date().getTime()}`;
|
|
132
|
+
local_url.value = `${message.inner_url}?reqTime=${reqTime}`;
|
|
133
|
+
nextTick(() => {
|
|
134
|
+
loadQrcode(`${message.inner_url}?reqTime=${reqTime}`);
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
loading.value = false;
|
|
137
|
+
}, 500);
|
|
138
|
+
});
|
|
139
|
+
} else {
|
|
140
|
+
Message.success("\u5DF2\u53D6\u6D88\u9884\u89C8\u94FE\u63A5");
|
|
141
|
+
dataInfo.value.share = null;
|
|
142
|
+
qrcode.value.innerHTML = "";
|
|
143
|
+
clearInterval(interval.value);
|
|
144
|
+
interval.value = null;
|
|
145
|
+
time.value = 0;
|
|
146
|
+
}
|
|
147
|
+
} else {
|
|
148
|
+
Message.error(message);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const loadQrcode = (url) => {
|
|
152
|
+
new QRCode(dynamicQRId.value, {
|
|
153
|
+
width: 200,
|
|
154
|
+
height: 200,
|
|
155
|
+
text: url
|
|
156
|
+
});
|
|
157
|
+
if (dataInfo.value.share.expired_at) {
|
|
158
|
+
interval.value = setInterval(() => {
|
|
159
|
+
time.value = getSpaceDate(dataInfo.value.share.expired_at);
|
|
160
|
+
}, 1e3);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
onMounted(() => {
|
|
164
|
+
dataInfo.value = props.docData;
|
|
165
|
+
console.log(1111, dataInfo.value);
|
|
166
|
+
if (needLoadQR.value) {
|
|
167
|
+
genTimeLink(60 * 60 * 24, false, false);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
onBeforeUnmount(() => {
|
|
171
|
+
if (interval.value) {
|
|
172
|
+
clearInterval(interval.value);
|
|
173
|
+
interval.value = null;
|
|
174
|
+
time.value = "";
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return (_ctx, _cache) => {
|
|
178
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
179
|
+
createCommentVNode(" \u9884\u89C8\u624B\u673A\u626B\u7801 "),
|
|
180
|
+
createVNode(unref(Spin), {
|
|
181
|
+
loading: loading.value,
|
|
182
|
+
style: { "width": "100%", "height": "100%" }
|
|
183
|
+
}, {
|
|
184
|
+
default: withCtx(() => [
|
|
185
|
+
createElementVNode("div", _hoisted_2, [
|
|
186
|
+
is_share.value ? (openBlock(), createElementBlock("div", {
|
|
187
|
+
key: 0,
|
|
188
|
+
id: dynamicQRId.value,
|
|
189
|
+
ref_key: "qrcode",
|
|
190
|
+
ref: qrcode,
|
|
191
|
+
class: "qrcode"
|
|
192
|
+
}, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
193
|
+
!is_publish.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
194
|
+
createElementVNode("div", _hoisted_5, [
|
|
195
|
+
createVNode(unref(IconQrcode), { size: 200 })
|
|
196
|
+
])
|
|
197
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_6, "\u6682\u65E0\u4E8C\u7EF4\u7801"))
|
|
198
|
+
], 64)),
|
|
199
|
+
is_share.value ? (openBlock(), createElementBlock("div", _hoisted_7, "\u626B\u63CF\u4E8C\u7EF4\u7801\u8BBF\u95EE")) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
200
|
+
_hoisted_9,
|
|
201
|
+
createElementVNode("span", null, [
|
|
202
|
+
createVNode(unref(Select), {
|
|
203
|
+
modelValue: expiration.value,
|
|
204
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => expiration.value = $event),
|
|
205
|
+
size: "mini",
|
|
206
|
+
placeholder: "\u8BF7\u9009\u62E9"
|
|
207
|
+
}, {
|
|
208
|
+
default: withCtx(() => [
|
|
209
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(expirationOptions.value, (time2, index) => {
|
|
210
|
+
return openBlock(), createBlock(unref(Option), {
|
|
211
|
+
key: index,
|
|
212
|
+
label: time2.label,
|
|
213
|
+
value: time2.value
|
|
214
|
+
}, null, 8, ["label", "value"]);
|
|
215
|
+
}), 128))
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 8, ["modelValue"])
|
|
219
|
+
])
|
|
220
|
+
])),
|
|
221
|
+
is_share.value && time.value ? (openBlock(), createElementBlock("div", _hoisted_10, "\u94FE\u63A5\u5269\u4F59\u65F6\u95F4: " + toDisplayString(time.value), 1)) : is_share.value && time.value === 0 ? (openBlock(), createElementBlock("div", _hoisted_11, "\u94FE\u63A5\u5DF2\u8FC7\u671F")) : createCommentVNode("v-if", true),
|
|
222
|
+
createElementVNode("div", _hoisted_12, [
|
|
223
|
+
showGetLink.value ? (openBlock(), createBlock(unref(Button), {
|
|
224
|
+
key: 0,
|
|
225
|
+
type: "primary",
|
|
226
|
+
light: "",
|
|
227
|
+
onClick: _cache[1] || (_cache[1] = ($event) => genTimeLink(expiration.value))
|
|
228
|
+
}, {
|
|
229
|
+
default: withCtx(() => [
|
|
230
|
+
createTextVNode("\u751F\u6210\u9884\u89C8\u94FE\u63A5")
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
234
|
+
createVNode(unref(Button), {
|
|
235
|
+
class: "auto",
|
|
236
|
+
light: "",
|
|
237
|
+
onClick: _cache[2] || (_cache[2] = ($event) => clipUrl("img"))
|
|
238
|
+
}, {
|
|
239
|
+
default: withCtx(() => [
|
|
240
|
+
createTextVNode("\u590D\u5236\u4E8C\u7EF4\u7801")
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
}),
|
|
244
|
+
createVNode(unref(Button), {
|
|
245
|
+
class: "auto",
|
|
246
|
+
type: "primary",
|
|
247
|
+
light: "",
|
|
248
|
+
onClick: _cache[3] || (_cache[3] = ($event) => clipUrl("text"))
|
|
249
|
+
}, {
|
|
250
|
+
default: withCtx(() => [
|
|
251
|
+
createTextVNode(toDisplayString(time.value ? "\u590D\u5236\u9884\u89C8\u5730\u5740" : "\u590D\u5236\u8BBF\u95EE\u5730\u5740"), 1)
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
})
|
|
255
|
+
], 64))
|
|
256
|
+
])
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["loading"])
|
|
261
|
+
]);
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, withModifiers, createCommentVNode, createElementVNode, createVNode } from "vue";
|
|
2
|
+
import { Popover, Tooltip } from "@arco-design/web-vue";
|
|
3
|
+
import { IconQrcode } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { getDocDetailsNew } from "../../script/api.js";
|
|
5
|
+
import _sfc_main$1 from "./QrcodeView/index.js";
|
|
6
|
+
const _hoisted_1 = { class: "qr-code" };
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
item: {},
|
|
11
|
+
BASE_API: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const docData = ref(null);
|
|
16
|
+
const showQR = ref(false);
|
|
17
|
+
const getDocDetail = async () => {
|
|
18
|
+
const { code, message } = await getDocDetailsNew(props.BASE_API, {
|
|
19
|
+
hashid: props.item.hashid || props.item.hash_id
|
|
20
|
+
});
|
|
21
|
+
if (code === 0 && message) {
|
|
22
|
+
docData.value = { ...props.item, share: message.preview };
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const openPopover = () => {
|
|
26
|
+
getDocDetail();
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
showQR.value = true;
|
|
29
|
+
}, 500);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createBlock(unref(Popover), {
|
|
33
|
+
position: "bottom",
|
|
34
|
+
trigger: "hover",
|
|
35
|
+
onShow: openPopover,
|
|
36
|
+
onHide: _cache[1] || (_cache[1] = ($event) => showQR.value = false)
|
|
37
|
+
}, {
|
|
38
|
+
content: withCtx(() => [
|
|
39
|
+
showQR.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
40
|
+
key: 0,
|
|
41
|
+
BASE_API: _ctx.BASE_API,
|
|
42
|
+
docData: docData.value || props.item,
|
|
43
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
44
|
+
}, ["stop"]))
|
|
45
|
+
}, null, 8, ["BASE_API", "docData"])) : createCommentVNode("v-if", true)
|
|
46
|
+
]),
|
|
47
|
+
default: withCtx(() => [
|
|
48
|
+
createElementVNode("section", _hoisted_1, [
|
|
49
|
+
createVNode(unref(Tooltip), {
|
|
50
|
+
effect: "dark",
|
|
51
|
+
content: "\u70B9\u51FB\u53EF\u67E5\u770B\u5185\u5BB9\u5206\u4EAB\u4E8C\u7EF4\u7801",
|
|
52
|
+
position: "top"
|
|
53
|
+
}, {
|
|
54
|
+
default: withCtx(() => [
|
|
55
|
+
createVNode(unref(IconQrcode))
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
})
|
|
59
|
+
])
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare function generateDocPreviewLink(BASE_API: string, query?: Params): import("axios").AxiosPromise<any>;
|
|
5
|
+
export declare function getDocDetailsNew(BASE_API: string, query?: Params): import("axios").AxiosPromise<any>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import request from "../../utils/request.js";
|
|
2
|
+
function generateDocPreviewLink(BASE_API, query) {
|
|
3
|
+
return request(BASE_API, {
|
|
4
|
+
url: "/poplar/v3/preview/document/generate",
|
|
5
|
+
method: "post",
|
|
6
|
+
data: query
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function getDocDetailsNew(BASE_API, query) {
|
|
10
|
+
const url = `/poplar/v3/document/${query == null ? void 0 : query.hashid}`;
|
|
11
|
+
return request(BASE_API, {
|
|
12
|
+
url,
|
|
13
|
+
method: "get"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { generateDocPreviewLink, getDocDetailsNew };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
.doc-qrcode-preview-container-v {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 10px;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
margin: auto;
|
|
8
|
+
color: #4e5969;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
background: white;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
|
|
13
|
+
.qrcode {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
width: 200px;
|
|
18
|
+
height: 200px;
|
|
19
|
+
color: #4886ff;
|
|
20
|
+
background: #edf3ff;
|
|
21
|
+
|
|
22
|
+
.no-pub {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
|
|
27
|
+
&::after {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: calc(100% - 40px);
|
|
35
|
+
height: 100%;
|
|
36
|
+
padding: 0 20px;
|
|
37
|
+
color: #fff;
|
|
38
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
39
|
+
content: '内容暂未发布,如需链接预览请在下方生成临时预览链接';
|
|
40
|
+
// z-index: 2;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.qrcode-hint {
|
|
46
|
+
opacity: 0.6;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.setting {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
width: 100%;
|
|
54
|
+
|
|
55
|
+
.label {
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.a-select {
|
|
60
|
+
width: 100px;
|
|
61
|
+
|
|
62
|
+
.a-input__inner {
|
|
63
|
+
color: #86909c;
|
|
64
|
+
text-align: center;
|
|
65
|
+
background: #f3f4f5;
|
|
66
|
+
border: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.btns {
|
|
72
|
+
display: flex;
|
|
73
|
+
gap: 10px;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
width: 100%;
|
|
76
|
+
|
|
77
|
+
.arco-btn {
|
|
78
|
+
width: 100%;
|
|
79
|
+
margin-left: 0;
|
|
80
|
+
padding: 10px 5px;
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
|
|
83
|
+
&.auto {
|
|
84
|
+
flex: 1;
|
|
85
|
+
width: auto;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.time-go {
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1115,6 +1115,89 @@
|
|
|
1115
1115
|
margin-right: 20px;
|
|
1116
1116
|
text-align: end;
|
|
1117
1117
|
}
|
|
1118
|
+
.qr-code {
|
|
1119
|
+
margin-right: 5px;
|
|
1120
|
+
}
|
|
1121
|
+
.doc-qrcode-preview-container-v {
|
|
1122
|
+
display: flex;
|
|
1123
|
+
flex-direction: column;
|
|
1124
|
+
gap: 10px;
|
|
1125
|
+
align-items: center;
|
|
1126
|
+
justify-content: center;
|
|
1127
|
+
margin: auto;
|
|
1128
|
+
color: #4e5969;
|
|
1129
|
+
font-size: 14px;
|
|
1130
|
+
background: white;
|
|
1131
|
+
border-radius: 6px;
|
|
1132
|
+
}
|
|
1133
|
+
.doc-qrcode-preview-container-v .qrcode {
|
|
1134
|
+
display: flex;
|
|
1135
|
+
align-items: center;
|
|
1136
|
+
justify-content: center;
|
|
1137
|
+
width: 200px;
|
|
1138
|
+
height: 200px;
|
|
1139
|
+
color: #4886ff;
|
|
1140
|
+
background: #edf3ff;
|
|
1141
|
+
}
|
|
1142
|
+
.doc-qrcode-preview-container-v .qrcode .no-pub {
|
|
1143
|
+
position: relative;
|
|
1144
|
+
width: 100%;
|
|
1145
|
+
height: 100%;
|
|
1146
|
+
}
|
|
1147
|
+
.doc-qrcode-preview-container-v .qrcode .no-pub::after {
|
|
1148
|
+
position: absolute;
|
|
1149
|
+
top: 0;
|
|
1150
|
+
left: 0;
|
|
1151
|
+
display: flex;
|
|
1152
|
+
align-items: center;
|
|
1153
|
+
justify-content: center;
|
|
1154
|
+
width: calc(100% - 40px);
|
|
1155
|
+
height: 100%;
|
|
1156
|
+
padding: 0 20px;
|
|
1157
|
+
color: #fff;
|
|
1158
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
1159
|
+
content: '内容暂未发布,如需链接预览请在下方生成临时预览链接';
|
|
1160
|
+
}
|
|
1161
|
+
.doc-qrcode-preview-container-v .qrcode-hint {
|
|
1162
|
+
opacity: 0.6;
|
|
1163
|
+
}
|
|
1164
|
+
.doc-qrcode-preview-container-v .setting {
|
|
1165
|
+
display: flex;
|
|
1166
|
+
align-items: center;
|
|
1167
|
+
justify-content: space-between;
|
|
1168
|
+
width: 100%;
|
|
1169
|
+
}
|
|
1170
|
+
.doc-qrcode-preview-container-v .setting .label {
|
|
1171
|
+
font-weight: 500;
|
|
1172
|
+
}
|
|
1173
|
+
.doc-qrcode-preview-container-v .setting .a-select {
|
|
1174
|
+
width: 100px;
|
|
1175
|
+
}
|
|
1176
|
+
.doc-qrcode-preview-container-v .setting .a-select .a-input__inner {
|
|
1177
|
+
color: #86909c;
|
|
1178
|
+
text-align: center;
|
|
1179
|
+
background: #f3f4f5;
|
|
1180
|
+
border: none;
|
|
1181
|
+
}
|
|
1182
|
+
.doc-qrcode-preview-container-v .btns {
|
|
1183
|
+
display: flex;
|
|
1184
|
+
gap: 10px;
|
|
1185
|
+
justify-content: space-between;
|
|
1186
|
+
width: 100%;
|
|
1187
|
+
}
|
|
1188
|
+
.doc-qrcode-preview-container-v .btns .arco-btn {
|
|
1189
|
+
width: 100%;
|
|
1190
|
+
margin-left: 0;
|
|
1191
|
+
padding: 10px 5px;
|
|
1192
|
+
font-size: 14px;
|
|
1193
|
+
}
|
|
1194
|
+
.doc-qrcode-preview-container-v .btns .arco-btn.auto {
|
|
1195
|
+
flex: 1;
|
|
1196
|
+
width: auto;
|
|
1197
|
+
}
|
|
1198
|
+
.doc-qrcode-preview-container-v .time-go {
|
|
1199
|
+
font-size: 12px;
|
|
1200
|
+
}
|
|
1118
1201
|
.gray-for-state-hide {
|
|
1119
1202
|
-webkit-filter: grayscale(100%);
|
|
1120
1203
|
-moz-filter: grayscale(100%);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
padding: 0 15px;
|
|
3
3
|
}
|
|
4
4
|
.column-selection-popover-content {
|
|
5
|
-
padding: 0;
|
|
5
|
+
padding: 0 !important;
|
|
6
6
|
}
|
|
7
7
|
.column-selection-popover-content .search-column {
|
|
8
8
|
margin-bottom: 4px;
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
border-bottom: none;
|
|
168
168
|
}
|
|
169
169
|
.add-content-modal-body {
|
|
170
|
-
padding: 0;
|
|
171
170
|
height: 70vh;
|
|
171
|
+
padding: 0 !important;
|
|
172
172
|
}
|
|
173
173
|
.add-content-modal-body .content-tabs {
|
|
174
174
|
height: 100%;
|
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
@import './MediaFilter.less';
|
|
3
3
|
@import './storeBox.less';
|
|
4
4
|
@import './ViewAllColumn.less';
|
|
5
|
+
|
|
5
6
|
.add-content-modal-wrapper {
|
|
6
7
|
.arco-modal-header {
|
|
7
8
|
border-bottom: none;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
.add-content-modal-body {
|
|
11
|
-
padding: 0;
|
|
12
13
|
height: 70vh;
|
|
14
|
+
padding: 0 !important;
|
|
15
|
+
|
|
13
16
|
.content-tabs {
|
|
14
17
|
height: 100%;
|
|
15
18
|
}
|
|
19
|
+
|
|
16
20
|
.arco-tabs-content {
|
|
17
21
|
padding-top: 0;
|
|
18
22
|
}
|
|
19
|
-
}
|
|
23
|
+
}
|
package/es/hooks/usePopper.js
CHANGED
|
@@ -17,8 +17,26 @@ function usePopper(pannel, triggerEl) {
|
|
|
17
17
|
const initPopper = (placement = "bottom-start") => {
|
|
18
18
|
if (!pannel.value || !triggerEl.value)
|
|
19
19
|
return;
|
|
20
|
+
const offset = [0, 10];
|
|
21
|
+
if (window.__POWERED_BY_WUJIE__) {
|
|
22
|
+
offset[1] = -54;
|
|
23
|
+
}
|
|
20
24
|
createPopper(triggerEl.value, pannel.value, {
|
|
21
|
-
placement
|
|
25
|
+
placement,
|
|
26
|
+
modifiers: [
|
|
27
|
+
{
|
|
28
|
+
name: "computeStyles",
|
|
29
|
+
options: {
|
|
30
|
+
gpuAcceleration: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "offset",
|
|
35
|
+
options: {
|
|
36
|
+
offset
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
22
40
|
});
|
|
23
41
|
};
|
|
24
42
|
return {
|