chore: dispose vue version
parent
5b6d40ec84
commit
24ede94012
|
|
@ -15,7 +15,9 @@ export default {
|
||||||
|
|
||||||
beforeUpdate() {
|
beforeUpdate() {
|
||||||
// freezing to prevent unnessessary Reactifiation of vNodes
|
// freezing to prevent unnessessary Reactifiation of vNodes
|
||||||
|
if (this.iApp) {
|
||||||
this.iApp.children = Object.freeze(this.$slots.default)
|
this.iApp.children = Object.freeze(this.$slots.default)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getContentWindow() {
|
getContentWindow() {
|
||||||
|
|
@ -63,7 +65,9 @@ export default {
|
||||||
const el = document.createElement('DIV') // we will mount or nested app to this element
|
const el = document.createElement('DIV') // we will mount or nested app to this element
|
||||||
body.appendChild(el)
|
body.appendChild(el)
|
||||||
|
|
||||||
const iApp = new Vue({
|
const Constructor = Vue || window.Vue
|
||||||
|
|
||||||
|
const iApp = new Constructor({
|
||||||
name: 'iApp',
|
name: 'iApp',
|
||||||
// freezing to prevent unnessessary Reactifiation of vNodes
|
// freezing to prevent unnessessary Reactifiation of vNodes
|
||||||
data: { children: Object.freeze(children) },
|
data: { children: Object.freeze(children) },
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { version } from 'vue'
|
import * as Vue from 'vue'
|
||||||
import * as PDF from 'pdfjs-dist/es5/build/pdf.js'
|
import * as PDF from 'pdfjs-dist/es5/build/pdf.js'
|
||||||
import PDFWorker from 'pdfjs-dist/es5/build/pdf.worker.js'
|
import PDFWorker from 'pdfjs-dist/es5/build/pdf.worker.js'
|
||||||
import IFrameV3 from '../IFrame/IFrameV3'
|
import IFrameV3 from '../IFrame/IFrameV3'
|
||||||
|
|
@ -78,7 +78,11 @@ import rotateWrapperStyle from '!!css-loader!!sass-loader!../RotateWrapper/Rotat
|
||||||
/**
|
/**
|
||||||
* vue version > 3.0 has version property
|
* vue version > 3.0 has version property
|
||||||
*/
|
*/
|
||||||
const VUE_VERSION = Number((version || '2.6').split('.')[0])
|
const version =
|
||||||
|
(Vue && (Vue.defalut ? Vue.defalut.version : Vue.version)) ||
|
||||||
|
(window.Vue && window.Vue.version) ||
|
||||||
|
'2.x'
|
||||||
|
const VUE_VERSION = Number(version.split('.')[0])
|
||||||
PDF.GlobalWorkerOptions.workerPort = new PDFWorker()
|
PDF.GlobalWorkerOptions.workerPort = new PDFWorker()
|
||||||
|
|
||||||
const MARGIN_OFFSET = 20
|
const MARGIN_OFFSET = 20
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
.catalog-icon {
|
.catalog-icon {
|
||||||
> svg {
|
> svg {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue