强制横屏

ds1.0
fanluyan 2 years ago
parent d4f1258bcb
commit ff995bebe8

@ -8,6 +8,7 @@
<div
class="bigimg"
:class="nopicClass ? 'picNo' : ''"
v-if="
bigPicPath.indexOf('nopic') == -1 &&
bigPicPath.indexOf('videos') == -1
@ -259,6 +260,7 @@ export default {
canvasloading: false,
bigImgPath: "",
picRadio: "", //
nopicClass: false,
};
},
mounted() {
@ -301,8 +303,10 @@ export default {
created() {},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
this.bigPicPath = defaultImage;
console.log(e);
if (e.isTrusted) {
e.target.src = defaultImage;
}
},
async downLoadPic(path, name) {
const imgUrl = path;
@ -433,9 +437,17 @@ export default {
this.canvas = this.$refs.myCanvas;
this.imgpic = this.$refs.picJpg;
console.log(this.canvas);
console.log(this.imgpic);
console.log(this.imgpic.src);
if (this.imgpic.src.indexOf("nodatapic") !== -1) {
console.log("aaa");
this.nopicClass = true;
} else {
this.nopicClass = false;
console.log("bbb");
}
this.canvas.width = this.imgpic.offsetWidth; //
this.canvas.height = this.imgpic.offsetHeight; //
this.ctx = this.canvas.getContext("2d");
console.log(this.localPoints);
if (this.flagline == true) {
@ -547,11 +559,14 @@ export default {
//
handleBigpic(row, index) {
console.log(row);
console.log();
this.activeSmall = index;
this.mediaType = row.mediaType;
console.log(this.$refs.picJpg);
this.bigPicPath = row.path + "!1366x768";
this.picRadio = row.width + "x" + row.height;
console.log();
// this.bgbigPath = row.path + "!1366x768";
getCoordinate({
channelId: row.channelId,
@ -715,6 +730,16 @@ export default {
z-index: 2;
}
}
.picNo {
.bigimgView {
opacity: 1;
.animImg {
opacity: 1;
cursor: default;
pointer-events: none;
}
}
}
img {
width: 100%;
height: 100%;

Loading…
Cancel
Save