|
[开发工具]
UILoading模块在avm 中存在卡顿的问题
[复制链接]
描述: avm页面在切换的时候,进行接口请求,调用 UILoading 模块, 这个时候页面没有完全切换完成,就会导致切换的时候页面出现卡顿,非常明显
测试平台为安卓 , 7.1.2, 安卓11 手机厂商为 vivo, 荣耀 , 机型 x9i, x20
这里是demo页面,代码里面的 settimeOut 为 模拟接口请求操作
- <template>
- <view class="list-box-1">
- <button @click="openB">打开B页面,发送事件,刷新第3项</button>
- <list-view id="list" class="page">
- <cell>
- <text>{item}</text>
- </cell>
- </list-view>
- <button @click="update">本地页面刷新第一项</button>
- </view>
- </template>
- <script>
- export default {
- name: "test",
- apiready() {
- setTimeout(() => {
- let arr = []
- let json = {}
- for (let i = 1; i <= 102; i++) {
- let json = {
- frame: "widget://image/loading/" + i + ".png",
- }
- arr.push(json)
- }
- let activity = api.require("UILoading")
- activity.keyFrame({
- rect: {
- w: 80,
- h: 80,
- },
- styles: {
- bg: "rgba(0,0,0,0.5)",
- corner: 5,
- interval: 20,
- frame: {
- w: 60,
- h: 60,
- },
- },
- content: arr,
- mask: "rgba(0,0,0,0)",
- })
- }, 100)
- },
- data() {
- return {
- lists: [],
- }
- },
- methods: {},
- }
- </script>
- <style>
- .page {
- width: 100%;
- height: 100%;
- }
- .bug-style {
- display: flex;
- flex-flow: row;
- }
- .list-box-1 {
- width: 100%;
- margin-top: 30px;
- height: 400px;
- }
- </style>
复制代码
|
|