提交 0c97b7b9 authored 作者: wangjiahao's avatar wangjiahao

fix: 修复主题滑块删除最后一下主题,滑块箭头指向不对问题

上级 47203613
...@@ -154,11 +154,16 @@ export default { ...@@ -154,11 +154,16 @@ export default {
}) })
}, },
querySubjectWithGroup() { querySubjectWithGroup() {
this.slidersLoading = true const _this = this
_this.slidersLoading = true
querySubjectWithGroup({}).then(response => { querySubjectWithGroup({}).then(response => {
this.sliders = [] _this.sliders = []
this.sliders = response.data _this.sliders = response.data
this.slidersLoading = false _this.slidersLoading = false
if (_this.sliders.length < _this.currentIndex) {
_this.currentIndex = 1
this.$emit('reload')
}
}).catch(() => { }).catch(() => {
this.slidersLoading = false this.slidersLoading = false
}) })
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
style="height: 1px; position: absolute; left: 15px; right: 15px; top: 40px; box-sizing:border-box;border-bottom: 1px solid #e8eaed" style="height: 1px; position: absolute; left: 15px; right: 15px; top: 40px; box-sizing:border-box;border-bottom: 1px solid #e8eaed"
/> />
<div> <div>
<slider /> <slider v-if="sliderShow" @reload="sliderReload" />
</div> </div>
<!--折叠面板--> <!--折叠面板-->
<div v-if="collapseShow" style="margin: 10px;overflow-y: auto"> <div v-if="collapseShow" style="margin: 10px;overflow-y: auto">
...@@ -83,6 +83,7 @@ export default { ...@@ -83,6 +83,7 @@ export default {
}, },
data() { data() {
return { return {
sliderShow: true,
panelInfo: this.$store.state.panel.panelInfo, panelInfo: this.$store.state.panel.panelInfo,
activeNames: ['panel'], activeNames: ['panel'],
chart: null, chart: null,
...@@ -110,7 +111,12 @@ export default { ...@@ -110,7 +111,12 @@ export default {
}, },
methods: { methods: {
sliderReload() {
this.sliderShow = false
this.$nextTick(() => {
this.sliderShow = true
})
},
init() { init() {
// 初始化赋值 // 初始化赋值
const chart = deepCopy(this.canvasStyleData.chart) const chart = deepCopy(this.canvasStyleData.chart)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论