Giter Site home page Giter Site logo

brix's Introduction

Brix

基于淘宝KISSY框架和mustache模板引擎的一淘通用组件库。

组件库的底层包含七个文件

  • chunk.js:brick和pagelet类的父类
  • tmpler.js:模板解析类,用mustache渲染。
  • dataset.js:数据管理类,数据变化时,通知模板引擎更新
  • brick.js:组件基类,所有组件继承此类
  • pagelet.js:组件管理器,对组件实现层次化的渲染
  • mustache.js:模板渲染引擎
  • mu.js:对mustache模板引擎的增强

组件钩子

  • bx-brick:组件名称,在同一个pagelet中唯一
  • bx-path:组件地址,一般是包名+文件路径
  • bx-datakey:组件数据对象key值,可以有多个key,以“,”分割,且支持对象的子对象,如“X.Y,Z.Y.X”
  • bx-tmpl:组件模板(值等于bx-brick),这个钩子和bx-datakey组合使用,在数据更新时对模板重新渲染。
  • bx-parent: 指定当前组件的父组件(值等于bx-brick),在渲染时,实现层次化的渲染。

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.