0.4.7 • Published 5 years ago

uxcore-matrix v0.4.7

Weekly downloads
14
License
MIT
Repository
github
Last release
5 years ago

uxcore-matrix

React matrix

NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

demo

Development

git clone https://github.com/uxcore/uxcore-matrix
cd uxcore-matrix
npm install
npm run server

if you'd like to save your install time,you can use uxcore-tools globally.

npm install uxcore-tools -g
git clone https://github.com/uxcore/uxcore-matrix
cd uxcore-matrix
npm install
npm run start

Test Case

npm run test

Coverage

npm run coverage

Demo

http://uxcore.github.io/components/matrix

Contribute

Yes please! See the CONTRIBUTING for details.

Props

NameTypeRequiredDefaultComments
prefixClsstringno'kuma-matrix'类名前缀,不想使用 kuma 主题时使用
classNamestringno-额外类名
widthnumber/stringno-矩阵宽度,不指定时根据单元格宽度计算得出
heightnumber/stringno-矩阵高度,不指定时根据单元格高度计算得出
cellHeightnumber/string/arrayno40单元格高度,也可以是一个数组,指定每行单元格的高度,如果数组长度不够,将取第一个行的高度
cellWidthnumber/string/arrayno100单元格宽度,也可以是一个数组,指定每列单元格的宽度,如果数组长度不够,将取第一个列的宽度
renderfunc(cellData)no(cell) => cell.text指定每个单元格的渲染方式
dataobjectyes{}数据源,格式见下方

Data structure

{
  data: [
    { x: 0, y: 0, row: 2, col: 2, text: '1' },
    { x: 2, y: 0, row: 2, col: 2, text: '2' },
    { x: 4, y: 0, row: 3, col: 1, text: '3' },
    { x: 0, y: 2, row: 1, col: 3, text: '4' },
    { x: 3, y: 2, row: 1, col: 1, text: '5' },
  ],
}
0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago