https://github.com/iuap-design/kero
kero is a front-end model framework. - kero是一个前端模型框架,做为MVVM架构中Model层的增强,提供多维数据模型,解决企业应用中复杂的业务应用场景的开发问题。
https://github.com/iuap-design/kero
iuap-design javascript-library kero tinper
Last synced: about 1 year ago
JSON representation
kero is a front-end model framework. - kero是一个前端模型框架,做为MVVM架构中Model层的增强,提供多维数据模型,解决企业应用中复杂的业务应用场景的开发问题。
- Host: GitHub
- URL: https://github.com/iuap-design/kero
- Owner: iuap-design
- License: mit
- Created: 2016-05-26T12:34:31.000Z (about 10 years ago)
- Default Branch: release
- Last Pushed: 2018-09-27T10:11:01.000Z (over 7 years ago)
- Last Synced: 2025-03-30T15:07:23.571Z (about 1 year ago)
- Topics: iuap-design, javascript-library, kero, tinper
- Language: JavaScript
- Homepage:
- Size: 3.86 MB
- Stars: 279
- Watchers: 12
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://www.npmjs.com/package/kero)
[](https://travis-ci.org/iuap-design/kero)
[](https://david-dm.org/iuap-design/kero#info=devDependencies)
[](https://npmjs.org/package/kero)
[中文文档](./README_CN.md)
## Introduction
[kero](http://tinper.org/dist/kero/index.html) 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
```
```
### 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](http://tinper.org/dist/kero/docs/overview.html) 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 git@github.com:iuap-design/kero.git
```
install:
```
$ npm install
```
build:
```
$ npm run product
```
### Feedback
If you encounter any problems , submit [issues](https://github.com/iuap-design/kero/issues),or pull request。
[PR code](CONTRIBUTING.md)
## Licence 版权
[MIT](./LICENSE)