0.3.1 • Published 2 years ago

brick-component v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

brick-component

基于brick-engine的组件化工具包.提供简便的组件定义与组件依赖模块注入.

Install

npm install --save brick-component

Usage

Setup

const {defineApplication} = require('brick-engine');
const {componentSetup} = require('brick-component');

const app = {};

componentSetup(app);
defineApplication(exports, app);

Component

const {defineComponent, defineComponentProperty} = require('brick-component');

class Component {

    getMethod(){
        return this.field1;
    }
    
}

/* 定义组件 */
defineComponent(Component);
/* 定义组件依赖属性 */
defineComponentProperty(Component, { name: 'field1', dep: { id: 'depId' } });

exports.Component = Component;

Documentations

使用jsdoc生成注释文档

git clone https://github.com/kiba-zhao/brick-component.git
cd brick-component
npm install
npm run docs
open docs/index.html

License

MIT

0.3.1

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

undefined

10 years ago