zydx-plus 1.33.388 → 1.33.389
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
|
@@ -409,14 +409,15 @@ export default {
|
|
|
409
409
|
})
|
|
410
410
|
},
|
|
411
411
|
methods: {
|
|
412
|
-
// 下面三个方法是改变图片大小的方法
|
|
413
412
|
changeAlign(tag) {
|
|
413
|
+
// 图片对齐方式
|
|
414
414
|
this.editor.chain().setTextAlign(tag).run()
|
|
415
415
|
},
|
|
416
416
|
changePercent(e) {
|
|
417
|
+
// 改变图片百分比
|
|
417
418
|
if(parseInt(e.target.value) > 100) {
|
|
418
419
|
this.imgSizeVal = 100
|
|
419
|
-
this.editor.chain().setImageWidth('100%').run()
|
|
420
|
+
this.editor.chain().setImageWidth('100%').focus().run()
|
|
420
421
|
} else if(parseInt(e.target.value) < 10) {
|
|
421
422
|
} else {
|
|
422
423
|
if(this.lock) {
|
|
@@ -429,6 +430,7 @@ export default {
|
|
|
429
430
|
}
|
|
430
431
|
},
|
|
431
432
|
shouldShowFn({ editor, view, state, oldState, from, to }) {
|
|
433
|
+
// BubbleMenu是否显示
|
|
432
434
|
this.$nextTick(() => {
|
|
433
435
|
this.showBubble = editor.isActive('image')
|
|
434
436
|
if(editor.isActive('image')) {
|
|
@@ -907,6 +909,7 @@ export default {
|
|
|
907
909
|
|
|
908
910
|
:deep(.imgCont) {
|
|
909
911
|
line-height: 0 !important;
|
|
912
|
+
text-indent: 0 !important;
|
|
910
913
|
}
|
|
911
914
|
|
|
912
915
|
:deep(.ProseMirror-separator) {
|
|
@@ -954,7 +957,7 @@ export default {
|
|
|
954
957
|
}
|
|
955
958
|
|
|
956
959
|
:deep(.editor-img) {
|
|
957
|
-
max-width:
|
|
960
|
+
max-width: 100%;
|
|
958
961
|
padding: 2px 0;
|
|
959
962
|
}
|
|
960
963
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="docView">
|
|
3
3
|
<div class="full-screen">
|
|
4
4
|
<div class="full-screen-img" @click.stop="fullScreen">
|
|
5
|
-
<!-- <div class="full-screen-title" style="" v-if="showText">全屏查看</div>-->
|
|
5
|
+
<!-- <div class="full-screen-title" style="" v-if="showText">全屏查看</div>-->
|
|
6
6
|
<img @mouseover="showText=true" @mouseout="showText=false" src="../img/full-screen.png" alt="" title="全屏查看">
|
|
7
7
|
</div>
|
|
8
8
|
<div class="full-screen-img" v-if="doublePage" @click.stop="changeView">
|
|
9
|
-
<!-- <div class="full-screen-title" style="" v-if="showMultiText">多页查看</div>-->
|
|
9
|
+
<!-- <div class="full-screen-title" style="" v-if="showMultiText">多页查看</div>-->
|
|
10
10
|
<img @mouseover="showMultiText=true" @mouseout="showMultiText=false" src="../img/multi-page.png" alt="" title="多页查看">
|
|
11
11
|
</div>
|
|
12
12
|
<div class="full-screen-img" v-else @click.stop="changeView">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div>
|
|
18
18
|
<div class="book">
|
|
19
19
|
<div class="pages">
|
|
20
|
-
<div class="wrap-box" v-if="doublePage">
|
|
20
|
+
<div class="wrap-box" ref="wrap-box" v-if="doublePage">
|
|
21
21
|
<div class="wrap wrap-block" :ref="`wrap-${item.id}`" v-for="(item,index) in pageInfoArr" :key="index">
|
|
22
22
|
<div class="wrap-can" v-show="!loading" ref="wrapCan">
|
|
23
23
|
<canvas @click.stop="turnText" class="wrap-can-one" @mousedown.stop="mouseDown"
|
|
@@ -164,6 +164,7 @@ export default {
|
|
|
164
164
|
showText:false,
|
|
165
165
|
showMultiText:false,
|
|
166
166
|
showSingleText:false,
|
|
167
|
+
boxWidth:''
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
props: {
|
|
@@ -185,7 +186,7 @@ export default {
|
|
|
185
186
|
},
|
|
186
187
|
scale: {
|
|
187
188
|
type: Number,
|
|
188
|
-
default: 1.
|
|
189
|
+
default: 1.35
|
|
189
190
|
},
|
|
190
191
|
scaleStyle: {
|
|
191
192
|
type: Object,
|
|
@@ -261,15 +262,13 @@ export default {
|
|
|
261
262
|
deep: true,
|
|
262
263
|
immediate: true
|
|
263
264
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
// immediate: true
|
|
272
|
-
// }
|
|
265
|
+
scale:{
|
|
266
|
+
handler: function (val){
|
|
267
|
+
this.scales = val
|
|
268
|
+
},
|
|
269
|
+
deep: true,
|
|
270
|
+
immediate: true
|
|
271
|
+
}
|
|
273
272
|
},
|
|
274
273
|
emits: ['flip'],
|
|
275
274
|
mounted() {
|
|
@@ -288,7 +287,10 @@ export default {
|
|
|
288
287
|
},
|
|
289
288
|
methods: {
|
|
290
289
|
changeView(){
|
|
291
|
-
this
|
|
290
|
+
this.$emit('changeViewDoublePage',!this.doublePage)
|
|
291
|
+
setTimeout(()=>{
|
|
292
|
+
this.doublePage = !this.doublePage
|
|
293
|
+
},500)
|
|
292
294
|
},
|
|
293
295
|
fullScreen(){
|
|
294
296
|
window.open(this.source)
|
|
@@ -1148,6 +1150,7 @@ export default {
|
|
|
1148
1150
|
let ctx2 = canvas2.getContext('2d');
|
|
1149
1151
|
let viewport = page.getViewport({scale: that.scales})
|
|
1150
1152
|
const sc = viewport.width / viewport.height
|
|
1153
|
+
that.boxWidth = that.$refs.wrap.offsetWidth
|
|
1151
1154
|
const wid = that.$refs.wrap.offsetWidth - 10
|
|
1152
1155
|
const hei = wid / sc
|
|
1153
1156
|
canvas.width = wid * that.sratio
|
|
@@ -1198,7 +1201,9 @@ export default {
|
|
|
1198
1201
|
let canvas2 = document.getElementById(`${item.id}2`)
|
|
1199
1202
|
item.ctx = canvas.getContext('2d');
|
|
1200
1203
|
item.ctx2 = canvas2.getContext('2d');
|
|
1201
|
-
let
|
|
1204
|
+
let wrapBoxWidth = that.$refs['wrap-box'].offsetWidth
|
|
1205
|
+
let newScale=(wrapBoxWidth/that.boxWidth)*that.scales
|
|
1206
|
+
let viewport = page.getViewport({scale: newScale/2})
|
|
1202
1207
|
const sc = viewport.width / viewport.height
|
|
1203
1208
|
const wid = that.$refs[`wrap-${item.id}`][0].offsetWidth-15
|
|
1204
1209
|
const hei = wid / sc
|
|
@@ -1500,6 +1505,6 @@ div{
|
|
|
1500
1505
|
.full-screen-img>img{
|
|
1501
1506
|
width: 20px;
|
|
1502
1507
|
height: 20px;
|
|
1503
|
-
|
|
1508
|
+
//margin-left: 5px;
|
|
1504
1509
|
}
|
|
1505
1510
|
</style>
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
:style="{'border-bottom': (link)? '1px solid #ccc': '0', 'color': (active === index)? activeColor : '#333'}"
|
|
6
6
|
@click="listTap(item,index)" v-for="(item,index) in list" :key="index">
|
|
7
7
|
<div class="list-title">
|
|
8
|
-
<span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}">{{
|
|
8
|
+
<!-- <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}">{{
|
|
9
9
|
index + 1
|
|
10
10
|
}}. {{ (angleBrackets) ? '《' : '' }} {{ item[column[0].label] }} {{
|
|
11
11
|
(angleBrackets) ? '》' : ''
|
|
12
|
-
}}</span>
|
|
12
|
+
}}</span> -->
|
|
13
|
+
<span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}" v-html="(index + 1) + '.' + (angleBrackets ? '《' : '') + item[column[0].label] + (angleBrackets ? '》' : '')"></span>
|
|
13
14
|
<button v-if="delShow" @click="del(item)">{{ delText }}</button>
|
|
14
15
|
</div>
|
|
15
16
|
<div class="list-cont" v-if="open">
|