|
@@ -16,7 +16,7 @@
|
|
|
:docY="docY"
|
|
|
:videoSrc="videoSrc"
|
|
|
@isResizing="
|
|
|
- (val) => {
|
|
|
+ val => {
|
|
|
this.isResizing = val;
|
|
|
}
|
|
|
"
|
|
@@ -27,7 +27,7 @@
|
|
|
import videoView from "./insVideo";
|
|
|
export default {
|
|
|
components: {
|
|
|
- videoView,
|
|
|
+ videoView
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -38,8 +38,8 @@ export default {
|
|
|
docY: "",
|
|
|
isShow: false,
|
|
|
showVideo: false,
|
|
|
- isResizing:false,
|
|
|
- src:""
|
|
|
+ isResizing: false,
|
|
|
+ src: ""
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -62,11 +62,11 @@ export default {
|
|
|
if (this.isShow) {
|
|
|
this.isShow = false;
|
|
|
this.initSize();
|
|
|
- this.$nextTick((res) => {
|
|
|
+ this.$nextTick(res => {
|
|
|
this.isShow = true;
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
// key() {
|
|
@@ -80,24 +80,24 @@ export default {
|
|
|
iframeHeight() {
|
|
|
return this.h - 30 + "px";
|
|
|
},
|
|
|
- videoSrc(){
|
|
|
- return this.src
|
|
|
+ videoSrc() {
|
|
|
+ return this.src;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
isShow(val) {
|
|
|
if (val) {
|
|
|
- this.$nextTick((res) => {
|
|
|
+ this.$nextTick(res => {
|
|
|
let outFrame = this.$refs.iframe;
|
|
|
let outFrameWindow = this.$refs.iframe.contentWindow;
|
|
|
- console.log(outFrame)
|
|
|
- setTimeout((res) => {
|
|
|
+ // console.log(outFrame)
|
|
|
+ setTimeout(res => {
|
|
|
let rightFrame = outFrameWindow.document.querySelector(
|
|
|
"#mainFrame"
|
|
|
);
|
|
|
rightFrame.contentWindow.document.addEventListener(
|
|
|
"click",
|
|
|
- (e) => {
|
|
|
+ e => {
|
|
|
let path = (e.composedPath && e.composedPath()) || e.path || [];
|
|
|
if (path.length > 0) {
|
|
|
for (let i in path) {
|
|
@@ -127,8 +127,8 @@ export default {
|
|
|
}, 500);
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|