harmony 鸿蒙@ohos.arkui.advanced.SwipeRefresher(内容加载)

2023-10-30 浏览 (766)

@ohos.arkui.advanced.SwipeRefresher(内容加载)

内容加载指获取内容并加载出来,常用于衔接展示下拉加载的内容。

说明:

该组件及其子组件从 API Version 10 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。

导入模块

import { SwipeRefresher } from '@ohos.arkui.advacned.SwipeRefresher'

子组件

属性

支持通用属性

SwipeRefresher

SwipeRefresher ({content: string, isLoading: boolean})

装饰器类型:@Component

系统能力: SystemCapability.ArkUI.ArkUI.Full

参数:

名称参数类型必填装饰器类型说明
contentstring@Prop内容加载时显示的文本。
isLoadingboolean@Prop当前是否正在加载。

事件

支持通用事件

示例

import { SwipeRefresher } from '@ohos.arkui.advaned.SwipeRefresher';

@Entry
@Component
struct Index {
  build() {
    Column() {
      SwipeRefresher({
        content: '正在加载中',
        isLoading: true })
      SwipeRefresher({
        isLoading: true })
      SwipeRefresher({
        content: '正在加载中',
        isLoading: false })
    }
  }
}

Snipaste_2023-07-24_11-35-40

你可能感兴趣的鸿蒙文章

harmony 鸿蒙基于ArkTS的声明式开发范式

harmony 鸿蒙@ohos.arkui.advanced.Counter(计数器组件)

harmony 鸿蒙@ohos.arkui.advanced.SegmentButton(分段按钮)

harmony 鸿蒙@ohos.multimedia.avCastPicker (投播组件)

harmony 鸿蒙属性动画

harmony 鸿蒙枚举说明

harmony 鸿蒙Blank

harmony 鸿蒙Button

harmony 鸿蒙CalendarPicker

harmony 鸿蒙Checkbox

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/a875ecf944a54260865db0440429e8f6