提交 3fe2a1b8 编写于 作者: huangwensu's avatar huangwensu

test1问题修复

上级 a5c1b2b6
<template>
<div class="img-container">
<img :src="imgData.url" />
</div>
</template>
<script>
export default {
name: 'imgSize',
props: {
imgData: {
type: Object,
default: {}
}
},
data() {
return {
imgWidth: 0,
imgHeight: 0,
imgProportion: 0
}
},
mounted() {
console.log("==========dddddddddd",this.imgData)
this.imgWidth = this.imgData.width;
this.imgHeight = this.imgData.height;
this.imgProportion = this.imgWidth / this.imgHeight;
console.log("==========dddddddddd",this.imgProportion)
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -790,7 +790,7 @@ export const betaHandle = (limit) => {
if(limit < 1024){ //小于0.1KB,则转化成B
size = limit + "B"
}else if(limit < (1024 * 1024)){ //小于0.1MB,则转化成KB
size = (limit/1024).toFixed(1) + "KB"
size = (limit/1024).toFixed(0) + "KB"
}else if(limit < (1024 * 1024 * 1024)){ //小于0.1GB,则转化成MB
size = (limit/(1024 * 1024)).toFixed(1) + "MB"
}else{ //其他转化成GB
......
......@@ -10,6 +10,7 @@
</div>
<div v-if="item.type == 1" class="img-content" v-viewer>
<img :src="item.url" />
<!-- <img-size :imgData="item"></img-size> -->
</div>
<div v-if="item.type == 2" class="file-content">
<div class="file-con" @click="downPDF()">
......@@ -31,12 +32,14 @@
</template>
<script>
import BreadCrumb from "@/components/breadcrumb.vue";
import ImgSize from "@/components/IM/img-size.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
export default {
components: {
BreadCrumb
BreadCrumb,
ImgSize
},
data() {
return {
......@@ -72,7 +75,7 @@ export default {
if(item.type == 2) {
item.fileSize = betaHandle(item.fileSize);
}
if(item.info.length > 23) {
if((item.type == 0) && (item.info.length > 23)) {
item.info = item.info.slice(0,23) + "..."
}
})
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册