Baidu open source low code front-end framework, support web and mobile page development

Baidu open source low code front-end framework, support web and mobile page development

2022-09-02 1 1,086
Resource Number 38010 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends a low-code front-end framework that is open source by Baidu——amis。

After more than ten years of development, front-end development has become more and more complex, the threshold is getting higher and higher, to use the popular UI component library, you must understand npm, webpack, react/vue, must be familiar with ES6 syntax, and it is best to understand state management, such as Redux, if you have not been exposed to functional programming, Light is very difficult to get started, and after getting started, you will find that it has a huge ecology, there are 2347 related libraries, many functions are similar, and the selection cost is high.

However, the development of front-end technology will not stop, and after learning this, you may find that everyone has replaced Webpack with Hooks and some packaging tool. You don’t need to know React/Vue, Webpack, or even JavaScript. Even if you haven’t studied amis, you can guess what most of the configurations will do. For most common pages, you should use the simplest way to implement them. You don’t even need to learn front-end frameworks and tools.

Baidu open source low code front-end framework, support web and mobile page development插图

amis Highlights

  • No front-end knowledge required: Inside Baidu, most amis users have never written a front-end page before and do not know JavaScript, but can create a professional and complex background interface, which is not possible with all other front-end UI libraries.
  • Not affected by front-end technology updates: The oldest amis pages inside Baidu were created more than 4 years ago and are still in use today, while the Angular/Vue/React versions are now obsolete, and the popular Gulp has been replaced by Webpack. If these pages were not in amis, they would be expensive to maintain.
  • Enjoy the continuous upgrading of amis: amis has been improving the interactive experience of details, such as freezing the first row of the table, no deadlock under the drop-down box big data, etc., the previous JSON configuration does not need to be modified;
  • amis has a large number of built-in components, including rich text editor, code editor, diff, condition composition, real-time logging and other business components. Most of the background page development only needs to understand amis. You can also extend components by customizing them. In fact, amis can be used as a regular UI library.

Baidu open source low code front-end framework, support web and mobile page development插图1

Low code visual editor

amis is positioned as a low-code front-end framework, so we only cover the low-code part here. If you want to use pure JSON configuration to complete page development, then check out the documentation. Of course, you can also use a mixed pattern of 90% low code +10% code development to improve efficiency and flexibility.

attention:

1.amis-editor is not currently open source, but is free to use (including commercially).

2.You must be familiar with React to use the editor

1. Use amis-editor in your project

Installation dependency

npm i amis-editor

method of application

import {Editor} from 'amis-editor';

render() {
  return (
    <Editor
      {...props}
    />
  )
}

attribute specification

  • value:any value, json configuration of amis.
  • onChange: (value: any) => void。 Triggered when the editor is modified.
  • preview?: boolean Whether it is in preview state.
  • autoFocus?: boolean Whether to autofocus the first editable component.
  • plugins Plug-in class set

2. Add custom components

There are two ways to add a custom editor:

  • registerEditorPlugin Register global plug-ins.
  • Not registered, but passed through the plugins property when calling <Editor>.

The effect is the same, the focus is still how to write a Plugin, example:

import {BasePlugin} from 'amis-editor';

export class  MyRendererPlugin extends BasePlugin {
  rendererName = 'my-renderer';

  // For the time being, only this is supported. After configuration, the code editor will be opened
  $schema = '/schemas/UnkownSchema.json'; 

  // Used to configure the name and description
  name = 'Custom renderer';
  description = 'This is just an example';

  // tag,Decide which tab to display under
  tags = ['custom', 'form item'];

  //icon
  icon = 'fa fa-user';

  // Used to generate preview images
  previewSchema = {
    type: 'my-renderer',
    target: 'demo'
  };

  // The initial data when dragged into the component
  scaffold = {
    type: 'my-renderer',
    target: '233'
  };

  // Right panel correlation
  panelTitle = 'custom component';
  panelControls = [
    {
      type: 'tabs',
      tabsMode: 'line',
      className: 'm-t-n-xs',
      contentClassName: 'no-border p-l-none p-r-none',
      tabs: [
          {
              title: 'convention',
              controls: [
                  {
                      name: 'target',
                      label: 'Target',
                      type: 'text'
                  }
              ]
          },

          {
              title: 'appearance',
              controls: []
          }
      ]
    }
  ];
}

Once the plugin is defined, you can enable it in two ways

// In method 1, the default plug-in is registered and all editor instances are automatically instantiated.
import {registerEditorPlugin} from 'amis-editor';

registerEditorPlugin(MyRendererPlugin);

// In method 2, only certain editors are enabled
() => (
  <Editor plugins={[MyRendererPlugin]} />
)

The example only makes a simple explanation, and there are many available attributes, specifically, look at the.d.ts file in the npm package first.

3. Editor effect

  • web version

Baidu open source low code front-end framework, support web and mobile page development插图2

  • mobile terminal

Baidu open source low code front-end framework, support web and mobile page development插图3

  • Drag assembly

Baidu open source low code front-end framework, support web and mobile page development插图4

  • View code

Baidu open source low code front-end framework, support web and mobile page development插图5

From web pages to mobile terminals, including apps and applets, amis can meet page needs. However, in some special scenarios, such as some pages pursuing personalized visual effects, amis is not suitable. In fact, most front-end UI component libraries are not suitable, and can only be customized development. You can read more about amis on your own.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Baidu open source low code front-end framework, support web and mobile page development https://ictcoder.com/kyym/baidu-open-source-low-code-front-end-framework-support-web-and-mobile-page-development.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service