@nebulars/sseengine 1.3.62 → 1.3.64
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/package.json
CHANGED
|
@@ -50,13 +50,8 @@ export default {
|
|
|
50
50
|
|
|
51
51
|
// All
|
|
52
52
|
if (checked) {
|
|
53
|
-
// Get Snaps
|
|
54
|
-
const snaps = $('[data-checked]')
|
|
55
|
-
.map((_, e) => $(e).data())
|
|
56
|
-
.get();
|
|
57
|
-
|
|
58
53
|
// Checked All
|
|
59
|
-
await this.$store.dispatch('sseengine/SNAP_ALL'
|
|
54
|
+
await this.$store.dispatch('sseengine/SNAP_ALL');
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
// Empty
|
|
@@ -70,7 +65,7 @@ export default {
|
|
|
70
65
|
methods: {
|
|
71
66
|
async sharingHandler() {
|
|
72
67
|
if (!this.$store.state.sseengine.choosen.length) {
|
|
73
|
-
return this.$util.toast.info('
|
|
68
|
+
return this.$util.toast.info('请选择问答');
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
const link = await this.$store.dispatch('sseengine/SNAP_SHARING', { session_id: this.app.id, title: this.sseengine.info.title });
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
<template>
|
|
32
32
|
<div class="fqa-flip" :class="{ freeze }">
|
|
33
|
-
<a-space class="fqa-flip-controller">
|
|
33
|
+
<a-space class="fqa-flip-controller" :class="{ notouch: sseengine.mode === 'snap' }">
|
|
34
34
|
<fqa-icon :class="{ 'fqa-flip-prev': true, 'fqa-flip-disabled': active <= min }" icon="LeftOutlined" @click="prev" />
|
|
35
35
|
<div class="fqa-flip-pagination">{{ active }} / {{ max }}</div>
|
|
36
36
|
<fqa-icon :class="{ 'fqa-flip-next': true, 'fqa-flip-disabled': active >= max }" icon="RightOutlined" @click="next" />
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: row;
|
|
22
22
|
|
|
23
|
+
height: 30px;
|
|
23
24
|
padding: 0 @atom;
|
|
24
25
|
margin-left: auto;
|
|
25
26
|
transition: all @fast;
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
<div v-else class="fqa-query-content">{{ item.content }}</div>
|
|
96
97
|
|
|
97
98
|
<!-- Control -->
|
|
98
|
-
<div class="fqa-query-control" :class="{ hover: app.mobile }" v-if="!editable && !sseengine.produce">
|
|
99
|
+
<div class="fqa-query-control" :class="{ hover: app.mobile, notouch: sseengine.mode === 'snap' }" v-if="!editable && !sseengine.produce">
|
|
99
100
|
<!-- Copy -->
|
|
100
101
|
<fqa-button :size="30" hover="#e7e8e9" v-clipboard:copy="item.content" v-clipboard:success="copySuccess">
|
|
101
102
|
<fqa-icon :icon="copied ? 'CheckOutlined' : 'CopyOutlined'" />
|
package/src/store/snap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default ({ http, link }) => {
|
|
1
|
+
export default ({ $, http, link }) => {
|
|
2
2
|
return {
|
|
3
3
|
async SNAP_MODE({}, mode = 'snap') {
|
|
4
4
|
return { mode };
|
|
@@ -39,10 +39,20 @@ export default ({ http, link }) => {
|
|
|
39
39
|
return { choosen };
|
|
40
40
|
},
|
|
41
41
|
|
|
42
|
-
async SNAP_ALL({ dispatch }, group
|
|
42
|
+
async SNAP_ALL({ dispatch }, group) {
|
|
43
|
+
// Group Reset
|
|
44
|
+
group = group || (await dispatch('SNAP_GROUP'));
|
|
45
|
+
|
|
46
|
+
// Group Loop
|
|
43
47
|
group.forEach(async item => await dispatch('SNAP_ADD', item));
|
|
44
48
|
},
|
|
45
49
|
|
|
50
|
+
async SNAP_GROUP({}) {
|
|
51
|
+
return $('[data-checked]')
|
|
52
|
+
.map((_, e) => $(e).data())
|
|
53
|
+
.get();
|
|
54
|
+
},
|
|
55
|
+
|
|
46
56
|
async SNAP_CLEAN({ state }) {
|
|
47
57
|
// Set Empty Choosen
|
|
48
58
|
const choosen = [];
|
package/src/store/tub.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
1
|
+
export default ({ http, closest, copy, toimg, download, excel, time, toast, blob, $ }) => {
|
|
2
2
|
return {
|
|
3
3
|
async TUB_FULLSCREEN({ state }, { table }) {
|
|
4
4
|
// Set Cloner
|
|
@@ -30,7 +30,23 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
30
30
|
const snap = await dispatch('SNAP_CREATE', table);
|
|
31
31
|
|
|
32
32
|
// Set Snapshot
|
|
33
|
-
const snapshot =
|
|
33
|
+
const snapshot = false;
|
|
34
|
+
|
|
35
|
+
// Set Image
|
|
36
|
+
const image = blob(snap);
|
|
37
|
+
|
|
38
|
+
// Copy
|
|
39
|
+
// copy(image);
|
|
40
|
+
|
|
41
|
+
// Copy Image
|
|
42
|
+
await navigator.clipboard.write([
|
|
43
|
+
new ClipboardItem({
|
|
44
|
+
[image.type]: image,
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
// Toast
|
|
49
|
+
toast.success('图片已复制');
|
|
34
50
|
|
|
35
51
|
// Update
|
|
36
52
|
return {
|
|
@@ -62,11 +78,19 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
62
78
|
|
|
63
79
|
// Get ID
|
|
64
80
|
// const query = closest(table, '[query-id]', true).getAttribute('query-id');
|
|
65
|
-
const answer = closest(table, '[answer-id]', true).getAttribute('answer-id');
|
|
81
|
+
// const answer = closest(table, '[answer-id]', true).getAttribute('answer-id');
|
|
82
|
+
|
|
83
|
+
// Get Query
|
|
84
|
+
const query = closest(table, '[query-id]', true);
|
|
85
|
+
|
|
86
|
+
// Get Title from Query
|
|
87
|
+
const title = $(query).find('.fqa-query-content').html();
|
|
88
|
+
|
|
89
|
+
// Get Time
|
|
90
|
+
const fmt = time.Format(new Date(), 'YYYY-MM-DD');
|
|
66
91
|
|
|
67
92
|
// Write Excel
|
|
68
|
-
|
|
69
|
-
excel.writeFile(book, `${state.info.title}.xlsx`);
|
|
93
|
+
excel.writeFile(book, `${title}_${fmt}.xlsx`);
|
|
70
94
|
},
|
|
71
95
|
|
|
72
96
|
async TSV_CREATE({}, { markdown, sup }) {
|