zydx-plus 1.28.126 → 1.28.128

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.28.126",
3
+ "version": "1.28.128",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -33,6 +33,8 @@
33
33
  "@tiptap/vue-3": "^2.0.3",
34
34
  "@tiptap/extension-text-align": "^2.0.3",
35
35
  "@tiptap/extension-placeholder": "^2.0.3",
36
+ "@tiptap/extension-text-style": "^2.0.3",
37
+ "@tiptap/extension-color": "^2.0.3",
36
38
  "@vue-office/docx": "^1.1.3",
37
39
  "@vue-office/excel": "^1.1.3"
38
40
  },
@@ -82,6 +82,8 @@ import StarterKit from '@tiptap/starter-kit'
82
82
  import Image from '@tiptap/extension-image'
83
83
  import TextAlign from '@tiptap/extension-text-align'
84
84
  import Placeholder from '@tiptap/extension-placeholder'
85
+ import Color from '@tiptap/extension-color'
86
+ import textStyle from '@tiptap/extension-text-style'
85
87
  export default {
86
88
  name: 'zydx-xiao-editor',
87
89
  components: {
@@ -213,6 +215,10 @@ export default {
213
215
  editable: this.readOnly,
214
216
  extensions: [
215
217
  StarterKit,
218
+ textStyle,
219
+ Color.configure({
220
+ types: ['textStyle'],
221
+ }),
216
222
  Placeholder.configure({
217
223
  placeholder: this.placeholder,
218
224
  }),
@@ -383,6 +389,11 @@ export default {
383
389
  if(v === 'p') this.editor.chain().focus().setParagraph().run()
384
390
  if(v === 'bold') this.editor.chain().focus().toggleBold().run()
385
391
  if(v === 'center' || v === 'left' || v === 'right') this.editor.chain().focus().setTextAlign(v).run()
392
+ if(v === 'add') {
393
+ let html = this.editor.getHTML()
394
+ html += '<p style="text-align: right;"><span style="color: #999;">请填来源</span></p>'
395
+ this.editor.commands.setContent(html)
396
+ }
386
397
  }
387
398
  }
388
399
  }
@@ -85,7 +85,7 @@ export default {
85
85
  },
86
86
  methods: {
87
87
  flipLeft(e,v) {
88
- if(e <= 1) {
88
+ if(e < 1) {
89
89
  this.pageIndex = 1
90
90
  return
91
91
  }else {
@@ -115,6 +115,7 @@ export default {
115
115
  }
116
116
  },
117
117
  readPdf() {
118
+ if(this.source === '' || this.source === undefined || this.source === null) return
118
119
  let that = this
119
120
  that.loading = true
120
121
  const loadingTask = PdfJs.getDocument(this.source)
@@ -3,7 +3,7 @@
3
3
  <div class="preface-left">
4
4
  <span>题序设置:</span>
5
5
  <div class="preface-input">
6
- <input type="number" @input="numbers" @keypress="isNumberKey($event)" />
6
+ <input type="number" :value="inputValue" @input="numbers" @keypress="isNumberKey($event)" />
7
7
  </div>
8
8
  </div>
9
9
  <div class="preface-right">
@@ -32,8 +32,37 @@ export default {
32
32
  inputValue: ''
33
33
  }
34
34
  },
35
+ props: {
36
+ value: {
37
+ type: Object,
38
+ default: () => {
39
+ return {
40
+ diffLeve: 1,
41
+ quesNo: ''
42
+ }
43
+ }
44
+ }
45
+ },
46
+ watch: {
47
+ value: {
48
+ handler: function (val, oldVal) {
49
+ this.updateData(val)
50
+ },
51
+ immediate: true
52
+ }
53
+ },
54
+ mounted() {
55
+ this.updateData(this.value)
56
+ },
35
57
  emits: ['change'],
36
58
  methods: {
59
+ updateData(v) {
60
+ this.radioValue = v.diffLeve;
61
+ this.radioList.map(x => {
62
+ x.checked = x.value === v.diffLeve;
63
+ })
64
+ this.inputValue = v.quesNo;
65
+ },
37
66
  radioTao(v) {
38
67
  this.radioValue = v;
39
68
  this.$emit('change', {
package/src/index.js CHANGED
@@ -67,7 +67,7 @@ function install(app) {
67
67
  }
68
68
 
69
69
  export default {
70
- version: '1.28.126',
70
+ version: '1.28.128',
71
71
  install,
72
72
  Calendar,
73
73
  Message,