liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
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>
  <!--
        作者:wangxw
        时间:2019-11-05
        描述:diy组件 搜索栏
    -->
  <div>
    <div @click.stop="$parent.$parent.onEditer(index)">
      <div class="drag optional" :class="{selected:index === selectedIndex}">
        <div class="diy-notice" :style="{padding: item.style.paddingTop + 'px' + ' 10px', background: item.style.background}">
          <div class="notice-icon">
            <img v-img-url="item.params.icon">
          </div>
          <div class="notice-text flex-1 text-ellipsis">
            <span :style="{color: item.style.textColor}">{{item.params.text}}</span>
          </div>
        </div>
        <div class="btn-edit-del">
          <div class="btn-del" @click.stop="$parent.$parent.onDeleleItem(index)">删除</div>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
  export default {
    data() {
      return {
 
      };
    },
    props: ['item', 'index', 'selectedIndex'],
    methods: {
 
    }
  };
</script>
 
<style>
.diy-notice{ display: flex; justify-content: flex-start; align-items: center;}
.diy-notice .notice-icon{ width: 32px; height: 32px;}
.diy-notice .notice-text{ margin-left: 10px; overflow: hidden; white-space: nowrap;}
</style>