diff --git a/frontend/src/components/widget/deWidget/DeTabs.vue b/frontend/src/components/widget/deWidget/DeTabs.vue index 6e401c8166..60c25fda40 100644 --- a/frontend/src/components/widget/deWidget/DeTabs.vue +++ b/frontend/src/components/widget/deWidget/DeTabs.vue @@ -470,8 +470,8 @@ export default { let switchCount = 1 // 轮播定时器 this.timer = setInterval(() => { - switchCount++ const nowIndex = switchCount % this.element.options.tabList.length + switchCount++ this.activeTabName = this.element.options.tabList[nowIndex].name }, switchTime) } diff --git a/frontend/src/components/widget/deWidget/TabStyle.vue b/frontend/src/components/widget/deWidget/TabStyle.vue index c73831ad80..0813f2d94a 100644 --- a/frontend/src/components/widget/deWidget/TabStyle.vue +++ b/frontend/src/components/widget/deWidget/TabStyle.vue @@ -135,8 +135,9 @@ type="number" size="mini" :min="2" + :max="3600" class="hide-icon-number" - @change="styleChange" + @change="switchTimeChange" > @@ -180,6 +181,14 @@ export default { const current = this.$refs[pickKey] current && (current.showPicker = true) }, + switchTimeChange() { + if (!this.styleInfo.switchTime || this.styleInfo.switchTime < 2) { + this.styleInfo.switchTime = 2 + } else if (this.styleInfo.switchTime && this.styleInfo.switchTime > 3600) { + this.styleInfo.switchTime = 3600 + } + this.styleChange() + }, styleChange() { this.$store.commit('canvasChange') }