如下
- 发布:2023-11-25 18:11
- 更新:2023-11-25 18:11
- 阅读:385
产品分类: uni-app x/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 22621.1992
HBuilderX版本号: 3.98
手机系统: Android
手机系统版本号: Android 13
手机厂商: vivo
手机机型: Y77e
App下载地址或H5⽹址: https://mp-cc3f25eb-d6ea-44a4-8c91-70c11cd03d7b.cdn.bspapp.com/resources/errors/Temp1.zip
示例代码:
操作步骤:
1.访问https://mp-cc3f25eb-d6ea-44a4-8c91-70c11cd03d7b.cdn.bspapp.com/resources/errors/Temp1.zip,下载此项目
2.运行项目
1.访问https://mp-cc3f25eb-d6ea-44a4-8c91-70c11cd03d7b.cdn.bspapp.com/resources/errors/Temp1.zip,下载此项目
2.运行项目
预期结果:
正常
正常
实际结果:
报错
报错
bug描述:
uniapp x项目组件方面的两个问题
1.在同一个页面中,同时放置uni-upgrade-center-app和input组件(都是官方demo中的代码片段),input一旦单击获取焦点即闪退。
<uni-upgrade-center-app ref="upgradePopup"></uni-upgrade-center-app>
<input class="uni-input uni-input-default" value="hello uni-app x" />
报错信息:
18:04:53.742 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.Collections$SingletonList.get(Collections.java:4872)
at io.dcloud.uniapp.util.ViewGroupDrawingOrderManager.getChildDrawingOrder(ViewGroupDrawingOrderManager.kt:54)
at io.dcloud.uniapp.ui.view.UniView.getChildDrawingOrder(UniView.kt:207)
at android.view.ViewGroup.getAndVerifyPreorderedIndex(ViewGroup.java:2135)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3797)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.populateChildrenForAutofill(ViewGroup.java:3804)
at android.view.ViewGroup.getChildrenForAutofill(ViewGroup.java:3783)
at android.view.ViewGroup.dispatchProvideAutofillStructure(ViewGroup.java:3747)
at android.app.assist.AssistStructure$WindowNode.<init>(AssistStructure.java:527)
at android.app.assist.AssistStructure.<init>(AssistStructure.java:2345)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:4243)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2532)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.app.ActivityThread.main(ActivityThread.java:8595)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)
2.当picker-view的父级节点存在v-show时,切换v-show的状态时显示错乱,并且change事件的返回值错误并闪退。而将v-show切换为v-if则没有此问题。(因此将picker-view放进使用v-show来实现的弹出层中就会报错)
<view v-show="isOpen" style="width:100%;height: 500px;">
<picker-view class="picker-view" :indicator-style="indicatorStyle" :value="value" @change="bindChange" :mask-top-style="maskTopStyle" :mask-bottom-style="maskBottomStyle">
<picker-view-column class="picker-view-column">
<view class="item" v-for="(item,index) in years" :key="index"><text class="text">{{item}}年</text></view>
</picker-view-column>
<picker-view-column class="picker-view-column">
<view class="item" v-for="(item,index) in months" :key="index"><text class="text">{{item}}月</text></view>
</picker-view-column>
<picker-view-column class="picker-view-column">
<view class="item" v-for="(item,index) in days" :key="index"><text class="text">{{item}}日</text></view>
</picker-view-column>
</picker-view>
</view>
报错信息:
17:56:42.480 error: java.lang.IndexOutOfBoundsException: Index: 2147483647, Size: 24
17:56:42.480 at pages/index/index.uvue:109:4
17:56:42.480 107| const val = e.detail.value
17:56:42.480 108| this.result = val
17:56:42.480 109| this.year = this.years[val[0]]
17:56:42.480 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:56:42.480 110| this.month = this.months[val[1]]
17:56:42.480 111| this.day = this.days[val[2]]
17:56:42.810 java.lang.IllegalArgumentException: Cannot round NaN value.
at kotlin.math.MathKt__MathJVMKt.roundToInt(MathJVM.kt:619)
at io.dcloud.uts.Math.round(Math.kt:279)
at io.dcloud.uniapp.framework.UniPickerViewColumn$$initMethods$2.invoke(index.kt:1746)
at java.lang.reflect.Method.invoke(Native Method)
at io.dcloud.uniapp.vue.shared.IndexKt$callFunction$invoke$1.invoke(index.kt:640)
at io.dcloud.uniapp.vue.shared.IndexKt.callFunction(index.kt:651)
at io.dcloud.uniapp.vue.IndexKt.callWithErrorHandling(index.kt:1699)
at io.dcloud.uniapp.vue.IndexKt.callWithAsyncErrorHandling(index.kt:1708)
at io.dcloud.uniapp.vue.Invoker.invoke(index.kt:4292)
at io.dcloud.uniapp.vue.IndexKt$addEventListener$2.invoke(index.kt:4312)
at java.lang.reflect.Method.invoke(Native Method)
at io.dcloud.uts.UniCallbackWrapper.invoke(UniCallbackWrapper.kt:93)
at io.dcloud.uniapp.dom.node.DomNode.dispatchEventWithBubble(DomNode.kt:544)
at io.dcloud.uniapp.dom.node.DomNode.dispatchEvent(DomNode.kt:519)
at io.dcloud.uniapp.ui.component.BasicComponentData.dispatchEvent(BasicComponentData.kt:199)
at io.dcloud.uniapp.ui.component.BasicComponent.dispatchEvent(BasicComponent.kt:510)
at io.dcloud.uniapp.ui.component.BasicComponent.sendEvent(BasicComponent.kt:502)
at io.dcloud.uniapp.ui.component.ScrollerComponent$initComponentView$1.onScrollStopped(ScrollerComponent.kt:120)
at io.dcloud.uniapp.ui.view.scroller.UniScrollerView.onScrollStopped(UniScrollerView.kt:338)
at io.dcloud.uniapp.ui.view.scroller.UniScrollerView.handleMessage(UniScrollerView.kt:367)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.app.ActivityThread.main(ActivityThread.java:8595)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)