Mini App Document Mini App Document
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • Configuration

  • Interface

  • FXML syntax

    • Introduction to FXML
      • 1. Data binding
      • 2. List rendering
      • 3. Conditional rendering
      • 4. template
    • Data binding
    • List rendering
    • Conditional rendering
    • Template
    • Quote
  • FXS syntax

  • Framework
  • FXML syntax
2022-08-09
Directory

Introduction to FXML

FXML (Neuxnet Markup Language) is a set of tag languages designed by the framework, combined with basic components and event systems, to build the structure of the page.

Let's take a look at what FXML is capable of with some simple examples:

# 1. Data binding

<!--fxml-->
<view> {{message}} </view>
 page.js
Page({
  data: {
    message: 'Hello World!'
  }
})

# 2. List rendering

<!--fxml-->
<view wx:for="{{array}}"> {{item}} </view>
 page.js
Page({
  data: {
    array: [1, 2, 3, 4, 5]
  }
})

# 3. Conditional rendering

<!--fxml-->
<view wx:if="{{view == 'WEBVIEW'}}"> WEBVIEW </view>
<view wx:elif="{{view == 'APP'}}"> APP </view>
<view wx:else="{{view == 'MINA'}}"> Neuxnet </view>
 page.js
Page({
  data: {
    view: 'Neuxnet'
  }
})

# 4. template

<!--fxml-->
<template name="staffName">
  <view>
    FirstName: {{firstName}}, LastName: {{lastName}}
  </view>
</template>

<template is="staffName" data="{{...staffA}}"></template>
<template is="staffName" data="{{...staffB}}"></template>
<template is="staffName" data="{{...staffC}}"></template>
 page.js
Page({
  data: {
    staffA: {firstName: 'Alex', lastName: 'Wang'},
    staffB: {firstName: 'Yuran', lastName: 'Wu'},
    staffC: {firstName: 'Arron', lastName: 'Liu'}
  }
})

Specific capabilities and how to use them can be found in the various sections of this table of contents.

Last update: 2022/08/11, 21:35:51
Modular
Data binding

← Modular Data binding→

Copyright © 2020-2024 Neuxnet
  • Follow System
  • Light Mode
  • Dark Mode
  • Reading Mode