| | |
| | | <template> |
| | | $END$ |
| | | <div class="image-view"> |
| | | <img :src="url" @click="previewVisible=true"> |
| | | <a-modal :width="width" :visible="previewVisible" :footer="null" @cancel="handleCancel"> |
| | | <img alt="example" style="width: 100%" :src="url" /> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "ImageView" |
| | | name: "ImageView", |
| | | props: { |
| | | url: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | width: { |
| | | type: Number, |
| | | default: 600 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | previewVisible: false, |
| | | } |
| | | }, |
| | | methods: { |
| | | handleCancel() { |
| | | this.previewVisible = false; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .image-view img { |
| | | width: 100%; |
| | | height: auto; |
| | | } |
| | | </style> |
| | |
| | | :columns="columns" :data-source="dataSource" |
| | | :pagination="false" rowKey="subCode"> |
| | | <template slot="pictureUrl" slot-scope="text"> |
| | | <img v-if="text" class="picture-url" :src="webUrl+text"> |
| | | <image-view v-if="text" :url="webUrl+text"></image-view> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import getWebUrl from "@/assets/js/tools/getWebUrl"; |
| | | import ImageView from "@/pages/components/ImageView"; |
| | | export default { |
| | | name: "DrawUpload", |
| | | components: {ImageView}, |
| | | props: { |
| | | list: { |
| | | type: Array, |