zydx-plus 1.17.77 → 1.17.78

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.17.77",
3
+ "version": "1.17.78",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -643,11 +643,6 @@
643
643
  align-items: center;
644
644
  justify-content: space-between;
645
645
  }
646
-
647
- >>>.el-input__wrapper{
648
- height: 30px;
649
- }
650
-
651
646
  .el-select .el-input {
652
647
  width: 130px;
653
648
  }
@@ -107,6 +107,8 @@ export default {
107
107
  this.isMove = false;
108
108
  },
109
109
  close() {
110
+ this.isMove = false
111
+ this.footIsMove = false
110
112
  this.$emit('close');
111
113
  }
112
114
  }
@@ -140,6 +142,7 @@ export default {
140
142
  z-index: 1;
141
143
  display: inline-block;
142
144
  cursor: ns-resize;
145
+ user-select: none;
143
146
  }
144
147
  .in{
145
148
  position: absolute;
@@ -150,6 +153,7 @@ export default {
150
153
  z-index: 1;
151
154
  display: inline-block;
152
155
  cursor: nwse-resize;
156
+ user-select: none;
153
157
  }
154
158
  .right{
155
159
  position: absolute;
@@ -160,6 +164,7 @@ export default {
160
164
  z-index: 1;
161
165
  display: inline-block;
162
166
  cursor: ew-resize;
167
+ user-select: none;
163
168
  }
164
169
  .drag-head i {
165
170
  position: absolute;
@@ -191,6 +196,7 @@ export default {
191
196
  color: #fff;
192
197
  border-top-left-radius: 3px;
193
198
  border-top-right-radius: 3px;
199
+ user-select: none;
194
200
  }
195
201
  .drag-cont{
196
202
  height: calc(100% - 60px);
@@ -37,7 +37,7 @@ export default defineComponent({
37
37
  },
38
38
  readOnly: {
39
39
  type: Boolean,
40
- default: true
40
+ default: false
41
41
  },
42
42
  butShow: {
43
43
  type: Boolean,
@@ -61,6 +61,11 @@ export default defineComponent({
61
61
  }
62
62
  },
63
63
  emits: ['confirm'],
64
+ watch: {
65
+ html() {
66
+ this.formData.html = this.html
67
+ }
68
+ },
64
69
  methods: {
65
70
  confirm() {
66
71
  this.syncContent() //强制同步数据
@@ -107,7 +107,13 @@ export default {
107
107
  default: false
108
108
  }
109
109
  },
110
- emits: ['see','complete'],
110
+ emits: ['see','complete','update:data'],
111
+ watch:{
112
+ data(e) {
113
+ this.editor.commands.setContent(json2html({node: "root",child: (e.html === undefined)? [] : e.html}))
114
+ this.uploadAttData = (e.enclosure === undefined)? [] : e.enclosure
115
+ },
116
+ },
111
117
  mounted() {
112
118
  this.uploadAttData = (this.data.enclosure === undefined)? [] : this.data.enclosure
113
119
  this.heightStyle = (this.height === '100%')? {height: '100%'} : {'min-height': this.height}
@@ -162,7 +168,6 @@ export default {
162
168
  const file = e.target.files[0]
163
169
  if(this.uploadType) {
164
170
  if(v === 'uploadAtt') {
165
- console.log(file)
166
171
  this.uploadAttData.push(file)
167
172
  }else {
168
173
  this.uploadFile(file).then(r => {
@@ -219,7 +224,7 @@ export default {
219
224
  download(index) {
220
225
  const url = this.uploadImage.url + this.uploadAttData[index].filePath
221
226
  let a = document.createElement('a');
222
- a.style = 'display: none';
227
+ a.style.display = 'none';
223
228
  a.download = this.uploadAttData[index].filename;
224
229
  a.href = url;
225
230
  document.body.appendChild(a);
@@ -308,7 +313,7 @@ export default {
308
313
  }
309
314
  .editor{
310
315
  border-radius: 3px;
311
- padding: 20px;
316
+ padding: 10px;
312
317
  outline: none;
313
318
  }
314
319
  .editor img{
@@ -1,16 +1,26 @@
1
1
  <template>
2
2
  <div id="docView">
3
- <div class="pdf-container">
4
- <canvas :id="'pdf-canvas'+ index" v-for="(item,index) in pdfPages" class="pdf-canvas"></canvas>
5
- </div>
6
- <div class="book">
7
- <flipbook class="flipbook" :startPage="pageIndex" :pages="imgArr" @flip-left-end="flipLeft($event,false)" @flip-right-end="flipRight($event,false)" v-slot="flipbook" :singlePage="singlePage" :ambient="0" :gloss="1" :dragToFlip="false" :pagesHiRes="0">
8
- <div class="but" v-if="butShow">
9
- <button class="but-brown" :class="{'but-act': pageIndex === 1}" @click="flipbook.flipLeft">上一页</button>
10
- <button class="but-brown" :class="{'but-act': pageIndex === pdfPages}" @click="flipbook.flipRight">下一页</button>
11
- </div>
12
- </flipbook>
13
- </div>
3
+ <div v-show="show" class="load-pop">
4
+ <div class="load">
5
+ <span>文件较大耐心等待</span>
6
+ <div class="loading">
7
+ <div class="loading-cont" :style="{'width': loadWidth +'%'}"></div>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <div v-show="!show" style="height: 100%;">
12
+ <div class="pdf-container">
13
+ <canvas :id="'pdf-canvas'+ index" v-for="(item,index) in pdfPages" class="pdf-canvas"></canvas>
14
+ </div>
15
+ <div class="book">
16
+ <flipbook class="flipbook" :startPage="pageIndex" :pages="imgArr" @flip-left-end="flipLeft($event,false)" @flip-right-end="flipRight($event,false)" v-slot="flipbook" :singlePage="singlePage" :ambient="0" :gloss="1" :dragToFlip="false" :pagesHiRes="0">
17
+ <div class="but" v-if="butShow">
18
+ <button class="but-brown" :class="{'but-act': pageIndex === 1}" @click="flipbook.flipLeft">上一页</button>
19
+ <button class="but-brown" :class="{'but-act': pageIndex === pdfPages}" @click="flipbook.flipRight">下一页</button>
20
+ </div>
21
+ </flipbook>
22
+ </div>
23
+ </div>
14
24
  </div>
15
25
  </template>
16
26
 
@@ -26,7 +36,10 @@ export default {
26
36
  pdfPages: 0,
27
37
  imgArr: [],
28
38
  hei: 0,
29
- pageIndex: this.page
39
+ pageIndex: this.page,
40
+ show: false,
41
+ load: 0,
42
+ loadWidth: 0
30
43
  }
31
44
  },
32
45
  props: {
@@ -74,6 +87,7 @@ export default {
74
87
  },
75
88
  readPdf() {
76
89
  let that = this
90
+ if(that.pdfPages > 30) that.show = true
77
91
  const loadingTask = PdfJs.getDocument(this.source)
78
92
  loadingTask.promise.then((pdf) => {
79
93
  that.pdfPages = pdf.numPages // 获取pdf文件的总页数
@@ -95,13 +109,28 @@ export default {
95
109
  viewport: viewport
96
110
  }
97
111
  page.render(renderContext)
112
+ if(that.pdfPages > 30) {
113
+ that.load = i + 1
114
+ that.loadWidth = Math.floor(that.load / that.pdfPages * 100)
115
+ }
98
116
  });
99
117
  }
100
- setTimeout(() => {
118
+ setTimeout(function () {
101
119
  for (let i = 0; i < that.pdfPages; i++) {
102
120
  const canvas = document.getElementById('pdf-canvas' + i)
103
121
  const dataURL = canvas.toDataURL("image/jpeg", 1); //获取Base64编码
104
122
  that.imgArr.push(dataURL)
123
+ that.load = i + 1
124
+ if(that.pdfPages > 30) {
125
+ if(that.load >= that.pdfPages) {
126
+ setTimeout(() => {
127
+ that.show = false
128
+ that.load = 0
129
+ },100)
130
+ }else {
131
+ that.loadWidth = Math.floor(that.load / that.pdfPages * 100)
132
+ }
133
+ }
105
134
  }
106
135
  }, 500)
107
136
  })
@@ -111,6 +140,40 @@ export default {
111
140
  </script>
112
141
 
113
142
  <style scoped>
143
+ .load-pop{
144
+ width: 100%;
145
+ height: 100%;
146
+ display: flex;
147
+ align-items: center;
148
+ }
149
+ .load{
150
+ display: inline-block;
151
+ margin: 0 auto;
152
+ }
153
+ .load>span{
154
+ display: inline-block;
155
+ width: 100%;
156
+ text-align: center;
157
+ padding-bottom: 10px;
158
+ font-size: 14px;
159
+ }
160
+ .loading{
161
+ width: 200px;
162
+ height: 10px;
163
+ border-radius: 20px;
164
+ position: relative;
165
+ overflow: hidden;
166
+ background-color: #ccc;
167
+ }
168
+ .loading-cont{
169
+ position: absolute;
170
+ top: 0;
171
+ left: 0;
172
+ z-index: 1;
173
+ background-color: #5daf34;
174
+ height: 100%;
175
+ border-radius: 20px;
176
+ }
114
177
  #docView{
115
178
  height: 100%;
116
179
  }
@@ -5,7 +5,7 @@
5
5
  right: 0;
6
6
  bottom: 0;
7
7
  background-color: rgba(0, 0, 0, 0.2);
8
- z-index: 200;
8
+ z-index: 2000;
9
9
  display: flex;
10
10
  align-items: center;
11
11
  }