@nebulars/sseengine 1.3.60 → 1.3.63

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nebulars/sseengine",
3
3
  "description": "An engine for sse",
4
- "version": "1.3.60",
4
+ "version": "1.3.63",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "dev": "forage serve --name sseengine",
@@ -142,14 +142,17 @@ export default {
142
142
  },
143
143
  },
144
144
 
145
- mounted() {
145
+ async mounted() {
146
146
  document.addEventListener('click', this.supHandler);
147
147
  document.addEventListener('click', this.tubHandler);
148
148
  },
149
149
 
150
- beforeUnmount() {
150
+ async beforeUnmount() {
151
151
  document.removeEventListener('click', this.supHandler);
152
152
  document.removeEventListener('click', this.tubHandler);
153
+
154
+ await this.$store.dispatch('sseengine/SSE_MODE');
155
+ await this.$store.dispatch('sseengine/SNAP_CLEAN');
153
156
  },
154
157
  };
155
158
  </script>
@@ -70,7 +70,7 @@ export default {
70
70
  methods: {
71
71
  async sharingHandler() {
72
72
  if (!this.$store.state.sseengine.choosen.length) {
73
- return this.$util.toast.info('请选择问题');
73
+ return this.$util.toast.info('请选择问答');
74
74
  }
75
75
 
76
76
  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/tub.js CHANGED
@@ -39,7 +39,7 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
39
39
  };
40
40
  },
41
41
 
42
- async TUB_DOWNLOAD({ dispatch }, { markdown, table }) {
42
+ async TUB_DOWNLOAD({ state, dispatch }, { markdown, table }) {
43
43
  // Get TSV
44
44
  const tsv = await dispatch('TSV_CREATE', { markdown, sup: false });
45
45
 
@@ -65,7 +65,8 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
65
65
  const answer = closest(table, '[answer-id]', true).getAttribute('answer-id');
66
66
 
67
67
  // Write Excel
68
- excel.writeFile(book, `${answer}.xlsx`);
68
+ // excel.writeFile(book, `${answer}.xlsx`);
69
+ excel.writeFile(book, `${state.info.title}.xlsx`);
69
70
  },
70
71
 
71
72
  async TSV_CREATE({}, { markdown, sup }) {