Skip to content

Commit 85d292e

Browse files
committed
<update>(index-list): optimize code
1 parent 5043d04 commit 85d292e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/index-list/index-list.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<h1 class="cube-index-list-title" v-if="title" ref="title" @click="titleClick">
1111
{{title}}
1212
</h1>
13-
<ul ref="groups">
13+
<ul>
1414
<slot>
1515
<cube-index-list-group v-for="(group, index) in data" :key="index" :group="group" @select="selectItem">
1616
</cube-index-list-group>
@@ -135,7 +135,7 @@
135135
this._scrollTo(anchorIndex)
136136
},
137137
_calculateHeight() {
138-
this.groupList = this.$el.querySelectorAll('.cube-index-list-group')
138+
this.groupList = this.$el.getElementsByClassName('cube-index-list-group')
139139
140140
if (!this.groupList) {
141141
return

0 commit comments

Comments
 (0)