<template>
  <Modal
    v-model="isOpen"
    title="图片"
    @on-cancel="cancel">
    <img :src="imgSrc" width="100%" />
  </Modal>
</template>

<script>
export default {
  name: 'CImage',
  data () {
    return {
      isOpen: false,
      imgSrc: ''
    }
  },
  methods: {
    init (info) {
      this.imgSrc = info.src
      this.isOpen = true
    },
    cancel () {
      this.isOpen = false
      this.imgSrc = ''
    }
  }
}
</script>

<style scoped>

</style>
