Web和List嵌套手势冲突问题

Web和List嵌套手势冲突问题

HarmonyOS
2024-06-05 20:59:15
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
易安安安

请参考如下代码:

import webview from '@ohos.web.webview'; 
 
@Entry 
@Component 
struct Index { 
  @State message: string = 'Hello World'; 
  private testNumber1: number[] = [1, 2, 3, 11, 22, 33, 44, 55] 
  private testNumber2: number[] = [4, 5, 6, 7, 8, 9] 
  controller: webview.WebviewController = new webview.WebviewController(); 
 
  build() { 
    Column() { 
      List() { 
        ForEach(this.testNumber1, (item: number) => { 
          ListItem() { 
            Text(item + '') 
              .fontSize(20) 
              .fontColor(Color.Red) 
              .height(50) 
          } 
        }, (item: string) => item) 
        ListItem() { 
          Web({ 
            src: 'www.baidu.com', 
            controller: this.controller 
          }) 
            .height(200) 
        } 
 
        ForEach(this.testNumber2, (item: number) => { 
          ListItem() { 
            Text(item + '') 
              .fontSize(20) 
              .fontColor(Color.Red) 
              .height(50) 
          } 
        }, (item: string) => item) 
      } 
      .alignListItem(ListItemAlign.Center) 
      .divider({ strokeWidth: 2 }) 
 
    } 
    .height('100%') 
  } 
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
分享
微博
QQ
微信
回复
2024-06-06 21:23:12
相关问题
HarmonyOS Scroll嵌套web手势冲突
681浏览 • 1回复 待解决
HarmonyOS ListWeb嵌套问题
684浏览 • 1回复 待解决
HarmonyOS List嵌套ListList嵌套Grid问题
885浏览 • 1回复 待解决
HarmonyOS Web组件List嵌套使用问题
1304浏览 • 1回复 待解决
HarmonyOS list嵌套MapComponent滑动冲突
581浏览 • 1回复 待解决
HarmonyOS list 嵌套web滑动切换问题
1219浏览 • 1回复 待解决
ArkTS UI的List集合List冲突问题
1306浏览 • 1回复 待解决
HarmonyOS Scroll中嵌套List滑动事件冲突
811浏览 • 1回复 待解决
HarmonyOS List+Swipe+web滑动冲突
664浏览 • 1回复 待解决
HarmonyOS scrolllist滚动冲突
1122浏览 • 1回复 待解决
HarmonyOS Refresh组件嵌套滑动冲突问题
1920浏览 • 1回复 待解决
HarmonyOS TabsWeb嵌套左右滑动问题
903浏览 • 1回复 待解决
HarmonyOS Scroll+web+list嵌套滑行
637浏览 • 1回复 待解决
scrolllist嵌套滑动
2547浏览 • 1回复 待解决
HarmonyOS 嵌套滚动冲突
869浏览 • 1回复 待解决