Skip to content

Commit 863c618

Browse files
committed
fix(scroll-nav-bar): vue warn prop modify
1 parent 034f3d8 commit 863c618

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/scroll-nav-bar/scroll-nav-bar.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="cube-scroll-nav-bar-items" ref="items">
99
<div
1010
class="cube-scroll-nav-bar-item"
11-
v-for="(txt, index) in txts"
11+
v-for="(txt, index) in usedTxts"
1212
:key="index"
1313
:class="{'cube-scroll-nav-bar-item_active': active === labels[index]}"
1414
@click="clickHandler(labels[index])">
@@ -73,13 +73,14 @@
7373
},
7474
data() {
7575
return {
76-
active: this.current
76+
active: this.current,
77+
usedTxts: this.txts
7778
}
7879
},
7980
watch: {
8081
labels(newLabels) {
8182
if (this._defaultTxts) {
82-
this.txts = newLabels
83+
this.usedTxts = newLabels
8384
}
8485
},
8586
current(newVal) {

0 commit comments

Comments
 (0)