Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Cloud Data Center
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Domain Name Service
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
DataArts Fabric
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooPhone
KooDrive
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Meeting
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Industry Video Management Service
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
On this page

Show all

Help Center/ Huawei Cloud Astro Zero/ FAQs/ Application Frontend Development/ How Do I Implement the Asynchronous Pull-up Data Loading on Mobile Devices on a Standard Page?

How Do I Implement the Asynchronous Pull-up Data Loading on Mobile Devices on a Standard Page?

Updated on 2025-03-20 GMT+08:00

On a standard page, add a list view widget to implement asynchronous pull-up data loading on mobile devices. The procedure is as follows:

  1. On the Huawei Cloud Astro Zero console, click Access Homepage.
  2. On the Homepage > All Apps page, click Edit next to an application to access the application designer.
  3. Create a standard page and design it.

    1. On the application designer page, click + next to Page and enter a page label and name to create a standard page.
    2. Choose Basic > Layout and drag a list view widget to the canvas.
      Figure 1 Adding a list view widget
    3. Drag an input widget from Form to the List View widget.
      Figure 2 Adding an input widget
    4. Select the list view widget, choose Properties > Mobile Configuration, set the value of Default Data Count to 5, and enable Loading Text and Async Loading.
      Figure 3 Mobile configuration

  4. Bind data to the widget.

    1. Select the list view widget, choose Properties > Data Binding, and click next to Value Binding.
      Figure 4 Clicking the icon
    2. Click New, specify Model Name (for example, datasource), select Custom for Source, and click Next.
      Figure 5 Adding a model
    3. Click Add Node to add a value node, and click Next.
      Figure 6 Adding a node
    4. Click OK. On the model selection page that is displayed, select the created model.
      Figure 7 Selecting the model
    5. Select the input widget and perform the preceding operations to bind the value field to the widget.
      Figure 8 Binding a model to the input widget

  5. Add an event.

    1. Select the page. On the Events tab page, click + next to on-load.
      Figure 9 Adding an event
    2. Under Custom Action, enter the following sample code and click Create.
      const list = [];
      for (let i = 0; i < 5; i++) {
          list.push({
              value: i + 1
          })
      }
      $model.ref('datasource').setData(list);

      Set datasource to the model created in 4.b.

    3. Select the list view widget and repeat the preceding operations to add events for it.
      Figure 10 Adding events
      Figure 11 Entering the custom JavaScript code
      const list = [];
      for (let i = 0; i < 5; i++) {
          list.push({
              value: i + 1
          })
      }
      context.$params[0](list);

  6. Check whether the effect meets the expectation.

    1. Click in the upper part of the page to save the standard page.
    2. Click to preview the effect on the mobile device.
      Figure 12 Original display effect
    3. Hold down the left mouse button and drag it up. The data can be loaded properly.
      Figure 13 Asynchronous data loading

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback
咨询盘古Doer

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback