Procházet zdrojové kódy

点餐台优化菜品展示

licc před 4 týdny
rodič
revize
fea3e42e40
2 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 7 2
      src/views/order/console.vue
  2. 1 1
      src/views/order/goodsItem.vue

+ 7 - 2
src/views/order/console.vue

@@ -133,9 +133,14 @@
                             v-for="item in dishList"
                             :key="item.id"
                             class="float-left md:w-40 w-1/2 md:h-38 h-auto p-1"
+                            style="user-select: none;"
                         >
-                            <a href="javascript:void(0);" @click="addGoods(item)"
-                                ><el-card shadow="never" :body-style="{ padding: '0px' }">
+                            <a href="javascript:void(0);" @click="addGoods(item)" :class="{ 'pointer-events-none': item.isShow == 0 }"
+                                ><el-card shadow="never" :body-style="{ padding: '0px' }" :class="{ 'relative': item.isShow == 0 }">
+                                    <div v-if="item.isShow == 0" class="absolute inset-0 bg-white z-10 pointer-events-none flex items-center justify-center select-none" 
+                                    style="opacity: 0.5;color: red;font-size: 25px;">
+                                    <span class="text-gray-600 font-medium">已售罄</span>
+                                </div>
                                     <el-image
                                         style="width: 100%; height: 100px"
                                         :src="item.image"

+ 1 - 1
src/views/order/goodsItem.vue

@@ -23,7 +23,7 @@
                 <span class="float-right">
                     <el-button-group size="small">
                         <el-button @click="reduce()"> - </el-button>
-                        <el-button @click="add()"> + </el-button>
+                        <el-button @click="add()" :disabled="props.goodsItem.isShow==0"> + </el-button>
                     </el-button-group>
                 </span>
             </div>