zydx-plus 1.33.332 → 1.33.333

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,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.33.332",
3
+ "version": "1.33.333",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -26,22 +26,28 @@
26
26
  "katex": "^0.15.6",
27
27
  "simple-mind-map": "^0.9.6",
28
28
  "html2json": "^1.0.2",
29
- "@tiptap/extension-image": "^2.0.3",
30
29
  "@tiptap/starter-kit": "^2.0.3",
31
30
  "@tiptap/vue-3": "^2.0.3",
31
+ "@tiptap/extension-bubble-menu": "^2.1.0",
32
32
  "@tiptap/extension-color": "^2.0.3",
33
+ "@tiptap/extension-focus": "^2.1.13",
33
34
  "@tiptap/extension-font-family": "^2.0.3",
35
+ "@tiptap/extension-heading": "^2.0.4",
34
36
  "@tiptap/extension-horizontal-rule": "^2.0.3",
37
+ "@tiptap/extension-image": "^2.0.3",
38
+ "@tiptap/extension-link": "^2.0.3",
35
39
  "@tiptap/extension-paragraph": "^2.0.3",
36
40
  "@tiptap/extension-placeholder": "^2.0.3",
37
41
  "@tiptap/extension-superscript": "^2.0.3",
38
42
  "@tiptap/extension-text-align": "^2.0.3",
39
43
  "@tiptap/extension-text-style": "^2.0.3",
40
- "@tiptap/extension-link": "^2.0.3",
41
44
  "@vue-office/docx": "^1.1.3",
42
45
  "@vue-office/excel": "^1.1.3",
43
46
  "js-export-word": "^1.0.5",
44
- "js-audio-recorder": "^1.0.7"
47
+ "js-audio-recorder": "^1.0.7",
48
+ "react": "^18.2.0",
49
+ "react-dom": "^18.2.0",
50
+ "tldraw": "^2.0.2"
45
51
  },
46
52
  "peerDependencies": {
47
53
  "vue": "^3.2.13"
@@ -226,8 +226,9 @@ export default {
226
226
  // 判断两个日期的大小
227
227
  let start = (this.rangeStart_ === undefined)? null:this.rangeStart_.replace(/-/g, '')
228
228
  let end = (this.rangeEnd_ === undefined)? null:this.rangeEnd_.replace(/-/g, '')
229
- if(start > end) {
230
- date = {end: this.rangeStart_, start: this.rangeEnd_}
229
+ date = {start: this.rangeStart_, end: this.rangeEnd_}
230
+ if(Number(start) > Number(end)) {
231
+ date = {start: this.rangeEnd_, end: this.rangeStart_}
231
232
  }else {
232
233
  date = {start: this.rangeStart_, end: this.rangeEnd_}
233
234
  }
@@ -54,12 +54,12 @@
54
54
  <div class="complete" v-if="!readOnly && toolbar.length > 0">
55
55
  <button class="but" v-if="butShow" @click="confirm">完成</button>
56
56
  </div>
57
+ <div class="menus" v-if="menus&&readOnly" :style="menusStyle">
58
+ <button class="but" @click="enlSee" v-if="readOnly">查看</button>
59
+ <button class="but" @click="enlDownload" v-if="readOnly">下载</button>
60
+ <button class="but" @click="enlDel" v-if="!readOnly">删除</button>
61
+ </div>
57
62
  <div class="read-only" v-if="page&&readOnly" :style="{width: (wit + 20) + 'px'}">
58
- <div class="menus" v-if="menus&&readOnly" :style="menusStyle">
59
- <button class="but" @click="enlSee" v-if="readOnly">查看</button>
60
- <button class="but" @click="enlDownload" v-if="readOnly">下载</button>
61
- <button class="but" @click="enlDel" v-if="!readOnly">删除</button>
62
- </div>
63
63
  <div class="editing-header" v-if="signMenuShow">
64
64
  <img :src="menusData('signMenu')?.ico" alt=""/>
65
65
  <span>{{ menusData('signMenu')?.text }}</span>
@@ -704,12 +704,12 @@ export default {
704
704
  const last = this.editor.state.selection.$anchor.path[0].content.size
705
705
  if (t === -1) this.editor.chain().focus().insertContentAt(last, html).run()
706
706
  const num = this.upSort(this.editor, 'enclosure')
707
- const html2 = `<p contenteditable="false" data-signId="u-${num.num}" data-url="${url}"><span class="mu">${num.num}. ${name}</span></p>`
707
+ const html2 = `<p contenteditable="false" data-signId="u-${num.num}" data-url="${url}" class="mu"><span>${num.num}. ${name}</span></p>`
708
708
  this.editor.chain().focus().insertContentAt(num.len, html2).run()
709
709
  } else {
710
710
  if (t === -1) this.editor.chain().focus().insertContentAt(this.selectionPath('paragraph', b - 1), html).run()
711
711
  const num = this.upSort(this.editor, 'enclosure')
712
- const html2 = `<p contenteditable="false" data-signId="u-${num.num}" data-url="${url}"><span class="mu">${num.num}. ${name}</span></p>`
712
+ const html2 = `<p contenteditable="false" data-signId="u-${num.num}" data-url="${url}" class="mu"><span>${num.num}. ${name}</span></p>`
713
713
  this.editor.chain().focus().insertContentAt(num.len, html2).run()
714
714
  }
715
715
  })
@@ -69,9 +69,10 @@ export default {
69
69
  methods: {
70
70
  splitHtml(v) {
71
71
  if(v === '' || v === null) return ''
72
- const arr = v.split('<br>')
72
+ const arr = v.split('\n')
73
73
  let html = ''
74
74
  arr.forEach(item => {
75
+ item = item.replace(/ /g, '&nbsp;')
75
76
  html += `<p>${item}</p>`
76
77
  })
77
78
  return html
@@ -101,16 +102,24 @@ export default {
101
102
  },
102
103
  getContent() {
103
104
  const html = this.$refs.textarea.innerHTML
104
- const br = html.replace(/<div>/g, '<br>').replace(/<\/div>/g, '').replace(/<p>/g, '<br>').replace(/<\/p>/g, '')
105
+ console.log(html)
106
+ const br = html
107
+ .replace(/<div>/g, '\n')
108
+ .replace(/<\/div>/g, '')
109
+ .replace(/<p>/g, '\n')
110
+ .replace(/<\/p>/g, '')
111
+ .replace(/<span style="text-indent: 2em;">/g, '')
112
+ .replace(/<\/span>/g, '')
113
+ .replace(/&nbsp;/g, ' ')
105
114
  // 如果br后边没有内容,就去掉br
106
- if (br.indexOf('<br>') !== -1) {
107
- const arr = br.split('<br>')
115
+ if (br.indexOf('\n') !== -1) {
116
+ const arr = br.split('\n')
108
117
  arr.forEach((item, index) => {
109
118
  if (item === '') {
110
119
  arr.splice(index, 1)
111
120
  }
112
121
  })
113
- return arr.join('<br>')
122
+ return arr.join('\n')
114
123
  }else {
115
124
  return br
116
125
  }
@@ -138,6 +147,7 @@ export default {
138
147
  box-sizing: border-box;
139
148
  text-indent: 2em;
140
149
  background-color: #fff;
150
+ word-wrap: break-word;
141
151
  }
142
152
 
143
153
  .text[contenteditable]:empty:before {
package/src/index.js CHANGED
@@ -81,7 +81,7 @@ function install(app) {
81
81
  }
82
82
 
83
83
  export default {
84
- version: '1.33.332',
84
+ version: '1.33.333',
85
85
  install,
86
86
  Calendar,
87
87
  Message,