diff --git a/src/App.vue b/src/App.vue index d48df0d11a663e7b266f3200ff958e0672445ac8..91281b95ff7e7ae8255cce7a78899c6ea3970351 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,8 +2,12 @@ import { ref, nextTick } from 'vue'; const noticeList = ref([]); -const startScroll = async () => { - const list = ['测试文字', '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈']; +const getNoticeList = async () => { + const list = [ + '测试文字', + '11111111111111111111111111111111111111111111111111111111', + '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈', + ]; noticeList.value = list; nextTick(() => { const content = document.querySelector('.scroll-content'); @@ -17,38 +21,28 @@ const startScroll = async () => { }); }; -startScroll(); +getNoticeList();