zydx-plus 1.33.357 → 1.33.358

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.357",
3
+ "version": "1.33.358",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div ref="only" class="z-editor">
3
3
  <div v-show="!readOnly" class="editor-header">
4
- <div v-for="(item,index) in butData" class="editor-but">
4
+ <div v-for="(item,index) in butData" :key="index" class="editor-but">
5
5
  <div v-if="uploadTypeArr.indexOf(item.key) !== -1" class="editor-but-name">
6
6
  <label>
7
7
  <input :accept="acceptType[item.key]" style="display: none;" type="file" @change="upload($event,item.key)">
@@ -14,7 +14,7 @@
14
14
  <span v-else v-html="item.name"></span>
15
15
  </div>
16
16
  <div v-if="item.menuKeys.length > 0" class="editor-but-down">
17
- <ul v-for="(item2,index2) in item.menuKeys" style="position: relative">
17
+ <ul v-for="(item2,index2) in item.menuKeys" :key="index2" style="position: relative">
18
18
  <li v-if="uploadTypeArr.indexOf(item2.key) !== -1">
19
19
  <label>
20
20
  <input :accept="acceptType[item2.key]" style="display: none;" type="file"
@@ -28,7 +28,8 @@
28
28
  <div v-if="(item2.childMenuKeys && item2.childMenuKeys.length)"
29
29
  class="child-editor-but-down"
30
30
  style="min-width: 71px; position: absolute;top:0;left: 100%;">
31
- <li v-for="(childItem,childIndex) in item2.childMenuKeys" @click="butTap(item,item2,childItem)">
31
+ <li v-for="(childItem,childIndex) in item2.childMenuKeys" :key="childIndex"
32
+ @click="butTap(item,item2,childItem)">
32
33
  <!-- childItem.key === 'uploadImage'-->
33
34
  <label v-if=" uploadTypeArr.indexOf(childItem.key) !== -1 ">
34
35
  <input :accept="acceptType[childItem.key]" style="display: none;" type="file"
@@ -57,14 +58,14 @@
57
58
  <span :class="{'but-name-color':voiceOpen}" v-html="voiceOpen?'关闭语音':'语音输入'"></span>
58
59
  </div>
59
60
  </div>
60
- <!-- <div class="editor-but">-->
61
- <!-- <div class="editor-but-name">-->
62
- <!-- <label>-->
63
- <!-- <input type="file" @change="uploadDoc($event)" accept=".docx" style="display: none;">-->
64
- <!-- <span>上传文档</span>-->
65
- <!-- </label>-->
66
- <!-- </div>-->
67
- <!-- </div>-->
61
+ <!-- <div class="editor-but">
62
+ <div class="editor-but-name">
63
+ <label>
64
+ <input type="file" @change="uploadDoc($event)" accept=".docx" style="display: none;">
65
+ <span>上传文档</span>
66
+ </label>
67
+ </div>
68
+ </div>-->
68
69
  </div>
69
70
  <div :class="{'editor-content-show': !editableShow}" class="editor-content">
70
71
  <div class="editing">
@@ -110,12 +111,12 @@
110
111
  </div>
111
112
 
112
113
  <div v-if="page&&readOnly" class="read-only">
113
- <!-- :style="{width: (wit + 20) + 'px'}"-->
114
+ <!-- :style="{width: (wit + 20) + 'px'}"-->
114
115
  <div v-if="signMenuShow" class="editing-header">
115
116
  <img :src="menusData('signMenu')?.ico" alt=""/>
116
117
  <span>{{ menusData('signMenu')?.text }}</span>
117
118
  </div>
118
- <!-- ,width: wit + 'px'-->
119
+ <!-- ,width: wit + 'px'-->
119
120
  <div v-for="(item,index) in htmlArr" :key="index" :style="{height: wit * 1.6 + 'px'}"
120
121
  class="read-only-page" @click="menusTap">
121
122
  <div class="read-only-p" v-html="item"></div>
@@ -182,11 +183,13 @@
182
183
  <div class="p-popup-retraction">
183
184
  <div class="p-popup-setting">
184
185
  <div class="name">左侧缩进</div>
185
- :<input v-model="paragraph.left" type="number" min="0" @input="checkNum"/>
186
+
187
+ <input v-model="paragraph.left" min="0" type="number" @input="checkNum"/>
186
188
  <p>px</p></div>
187
189
  <div class="p-popup-setting">
188
190
  <div class="name">右侧缩进</div>
189
- :<input v-model="paragraph.right" type="number" min="0" @input="checkNum"/>
191
+
192
+ <input v-model="paragraph.right" min="0" type="number" @input="checkNum"/>
190
193
  <p>px</p></div>
191
194
  </div>
192
195
  <div class="tip-btnBox">
@@ -204,15 +207,18 @@
204
207
  <div class="p-popup-title">间距设置</div>
205
208
  <div class="p-popup-spacing">
206
209
  <div class="p-popup-setting">
207
- <div class="name">段前间距</div>:
208
- <input v-model="paragraph.top" type="number" min="0" @input="checkNum"/>
210
+ <div class="name">段前间距</div>
211
+
212
+ <input v-model="paragraph.top" min="0" type="number" @input="checkNum"/>
209
213
  <p>px</p></div>
210
214
  <div class="p-popup-setting">
211
- <div class="name">段后间距</div>:
212
- <input v-model="paragraph.bottom" type="number" min="0" @input="checkNum"/>
215
+ <div class="name">段后间距</div>
216
+
217
+ <input v-model="paragraph.bottom" min="0" type="number" @input="checkNum"/>
213
218
  <p>px</p></div>
214
219
  <div class="p-popup-setting">
215
- <div class="name">行距</div>:
220
+ <div class="name">行距</div>
221
+
216
222
  <zydx-select v-model:value="paragraph.distance" :options="options" style="width: 300px"></zydx-select>
217
223
  </div>
218
224
  </div>
@@ -273,11 +279,11 @@
273
279
  </template>
274
280
  </zydx-drag-popup>
275
281
  <!-- 名词解释-->
276
- <!-- <zydx-drag-popup v-if="isShowExegesis" :dragStatus="false"-->
277
- <!-- :enlargeShow="false" :minimize="false"-->
278
- <!-- :minimizeCir="false" :title="titlePopup"-->
279
- <!-- height="auto" @close="isShowExegesis=false">-->
280
- <!-- </zydx-drag-popup>-->
282
+ <!-- <zydx-drag-popup v-if="isShowExegesis" :dragStatus="false"
283
+ :enlargeShow="false" :minimize="false"
284
+ :minimizeCir="false" :title="titlePopup"
285
+ height="auto" @close="isShowExegesis=false">
286
+ </zydx-drag-popup>-->
281
287
 
282
288
  <div ref="bubbleMenu" :style="menusStyle" class="menu-one">
283
289
  <div v-if="bubbleData&&bubbleData.type === 'taggingMenu'" class="menu-one-title">
@@ -313,9 +319,9 @@
313
319
  <!-- 展示弹窗 -->
314
320
  <div v-for="(item,index) in interpositionData" :key="index">
315
321
  <zydx-drag-popup v-if="item.isShow" :enlargeShow="false" :minHeight="183"
316
- :minWidth="640" :minimize="false" :minimizeCir="false"
322
+ :minWidth="['importWorks', 'linkCourseware', 'importArticles'].indexOf(item.type) === -1 ? 640 :905" :minimize="false" :minimizeCir="false"
317
323
  :title="titleDragPopup[item.type]?titleDragPopup[item.type]:'参考文献'" height="auto"
318
- width="auto" @close="closeDataShowPopup(item)">
324
+ :width="['importWorks', 'linkCourseware', 'importArticles'].indexOf(item.type) === -1 ? 640 :905" @close="closeDataShowPopup(item)">
319
325
  <template #content>
320
326
  <div v-if="item.type === 'taggingMenu'" style="padding: 10px">
321
327
  <div class="p-popup-title-box">
@@ -378,7 +384,7 @@
378
384
  v-html="'删除'"></div>
379
385
  </div>
380
386
  </div>
381
- <div class="tip-box" style="min-width:600px;width: 600px">
387
+ <div class="tip-box" style="min-width:600px;">
382
388
  <div class="tip-title" v-html="`${item.exegesis}`"></div>
383
389
  <div class="tip-boxContent">
384
390
  <zydx-read :url="item.url" style="height: 100%"></zydx-read>
@@ -397,7 +403,7 @@
397
403
  v-html="'删除'"></div>
398
404
  </div>
399
405
  </div>
400
- <div class="tip-box" style="min-width:600px;width: 600px">
406
+ <div class="tip-box" style="min-width:600px;">
401
407
  <div class="tip-title" v-html="`${item.exegesis}`"></div>
402
408
  <div class="tip-boxContent">
403
409
  <zydx-read :url="item.url" style="height: 100%"></zydx-read>
@@ -416,7 +422,7 @@
416
422
  v-html="'删除'"></div>
417
423
  </div>
418
424
  </div>
419
- <div class="tip-box" style="min-width:600px;width: 600px">
425
+ <div class="tip-box" style="min-width:600px;">
420
426
  <div class="tip-title" v-html="`${item.exegesis}`"></div>
421
427
  <div class="tip-boxContent">
422
428
  <zydx-read :url="item.url" style="height: 100%"></zydx-read>
@@ -435,7 +441,7 @@
435
441
  v-html="'删除'"></div>
436
442
  </div>
437
443
  </div>
438
- <div class="tip-box" style="min-width:600px;width: 600px">
444
+ <div class="tip-box" style="min-width:600px;">
439
445
  <div class="tip-title" v-html="`${item.exegesis}`"></div>
440
446
  <div class="tip-boxContent">
441
447
  <iframe v-if="item.type === 'linkCourseware'" :src="item.url" frameborder="no" height="590"
@@ -535,8 +541,6 @@ import zydxRead from '../../read'
535
541
  import zydxDragPopup from '../../dragPopup'
536
542
  import zydxSelect from '../../select'
537
543
  import {exegesisId} from "./extend/exegesis-id";
538
- import {html2json, json2html} from '../../utils/html2json.js'
539
- import Upload from '../../../components/upload' //上传文件
540
544
 
541
545
  const img = require('./image/annotation.png')
542
546
  export default {
@@ -713,7 +717,7 @@ export default {
713
717
  insertFn('http://192.168.5.213:8888' + res.data)
714
718
  },
715
719
  onSuccess(file, res) {
716
- console.log('图片上传成功',)
720
+ console.log('图片上传成功', file, res)
717
721
  },
718
722
  }
719
723
  }
@@ -3004,15 +3008,15 @@ export default {
3004
3008
  this.editor.commands.unsetTextAlign()
3005
3009
  this.editor.commands.setTextAlign(textAlign)
3006
3010
  }
3007
- if(!lineHeightId === false){
3011
+ if (!lineHeightId === false) {
3008
3012
  this.editor.commands.unsetLineHeightId()
3009
3013
  this.editor.commands.setLineHeightId(lineHeightId)
3010
3014
  }
3011
- if(!signId === false){
3015
+ if (!signId === false) {
3012
3016
  this.editor.commands.unsetSignId()
3013
3017
  this.editor.commands.setSignId(signId)
3014
3018
  }
3015
- if(!titleId === false){
3019
+ if (!titleId === false) {
3016
3020
  this.editor.commands.unsetTitleId()
3017
3021
  this.editor.commands.setTitleId(titleId)
3018
3022
  }
@@ -3329,21 +3333,21 @@ export default {
3329
3333
  }
3330
3334
  },
3331
3335
  checkNum(element) {
3332
- var val= element.target.value;
3336
+ var val = element.target.value;
3333
3337
  //匹配非数字
3334
- var reg = new RegExp("([^0-9]*)","g");
3338
+ var reg = new RegExp("([^0-9]*)", "g");
3335
3339
  var ma = val.match(reg);
3336
3340
  //如果有非数字,替换成""
3337
- if(ma.length>0){
3338
- for(var k in ma){
3339
- if(ma[k]!==""){
3340
- val = val.replace(ma[k],"");
3341
+ if (ma.length > 0) {
3342
+ for (var k in ma) {
3343
+ if (ma[k] !== "") {
3344
+ val = val.replace(ma[k], "");
3341
3345
  }
3342
3346
  }
3343
3347
  }
3344
3348
  //可以为0,但不能以0开头
3345
- if(val.startsWith("0")&&val.length>1){
3346
- val = val.substring(1,val.length);
3349
+ if (val.startsWith("0") && val.length > 1) {
3350
+ val = val.substring(1, val.length);
3347
3351
  }
3348
3352
  //赋值,这样实现的效果就是用户按下非数字不会有任何反应
3349
3353
  element.target.value = val;
@@ -3846,7 +3850,7 @@ li {
3846
3850
  }
3847
3851
 
3848
3852
  .tip-box {
3849
- width: 744px;
3853
+ width: 885px;
3850
3854
  padding: 20px;
3851
3855
  background-color: white;
3852
3856
  border-radius: 5px;
@@ -3939,6 +3943,7 @@ li {
3939
3943
  padding: 60px 100px 40px;
3940
3944
  position: absolute;
3941
3945
  z-index: 1;
3946
+ box-sizing: border-box;
3942
3947
  }
3943
3948
 
3944
3949
  .p-popup h3 {
@@ -3982,13 +3987,14 @@ li {
3982
3987
  .p-popup-setting {
3983
3988
  width: 100%;
3984
3989
  height: 30px;
3985
- padding-left: 20px;
3986
3990
  display: flex;
3987
3991
  flex-direction: row;
3988
3992
  justify-content: flex-start;
3989
3993
  align-items: center;
3990
3994
  margin-bottom: 5px;
3991
3995
  position: relative;
3996
+ display: flex;
3997
+ justify-content: space-between;
3992
3998
  }
3993
3999
 
3994
4000
  .p-popup-setting input {
@@ -3998,6 +4004,7 @@ li {
3998
4004
  border-radius: 3px;
3999
4005
  padding: 0 40px 0 10px;
4000
4006
  color: #606266;
4007
+ box-sizing: border-box;
4001
4008
  }
4002
4009
 
4003
4010
  .p-popup-setting :deep(.wrapper) {
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.357',
86
+ version: '1.33.358',
87
87
  install,
88
88
  Calendar,
89
89
  Message,