当前位置:网站首页>Micro build low code tutorial - variable definition
Micro build low code tutorial - variable definition
2022-06-23 22:17:00 【Low code preacher】
Catalog
In the previous section, we showed how to write the first line of code in low code , In this section, we officially enter our programming teaching .
To be a programmer , The first is to learn grammar . Just like when we learn to speak , We start with words and phrases , Then organize the words into sentences , Slowly we will learn the language .
As a machine, it also has its own language , Machine language only knows 0 and 1, In order to facilitate human control of machines , The inventor of computer language made some abstraction , No matter what kind of language , There will probably be variables 、 loop 、 Branch 、 data type 、 Type conversion, etc . Of course, there are concepts such as objects in high-level languages .
As a beginner, Xiaobai , We also need to have a solid grasp of these basic concepts , Basic concepts learned , You won't be confused when learning the official template later .
This section focuses on the concept of variables . The so-called variable can be understood as a container , The box in daily life is a kind of container , We'll put the data in this box . Here's the picture :
We can use the following syntax to create a variable and give it a value
let message = "hello"
Low code uses javascript The grammar of , This variable definition is valid , But to make it easier to define variables , Low code provides a visual variable definition method .
Enter the low code console , Find the variable icon on the navigation bar
The window of variable definition pops up , The scope of variables includes global and page level
If the variable defined in the global , Every page can use , If the variable defined as page level can only be used in this page .
The method of variable definition is to move the mouse over the page name , Click next to + Number
Identification of the input variable , Select the type of variable . There are three types , They are ordinary variables 、 Model variables and parameter variables .
Common variables are javascript Variables that can be defined , Type a string( character string )、number( The number )、boolean( Boolean value )、array( Array )、object( object ). Different types can store data with different structures .
Model variables correspond to data sources , You need to select a specific data source , Generally, you can choose to obtain a single or multiple records of the data source .
Parameter variables are generally used to receive parameters during page delivery , For example, in the details page, you need to obtain the record's primary key .
In order to be consistent with the above method of using code to define variables , Let's create a basic variable here message, Variable type selection string
When defining variables, you can also set initial values , Let's give one here hello The initial value of the
Click the save button , The variable we just defined appears at the bottom of the page
边栏推荐
- TMUX support, file transfer tool Trz / Tsz (trzsz) similar to RZ / SZ
- Go language core 36 lectures (go language practice and application 26) -- learning notes
- A batch layout WAF script for extraordinary dishes
- Smart cockpit SOC competition upgraded, and domestic 7Nm chips ushered in an important breakthrough
- Hugegraph: hugegraph Hubble web based visual graph management
- DM sub database and sub table DDL "pessimistic coordination" mode introduction - tidb tool sharing
- What happened when the fortress remote login server was blocked? What can be done to solve it?
- Installation and use of Minio
- How to deploy the API gateway? Is it OK not to use the API gateway?
- The 10th Blue Bridge Cup single chip microcomputer
猜你喜欢

Ten thousand words! Understand the inheritedwidget local refresh mechanism

ICML2022 | 基于对比学习的离线元强化学习的鲁棒任务表示

Leetcode must review six lintcode (28348455116385)

How to improve the content quality of short video, these four elements must be achieved

Introduction to scikit learn machine learning practice

Smart cockpit SOC competition upgraded, and domestic 7Nm chips ushered in an important breakthrough

Intel openvino tool suite advanced course & experiment operation record and learning summary

ACL2022 | MVR:面向开放域检索的多视角文档表征

CAD图在线Web测量工具代码实现(测量距离、面积、角度等)

北大、加州伯克利大学等联合| Domain-Adaptive Text Classification with Structured Knowledge from Unlabeled Data(基于未标记数据的结构化知识的领域自适应文本分类)
随机推荐
Using h5ai to build Download Station
[open source]goravel, a fully functional and extensible golang web application framework
The time deviation is more than 15 hours (54000 seconds), and the time cannot be automatically calibrated
Detailed explanation of logical structure, physical structure and data operation
How do I install the API gateway? What should I pay attention to?
JWT implementation
CAD图在线Web测量工具代码实现(测量距离、面积、角度等)
How to transfer files from the local fortress server
Nanny level anti crawling teaching, JS reverse implementation of font anti crawling
The latest research progress of domain generalization from CVPR 2022
Modify jar package
MySQL de duplication query only keeps one latest record
Tencent cloud database tdsql elite challenge Q & A (real-time update)
Sending network request in wechat applet
什么是股票线上开户?手机开户安全么?
How to solve the loss of video source during easynvr split screen switching?
Teach you how to write a delay queue
In depth understanding of Internet of things device access layer
Knowda: all in one knowledge mixture model for data augmentation in feed shot NLP
A batch layout WAF script for extraordinary dishes