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

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

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

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

@ -177,7 +177,9 @@ export default {
const elementToHighlights = [] const elementToHighlights = []
// //
for (const code of this.activeCodes) { 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) => { const isElementInHighlights = elementToHighlights.some((elementToHighlight) => {

Loading…
Cancel
Save