可继承的前端开发框架 Intact

码农软件 · 软件分类 · Web框架 · 2019-03-25 06:28:17

软件介绍

Intact是一个可继承的前端开发框架

  1. 简单:没有复杂的概念,你仅仅只需要了解HTML,CSS和JavaScript即可

  2. 高效:22KB min+gzip 大小,包含前端编译模块;fork自目前最快的虚拟DOM引擎之一(inferno)构建

  3. 可继承:充分发挥继承的优势,实现组件逻辑和模板的继承扩展, 让你更快速方便地构建复杂的应用

示例:

var Layout = Intact.extend({
    template: '<div>\
        <header>\
            <b:header>Extendable and Reactive Component</b:header>\
        </header>\
        <div>\
            <b:body>\
                <div class="count">{self.get("count")}</div>\
            </b:body>\
        </div>\
    </div>',
    defaults: function() {
        return {count: 0};
    }
});

var Page = Layout.extend({
    template: '<t:parent>\
        <b:body>\
            {parent()}\
            <button class="button"\
                ev-click={self.add.bind(self)}\
            >Click me!</button>\
        </b:body>\
    </t:parent>',
    add: function() {
        this.set('count', this.get('count') + 1);
    }
});

Intact.mount(Page, document.getElementById('app'));

本文地址:https://www.codercto.com/soft/d/2093.html

Hello World

Hello World

Hannah Fry / W. W. Norton Company / 2018-9 / GBP 17.99

A look inside the algorithms that are shaping our lives and the dilemmas they bring with them. If you were accused of a crime, who would you rather decide your sentence—a mathematically consistent ......一起来看看 《Hello World》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具