v-text-marquee
介绍
文本跑马灯(marquee)。
预览
引入
方式请参考组件用法 。
代码演示
基础用法
必须设置width,文字实际展示宽度大于设置宽度才会滚动。
js
<v-text-marquee :scrollable="false" :config="textMarqueeConfig" :speed="60" />js
export default {
setup() {
const textMarqueeConfig = ref({
text: '慢慢来,不要急,生活给你出了难题,可也终有一天会给出答案。',
width: 50
});
return { textMarqueeConfig };
},
};