@nebulars/sseengine 1.3.56 → 1.3.60

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.56",
4
+ "version": "1.3.60",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "dev": "forage serve --name sseengine",
@@ -80,6 +80,9 @@ export default {
80
80
 
81
81
  // Toast
82
82
  await this.$util.toast.success('链接已复制');
83
+
84
+ // Clean
85
+ await this.cleanHandler();
83
86
  },
84
87
 
85
88
  async cleanHandler() {
@@ -10,6 +10,7 @@
10
10
  margin-left: auto;
11
11
  padding: @gap;
12
12
  white-space: pre-line;
13
+ word-wrap: break-word;
13
14
  border-radius: @radiu;
14
15
  color: darken(@color-primary, 50%);
15
16
  background-color: lighten(@color-primary, 20%);
@@ -1,6 +1,6 @@
1
1
  <style lang="less" scoped>
2
2
  .sse-sharing {
3
- top: @space;
3
+ top: @dozen;
4
4
  left: -@space;
5
5
  position: absolute;
6
6
  }
package/src/store/tub.js CHANGED
@@ -16,7 +16,7 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
16
16
 
17
17
  async TUB_COPY({ dispatch }, { markdown }) {
18
18
  // Get TSV
19
- const tsv = await dispatch('TSV_CREATE', markdown);
19
+ const tsv = await dispatch('TSV_CREATE', { markdown, sup: false });
20
20
 
21
21
  // Copy
22
22
  copy(tsv);
@@ -41,7 +41,7 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
41
41
 
42
42
  async TUB_DOWNLOAD({ dispatch }, { markdown, table }) {
43
43
  // Get TSV
44
- const tsv = await dispatch('TSV_CREATE', markdown);
44
+ const tsv = await dispatch('TSV_CREATE', { markdown, sup: false });
45
45
 
46
46
  // Set Rows
47
47
  const rows = tsv.split('\n').map(row => row.split('\t'));
@@ -68,9 +68,14 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
68
68
  excel.writeFile(book, `${answer}.xlsx`);
69
69
  },
70
70
 
71
- async TSV_CREATE({}, markdown) {
71
+ async TSV_CREATE({}, { markdown, sup }) {
72
72
  // Reset Markdown
73
- const content = markdown.replace(/<sup[\w\s\-\=\"]+\>\d+\<\/sup>/g, '');
73
+ let content = markdown;
74
+
75
+ // Sup
76
+ if (sup === false) {
77
+ content = content.replace(/<sup[\w\s\-\=\"]+\>\d+\<\/sup>/g, '');
78
+ }
74
79
 
75
80
  // Set Lines
76
81
  const lines = content.trim().split('\n');
@@ -121,7 +126,8 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
121
126
  filter(node) {
122
127
  // No Sup
123
128
  if (node.tagName === 'SUP') {
124
- return false;
129
+ // 保留注脚
130
+ // return false;
125
131
  }
126
132
 
127
133
  // Any