chore: dispose vue version
parent
5b6d40ec84
commit
24ede94012
|
|
@ -15,7 +15,9 @@ export default {
|
|||
|
||||
beforeUpdate() {
|
||||
// freezing to prevent unnessessary Reactifiation of vNodes
|
||||
this.iApp.children = Object.freeze(this.$slots.default)
|
||||
if (this.iApp) {
|
||||
this.iApp.children = Object.freeze(this.$slots.default)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getContentWindow() {
|
||||
|
|
@ -63,7 +65,9 @@ export default {
|
|||
const el = document.createElement('DIV') // we will mount or nested app to this element
|
||||
body.appendChild(el)
|
||||
|
||||
const iApp = new Vue({
|
||||
const Constructor = Vue || window.Vue
|
||||
|
||||
const iApp = new Constructor({
|
||||
name: 'iApp',
|
||||
// freezing to prevent unnessessary Reactifiation of vNodes
|
||||
data: { children: Object.freeze(children) },
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { version } from 'vue'
|
||||
import * as Vue from 'vue'
|
||||
import * as PDF from 'pdfjs-dist/es5/build/pdf.js'
|
||||
import PDFWorker from 'pdfjs-dist/es5/build/pdf.worker.js'
|
||||
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
|
||||
*/
|
||||
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()
|
||||
|
||||
const MARGIN_OFFSET = 20
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ export default {
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
.catalog-icon {
|
||||
> svg {
|
||||
|
|
|
|||
Loading…
Reference in New Issue