Skip to content
프로젝트

소개

kero is a front-end model framework. - kero是一个前端模型框架,做为MVVM架构中Model层的增强,提供多维数据模型,解决企业应用中复杂的业务应用场景的开发问题。

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • Multidimensional Data Model
  • Status identifier
  • Paging cache capacity

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

npm version Build Status devDependency Status NPM downloads

中文文档

Introduction

kero is a front-end model framework,As a MVVM architecture Model layer, multidimensional data Model, provide the solution for complex enterprise applications business application scenario development problems。

Features

  • Abundant API
  • Multidimensional Data Model
  • Status identifier
  • Paging cache capacity
  • event trigger

Quickstart

Get kero

  • npm
npm install kero
  • cdn
//design.yonyoucloud.com/static/kero/latest/kero.js

Introducing kero

  • ES6
import { Datatable } from "kero"
  • HTML
<!-- kero is dependent on knockout-->
<script src="//design.yonyoucloud.com/static/knockout/knockout-3.2.0.debug.js"></script>
<script src="//design.yonyoucloud.com/static/kero/latest/kero.js"></script>

Use

definition

	var myDataTable = new u.DataTable({
		meta:{
			field1:{required:true},
			field2:{}
		}
	})

add data

dataTable.setSimpleData([
    {"id": "001","name": "tom"},
    {"id": "002","name": "john"}
])

setValue

var row = dataTable.createEmptyRow();
row.setValue('id','003')

update

var row = dataTable.getRow(index);
row.setValue('name','jerry');

delete

dataTable.removeRow(index);

get all data

var json = dataTable.getSimpleData();

add event trigger

dataTable1.on('valueChange',function(event){
	var field = event.field,
		rowId = event.rowId,
		oldValue = event.oldValue,
		newValue = event.newValue;
});

Read the Develop documentation for information on the framework contents, templates and examples, and more.

Contributing

Develop

Developers can participate in the development of kero, but also can be based on kero two development

kero use gulp.js and webpack build the project.

clone:

$ git clone [email protected]:iuap-design/kero.git

install:

$ npm install

build:

$ npm run product

Feedback

If you encounter any problems , submit issues,or pull request。

PR code

Licence 版权

MIT

관련 프로젝트 살펴보기

불러오는 중…