forked from github/dataease
Merge pull request #3941 from dataease/pr@dev@fix_tab-move
fix(仪表板): 修复仪表板中其他组件拖入Tab组件页面不可用问题
This commit is contained in:
commit
8a7b655cd9
@ -202,9 +202,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<text-attr
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId"
|
||||
&&
|
||||
is-edit
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId && isEdit"
|
||||
:canvas-id="curComponent.canvasId"
|
||||
:scroll-left="scrollLeft"
|
||||
:scroll-top="scrollTop"
|
||||
@ -466,15 +464,20 @@ export default {
|
||||
}
|
||||
},
|
||||
initCarousel() {
|
||||
this.timer && clearInterval(this.timer)
|
||||
if (this.element.style.carouselEnable) {
|
||||
const switchTime = (this.element.style.switchTime || 5) * 1000
|
||||
const _this = this
|
||||
_this.timer && clearInterval(_this.timer)
|
||||
if (_this.element.style.carouselEnable) {
|
||||
const switchTime = (_this.element.style.switchTime || 5) * 1000
|
||||
let switchCount = 1
|
||||
// 轮播定时器
|
||||
this.timer = setInterval(() => {
|
||||
const nowIndex = switchCount % this.element.options.tabList.length
|
||||
_this.timer = setInterval(() => {
|
||||
const nowIndex = switchCount % _this.element.options.tabList.length
|
||||
switchCount++
|
||||
this.activeTabName = this.element.options.tabList[nowIndex].name
|
||||
_this.activeTabName = _this.element.options.tabList[nowIndex].name
|
||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||
if (targetRef) {
|
||||
targetRef[0].restore()
|
||||
}
|
||||
}, switchTime)
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user