瀏覽代碼

Merge branch 'feature_点餐优化' of elab-damai-h5/h5-dm-orderFront into master

tangy 1 月之前
父節點
當前提交
cc98ad1474
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      src/views/dish/lists/edit.vue
  2. 1 1
      src/views/order/goodsItem.vue

+ 2 - 2
src/views/dish/lists/edit.vue

@@ -218,7 +218,7 @@ const { optionsData } = useDictOptions<{
 
 const handleSave = async () => {
     await formRef.value?.validate()
-    if (formData.specs.length >= 5) {
+    if (formData.specs && formData.specs.length > 5) {
         feedback.msgWarning('最多添加5个规格')
         return
     }
@@ -230,7 +230,7 @@ const handleSave = async () => {
         id: number | null;
         img: string | null;
     }> = [];
-    formData.specs.forEach((spec: { name: string; items: Array<{id: number|null, tag: string}> }) => {
+    formData.specs?.forEach((spec: { name: string; items: Array<{id: number|null, tag: string}> }) => {
         spec.items.forEach(item => {
             specsList.push({
                 name: spec.name,

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

@@ -1,7 +1,7 @@
 <template>
     <div class="goods-item">
         <el-card class="w-full" shadow="never" :body-style="{ padding: '10px' }">
-            <p class="text-xl font-bold flex" style="justify-content: space-between;">{{ props.goodsItem.title }}
+            <p class="text-xl font-bold flex" style="justify-content: space-between;font-size:14px;">{{ props.goodsItem.title }}
                 <span v-if="props.goodsItem.status==1" class="p-1 rounded ml-2" style="background-color: #e0eee0;font-size: 12px;color:red;height: 20px;padding: 2px;">已出单</span>
             </p>
             <!-- 添加规格展示区域 -->