| | |
| | | |
| | | <script> |
| | | import { isExternal } from "@/utils/validate"; |
| | | |
| | | const DEFAULT_IMAGE = 'https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357'; |
| | | export default { |
| | | name: "ImagePreview", |
| | | props: { |
| | |
| | | computed: { |
| | | realSrc() { |
| | | if (!this.src) { |
| | | return; |
| | | return DEFAULT_IMAGE; |
| | | } |
| | | let real_src = this.src.split(",")[0]; |
| | | if (isExternal(real_src)) { |
| | |
| | | }, |
| | | realSrcList() { |
| | | if (!this.src) { |
| | | return; |
| | | return [DEFAULT_IMAGE]; |
| | | } |
| | | let real_src_list = this.src.split(","); |
| | | let srcList = []; |
| | |
| | | <el-row v-loading="loading"> |
| | | <el-col :span="8" v-for="(item, index) in contractList" :key="index" style="margin: 10px;width: 30%;"> |
| | | <el-card :body-style="{ padding: '0px' }"> |
| | | <ImagePreview style="width: 420px;height: 187px;" |
| | | <ImagePreview style="width: 100%;height: 187px;" |
| | | fit="cover" :src="item.attachment" |
| | | class="image" /> |
| | | <div style="padding: 14px;"> |