当前位置:网站首页>Introduction to micro build low code zero Foundation (lesson 2)
Introduction to micro build low code zero Foundation (lesson 2)
2022-04-23 01:51:00 【Low code preacher】
We made a small example in the first lesson , Click on the text component , A message pops up
In this section, we continue to introduce the relevant knowledge in low code .
API Application program interface (Application Programming Interfaces), Is a common technical concept in low code , In low code, we have a lot of API have access to . Micro build low code provides two types API Interface , Divided into front end API Back end API.
front end API Including interface interaction interface 、 Tool related interfaces 、 Routing related interface 、 Data source related interfaces 、 Several types of platform related interfaces .
Display the pop-up effect in the way of code call
For example, in the example we introduced in Lesson 1 , Platform method called ,showModal Popup .
In addition to setting directly in the behavior , We can also call through code . You can write a custom method . Find the low code editor in the function menu in the upper left corner
Then under the corresponding page handler Click next to the + Number , Create custom method
Then from the front end of the official document API Find sample code in
Paste into the editor
export default function ({
event, data }) {
app.showModal({
title: ' Tips ',
content: ' This is a modal pop-up window ',
success(res) {
if (res.confirm) {
console.log(' The user clicks OK ');
} else if (res.cancel) {
console.log(' The user clicks cancel ');
}
}
});
}
After the custom method is created successfully, we can set it as a custom method in the behavior
Except that it can be called in low code api Outside , The most common is in expression calls api. For example, format the conversion date
Small example Format date
If a date type field is set in the data source , The time stamp is displayed in the front-end display , A string of numbers . In order to display normally, we need to format the timestamp , Become the date format we want .
Let's create a data source first , There's a title inside 、 Release date two fields , The type of release date is date type
Then add a data list component to the page , Set up the data source , Bind the content inside to the corresponding field
If you bind directly, the field displays a timestamp , A string of numbers , If we want to format the output, we can do it when the variable is bound , Call... Through an expression API To achieve
app.utils.formatDate(new Date(forItems.id8.faburiqi), 'yyyy-mm-dd')
After formatting the binding , You can see that the date can be displayed normally
Server side API The external system needs to integrate micro interface , You can call . Because it's an introductory course , Let's not introduce this for the time being , Small partners in need can study the official documents by themselves : Server side API
summary
Let's talk about the calling front end of the middle note in this code. api Two ways , Then it introduces a small example of formatting dates . Low code learning also needs to be solid , Daily arch , More accumulation , When you do a project in the future, you can catch it .
版权声明
本文为[Low code preacher]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220910435415.html
边栏推荐
- 单片机和4G模块通信总结(EC20)
- How to choose a good dial-up server?
- 搭建网站是用物理机还是云主机好?
- Analyze the advantages and disadvantages of tunnel proxy IP.
- How can e-procurement become a value-added function in the supply chain?
- keil mdk中文乱码,两种解决方法,字体不再难看
- 安装mysql出问题求解决
- Makefile文件是什麼?
- FL studio20. 8 the latest Chinese version installation and download graphic tutorial
- Jerry's AI server [chapter]
猜你喜欢
Is it better to use a physical machine or a virtual machine to build a website?
数字藏品平台入驻 数字藏品平台开发 数字藏品SaaS平台
Analyze the advantages and disadvantages of tunnel proxy IP.
Server 2019 the available memory of the server is half of the actual memory
揭秘被Arm编译器所隐藏的浮点运算
ESP32使用freeRTOS的消息队列
What categories do you need to know before using proxy IP?
Redis implements distributed locks
FL studio20.8最新中文版本安装下载图文教程
W801/W800-wifi-socket开发(二)-UDP蓝牙控制wifi连接
随机推荐
How to "gracefully" measure system performance
2022.4.10-----leetcode. eight hundred and four
How to choose a good dial-up server?
JSP basic knowledge summary
[experience tutorial] Alipay balance automatically transferred to the balance of treasure how to set off, cancel Alipay balance automatically transferred to balance treasure?
The sixth season of 2022, the perfect children's model IPA national race leads the yuanuniverse track
Summary of LSF usage
什么时候应该编写单元测试?什么是TDD?
The leader / teacher asks to fill in the EXCEL form document. How to edit the word / Excel file on the mobile phone and fill in the Excel / word electronic document?
力扣(LeetCode)112. 路径总和(2022.04.22)
一些使用代理IP的小技巧。
中金财富是国企吗,开户安全吗
腾讯云接口进行人脸检测 和签名出错问题
LSF的常用使用命令总结
NPM -- configure Taobao image
ESP32蓝牙Bluetooth Controller API介绍
2022第六季完美童模 IPA国民赛领跑元宇宙赛道
C语言实现Base64编码/解码
Problem solving: dpkg DEB: error: package name has characters that are't lowercase alphanums or '- +‘
Jerry's AI server [chapter]