Commit b4fc2b26 by jml0128

Merge branch 'develop' into 'release'

Develop

See merge request !16
2 parents 134333f6 9c4b8c2a
{
"name": "xrk-bi",
"version": "0.3.0-beta.10",
"version": "0.3.0-beta.11",
"description": "xrk-bi",
"author": "xrk",
"main": "dist/bundler.js",
......
......@@ -3,12 +3,12 @@
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-27 20:29:19
* @LastEditTime: 2022-04-29 12:27:09
-->
<template>
<div>
<BiBlank height="40" :usePrint="true"></BiBlank>
<div class="bi-article" v-html="content"></div>
<div class="bi-article" v-html="_content"></div>
<BiBlank height="40" :usePrint="true"></BiBlank>
</div>
</template>
......@@ -28,6 +28,18 @@ export default {
default: ''
}
},
computed: {
_content() {
return `${this.content}`.replace(
/((width)="(\d+)") ((height)="(\d+)")/g,
(...a) => {
return `style="width:1000px;height:${parseInt(
(a[6] * 1000) / a[3]
)}px;"`;
}
);
}
},
data() {
return {
option: {}
......@@ -44,8 +56,7 @@ export default {
img,
video {
width: 100%;
object-fit: contain;
height: 100%;
height: inherit;
}
}
</style>
......@@ -230,9 +230,13 @@ export default {
className = 'print-item nowarp child-nowarp';
} else {
offsetHeight = this.getArticleHeight(0, $el);
pre.totalPage += offsetHeight > baseHeight * baseScale ? 1 : 0; // 玄学
pre.totalPage += 1;
className = 'print-item child-nowarp';
}
console.log(
offsetHeight,
parseInt(offsetHeight / (baseHeight * baseScale))
);
}
const domUsePage = parseInt(offsetHeight / (baseHeight * baseScale));
if (this.printInfo) {
......
......@@ -606,6 +606,11 @@ export default {
this.coverList = tempaletList.data.data || [];
this.$nextTick(async () => {
await this.preloadImg(this.coverUrl);
// await Promise.all(
// [...document.querySelectorAll('img')].map(i =>
// this.preloadImg(i.src)
// )
// );
window.status = '1';
});
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!