|
@@ -58,8 +58,8 @@
|
|
修改
|
|
修改
|
|
</el-button>
|
|
</el-button>
|
|
</router-link>
|
|
</router-link>
|
|
- <el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" @click="handleDelete(scope)">
|
|
|
|
- 删除
|
|
|
|
|
|
+ <el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" :disabled="scope.row.status != 1" @click="handleDelete(scope)">
|
|
|
|
+ 隐藏
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -70,7 +70,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { fetchList, deleteBanner } from '@/api/banner'
|
|
|
|
|
|
+import { fetchList, deleteBanner, fetchBanner } from '@/api/banner'
|
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
|
import waves from '@/directive/waves'
|
|
import waves from '@/directive/waves'
|
|
|
|
|
|
@@ -145,7 +145,8 @@ export default {
|
|
})
|
|
})
|
|
.then(async() => {
|
|
.then(async() => {
|
|
await deleteBanner(row.id)
|
|
await deleteBanner(row.id)
|
|
- this.list.splice($index, 1)
|
|
|
|
|
|
+ const rs = await fetchBanner(row.id)
|
|
|
|
+ this.list.splice($index, 1, rs.data.info)
|
|
this.$message({
|
|
this.$message({
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '隐藏成功'
|
|
message: '隐藏成功'
|