quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
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
41
42
43
44
<template>
  <!--
        作者:luoyiming
        时间:2020-06-20
        描述:diy组件-模拟显示-在线客服
    -->
  <div class="diy-service-wrap" :style="{ right: item.style.right + '%', bottom: item.style.bottom + '%' }">
    <div class="diy-service drag optional drag__nomove" @click.stop="$parent.$parent.onEditer(index)" :class="{ selected: index === selectedIndex }">
      <div class="service-icon" :style="{ opacity: item.style.opacity / 100 }"><img v-img-url="item.params.image" alt="" /></div>
      <div class="btn-edit-del"><div class="btn-del" @click.stop="$parent.$parent.onDeleleItem(index)">删除</div></div>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {};
  },
  props: ['item', 'index', 'selectedIndex'],
  methods: {}
};
</script>
 
<style>
.diy-phone-container .diy-phone-item > div.diy-service-wrap {
  position: absolute;
  z-index: 90;
}
.diy-service {
  width: 60px;
  height: 60px;
}
.diy-service .service-icon {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.diy-service .service-icon img {
  width: 40px;
  height: 40px;
}
</style>