新增轮播图bug

main
bibi 3 years ago
parent 4740daf677
commit 51cc54d6a4

@ -9,7 +9,7 @@
<template> <template>
<a-config-provider :locale="locale"> <a-config-provider :locale="locale">
<div id="app"> <div id="app">
<router-view></router-view> <router-view v-if="isRouterAlive"></router-view>
</div> </div>
</a-config-provider> </a-config-provider>
</template> </template>
@ -18,11 +18,25 @@
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN"; import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
export default { export default {
name: 'App', name: 'App',
provide () {
return {
reload: this.reload
}
},
data() { data() {
return { return {
locale: zhCN locale: zhCN,
isRouterAlive: true
}; };
}, },
methods: {
reload () {
this.isRouterAlive = false
this.$nextTick(() => {
this.isRouterAlive = true
})
}
}
} }
</script> </script>

@ -14,16 +14,16 @@
> >
<span class="card-close" @click="del(item.id)">×</span> <span class="card-close" @click="del(item.id)">×</span>
<a-row> <a-row>
<a-col :span="9" style="display:flex;justify-content: center"> <a-col :span="9">
<img <img
:src="$ImgUrl(item.imgList[0].url)" :src="$ImgUrl(item.imgList[0].url)"
v-if="item.imgList.length > 0" v-if="item.imgList.length > 0"
class="list-img" class="list-img"
alt="" alt=""
/> />
<div v-else style="align-self:center">暂无图</div> <div v-else></div>
</a-col> </a-col>
<a-col :span="11"> <a-col :span="12">
<a-descriptions layout="vertical" :column="1"> <a-descriptions layout="vertical" :column="1">
<a-descriptions-item label="链接设置"> <a-descriptions-item label="链接设置">
{{ item.customizeUrl }} {{ item.customizeUrl }}
@ -36,7 +36,7 @@
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="3">
<a-button class="add-btn" @click="edit(item)"></a-button> <a-button class="add-btn" @click="edit(item)"></a-button>
</a-col> </a-col>
</a-row> </a-row>
@ -135,6 +135,7 @@ export default {
components: { components: {
chooseTable, chooseTable,
}, },
inject: ["reload"],
data() { data() {
return { return {
table: { table: {
@ -172,6 +173,7 @@ export default {
this.$message.success(res.msg); this.$message.success(res.msg);
this.newSwiperClose(); this.newSwiperClose();
this.getData(); this.getData();
this.reload();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }

@ -81,6 +81,7 @@ export default {
}, },
data() { data() {
return { return {
inject: ["reload"],
table: { table: {
show: false, show: false,
}, },
@ -161,6 +162,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.reload();
this.newSwiperClose(); this.newSwiperClose();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);

Loading…
Cancel
Save