liyongli 2 жил өмнө
parent
commit
cb1194a750

+ 11 - 7
src/view/allMedia/H5Mall.vue

@@ -15,7 +15,7 @@
     <el-dialog v-model="show" title="已创建页面">
       <el-table :data="localList.list">
         <el-table-column property="title" label="页面名称" />
-        <el-table-column label="状态">
+        <el-table-column label="状态" width="100px">
           <template #default="scope">
             {{ h5Status[scope.row.h5Status] }}
           </template>
@@ -41,9 +41,14 @@
             <el-button link type="primary" @click="() => editBL(scope)">
               修改
             </el-button>
-            <el-button link type="primary" @click="() => deleteBL(scope)">
-              删除
-            </el-button>
+            <el-popconfirm
+              title="是否确认删除?"
+              @confirm="() => deleteBL(scope)"
+            >
+              <template #reference>
+                <el-button link type="danger"> 删除 </el-button>
+              </template>
+            </el-popconfirm>
           </template>
         </el-table-column>
       </el-table>
@@ -141,9 +146,8 @@ const deleteBL = item => {
     data: {
       operateId: item.row.operateId,
     },
-  }).then(r => {
-    console.log(r);
-    localList.value.list.split(item.index, 1);
+  }).then(() => {
+    localList.value.list.splice(item.index, 1);
   });
 };