|
贡献一下AVM代码,感谢楼主提供思路
- <template>
- <view class="page">
- <view class="walking_lantern_one">
- <text class="walking_lantern_one_notetz_msg" style={{'left:'+note_left}}>
- {{note_msg}}
- </text>
- </view>
- </view>
- </template>
- <style>
- .page{
- background: #000;
- width: 100%;
- height: 100%;
- padding-top: 100px;
- }
- .walking_lantern_one{
- background: #fff;
- flex-direction: row;
- }
- .walking_lantern_one_notetz_msg{
- font-size: 13px;
- height: 20px;
- line-height: 20px;
- color: #444;
- width: 100%;
- }
- </style>
- <script>
- export default {
- name: "walking_lantern_one",
- data() {
- return {
- note_left:0,
- winWidth:0,
- note_msg:"圣诞节快圣诞节快上班都没上班的吗你水果的话术时代就开始哭的好时机肯定会接受,不得你搜不到吗你说过话就是打开"
- }
- },
- apiready() {
- this.data.winWidth = api.winWidth;
- var setint = setInterval(() => {
- this.data.note_left-=1;
- if( this.data.note_left <= -(this.data.winWidth) ){
- this.data.note_left=this.data.winWidth;
- }
- },30);
- },
- };
- </script>
复制代码
移除定时器啥的都没写 自己鼓捣吧
|
|