Giter Club home page Giter Club logo

airoot-uisys's Introduction

AIroot UISYS

www.airoot.cn

A powerful web ui tool, so we call it uisys!

For example

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div>
  <MyBox/>
  <MyBox/>
</div>

How to run it?

  1. You need to use uisys, download
  2. Then save the above file to D:\test\index.ui
  3. Finally, run uisys.exe, and enter the following command in the terminal:
pub D:\test\ :90

OK, open Chrome / Firefox and type http://localhost:90/index.ui

you can see double "Hello Baby!" in your broswer.

Other examples

You can also use JavaScript as follows:

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div>
  <!-- dom area -->
</div>
<script>
  function init(){
    var box = new MyBox();
    dom.appendChild(box);
  }
</script>

mybe ...

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div id="ct"></div>
<script>
  function init(){
    var box = new MyBox();
    #ct.appendChild(box);
  }
</script>

If you want the MyBox module to be a file, you can save it, for example:

Create the file MyBox.ui, and the code is as follows:

<!-- module MyBox code in D:\test\MyBox.ui -->
<div>Hello Baby!</div>

Then create the file Index.ui with the following code:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<div>
  <MyBox/>
  <MyBox/>
</div>

open the browser to see the results, You can still see double "Hello Baby!" words.

use package

If you want to put files in a folder, you can do this:

For example, take the D:\test\MyBox.ui move to D:\test\mymod\mybox.ui.

Then Index.ui import MyBox.ui should be changed to the following code:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<div>
  <mymod.MyBox/>
  <mymod.MyBox/>
</div>

Or it can be imported globally:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<@import value="mymod.MyBox" />
<div>
  <MyBox/>
  <MyBox/>
</div>

open the browser to see the results, You can still see double "Hello Baby!" words.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.