我在view id="elIdBox" 上面加了一个循环。
如图就重叠了数据。
请问要怎么改呢。
<view
ref="textBox"
class="uni-noticebar__content-wrapper"
:class="{ 'uni-noticebar__content-wrapper--scrollable': scrollable, 'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText) }"
>
<view
:id="elIdBox"
class="uni-noticebar__content"
:class="{ 'uni-noticebar__content--scrollable': scrollable, 'uni-noticebar__content--single': !scrollable && (single || moreText) }"
v-for="(text,index) in list"
:key="index"
>
<text
:id="elId"
ref="animationEle"
class="uni-noticebar__content-text"
:class="{ 'uni-noticebar__content-text--scrollable': scrollable, 'uni-noticebar__content-text--single': !scrollable && (single || moreText) }"
:style="{
color: color,
width: wrapWidth + 'px',
animationDuration: animationDuration,
'-webkit-animationDuration': animationDuration,
animationPlayState: webviewHide ? 'paused' : animationPlayState,
'-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState,
animationDelay: animationDelay,
'-webkit-animationDelay': animationDelay
}"
>
{{ text.content }}
</text>
props: {
list:{type: Array,default: ['aaa','bbb','cccc']}, //添加 去掉了text
}