mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
fix(NoticeBar): allow dynamic setting of scrollable (#6190)
This commit is contained in:
parent
c885801f32
commit
d68943cd73
@ -37,10 +37,9 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
scrollable: 'start',
|
||||||
text: {
|
text: {
|
||||||
handler() {
|
handler: 'start',
|
||||||
this.start();
|
|
||||||
},
|
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -69,7 +68,7 @@ export default createComponent({
|
|||||||
this.duration = 0;
|
this.duration = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
start(){
|
start() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const { wrap, content } = this.$refs;
|
const { wrap, content } = this.$refs;
|
||||||
if (!wrap || !content) {
|
if (!wrap || !content) {
|
||||||
@ -87,7 +86,7 @@ export default createComponent({
|
|||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user