浏览代码

增加通用奖品按钮

huaqiangj 2 年之前
父节点
当前提交
c1285ea8d5
共有 2 个文件被更改,包括 32 次插入1 次删除
  1. 4 0
      src/assets/svg/icon-add-white.svg
  2. 28 1
      src/view/components/currency-list.vue

+ 4 - 0
src/assets/svg/icon-add-white.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<line x1="3" y1="10" x2="17" y2="10" stroke="white" stroke-width="2"/>
+<line x1="10" y1="17" x2="10" y2="3" stroke="white" stroke-width="2"/>
+</svg>

+ 28 - 1
src/view/components/currency-list.vue

@@ -58,7 +58,6 @@
                 <div class="no-data" v-if="show_empty">
                     Not found
                 </div>
-
             </div>
             <!-- 显示搜索结果列表 -->
             <div class="search-list" v-else>
@@ -87,6 +86,11 @@
                     Not found
                 </div>
             </div>
+            <!-- 添加通用奖品 -->
+            <div class="add-general-lottery" v-if="showGeneralLottery" @click="addGeneralLottery">
+                <img class="add-general-lottery-icon" :src="require('@/assets/svg/icon-add-white.svg')" />
+                <span class="add-general-lottery-text">Customize</span>
+            </div>
         </div>
     </div>
 </template>
@@ -322,6 +326,7 @@ defineExpose({
     .list-wrapper {
         height: calc(100% - 60px);
         overflow-y: auto;
+        padding-bottom: 50px;
 
         .list-item {
             .item-title {
@@ -407,6 +412,28 @@ defineExpose({
             left: 50%;
             transform: translate(-50%, -50%);
         }
+
+        .add-general-lottery {
+            position: absolute;
+            bottom: 0;
+            left: 0;
+            display: flex;
+            width: 100%;
+            height: 50px;
+            align-items: center;
+            justify-content: center;
+            background-color: #1D9BF0;
+            color: #fff;
+            cursor: pointer;
+
+            &-icon {
+                margin-right: 8px;
+            }
+
+            &-text {
+                font-size: 16px;
+            }
+        }
     }
 }
 </style>