Blame view

src/components/NCC-enlarge/index.vue 839 Bytes
be009217   monkeyhouyi   处理,通知公告,任务中心
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  <template>
    <div class="enlarge-main">
      <img :src="img" class="enlarge-img" @click="dialogVisible = true" title="点击查看放大" />
      <el-dialog :visible.sync="dialogVisible" append-to-body width="600px"
        class="NCC-dialog NCC-dialog_center enlarge-dialog">
        <img width="100%" :src="img" alt />
      </el-dialog>
    </div>
  </template>
  
  <script>
  export default {
    props: ["img"],
    data() {
      return {
        dialogVisible: false
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .enlarge-main {
    cursor: pointer;
    display: inline-block;
    width: 120px;
    height: 120px;
    overflow: hidden;
    margin: 0 8px 8px 0;
    border: 1px solid #c0ccda;
    border-radius: 6px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    .enlarge-img {
      width: 120px;
      height: 120px;
      object-fit: contain;
    }
  }
  </style>