fix:修复tab组件控制台报错

main
liu.shiyi 2 years ago
parent df5f6b0bea
commit 08fdd4ecb9

@ -40,6 +40,7 @@
<!-- @openRightPanel="openRightPanel"-->
<!-- >-->
<div
v-if="config.customize.tabList[currentIndex].chartCode"
class="configuration-wrap"
:class="{
'active': activeCodes.includes(config.customize.tabList[currentIndex].chartCode),

@ -258,7 +258,7 @@ export default {
},
addTab () {
const newTab = {
chartCode: new Date().getTime() + '',
chartCode:'',
name: '',
chart: { parentCode: this.config.code }
}

@ -177,7 +177,9 @@ export default {
const elementToHighlights = []
//
for (const code of this.activeCodes) {
elementToHighlights.push(this.$refs['RenderCard' + code][0])
if (this.$refs['RenderCard' + code] &&this.$refs['RenderCard' + code].length && this.$refs['RenderCard' + code][0]){
elementToHighlights.push(this.$refs['RenderCard' + code][0])
}
}
const isElementInHighlights = elementToHighlights.some((elementToHighlight) => {

Loading…
Cancel
Save