0.1.56 • Published 2 years ago

data-table-platform v0.1.56

Weekly downloads
-
License
Unlicense
Repository
-
Last release
2 years ago

Data-table-platform

廸安科技用于实现资源库等功能实现的基础数据库表

使用方法:

yarn add # or npm install data-table-platform
import {CanvasLayer} from 'data-table-platform';
import 'data-table-platform/dist/index.css';

interface BaseProps {
  records?: { id: string }[];
  columnsMap?: { [x: string]: Col };
  cols?: { id: string }[];
  recordMap?: { [x: string]: CellData };
};

const tableProps = {
  records: [{id: '1'}],
  recordMap: {
    1: {
      id: '1',
      data: {
        col1: {
          value: '列1的数据'
        }
      }
    }
  },
  columnsMap: {
    col1: {
      name: '列1',
      id: 'col1',
      property: {},
      default_value: '默认文字',
      type: '1'
    }
  },
  cols: [
    {id: 'col1'}
  ],
}
/** 默认达到可以使用的方法 */
<CanvasLayer
    {...tableProps}
    columns={[] as Col[]}
    onAddColOption={async (val) => val.option }
    onAddCol={async (val) => val }
    onUpdateColOption={async (val) => val.option}
    onAddRow={async (val) => val}
    onUpdateCellData={async (val) => val}
    onRemoveColOption={async (val) => val}
    onUpdateCol={async (val) => val}
    onClearRange={async (val) => val}
    onRemoveRows={async (val) => val}
    onChangeColWidth={async (val) => val}
    onRemoveCols={async (val) => val}
    users={[]}
/>

Developer

git clone in gitlab, run code with the Terminal:

git glone ...

Setup Files

This is the folder structure we set up for you:

/example
  index.html
  index.tsx       # test your component here in a demo app
  package.json
  tsconfig.json
/src
  index.tsx       # EDIT THIS
/test
  index.test.tsx  # EDIT THIS
.gitignore
package.json
README.md         # EDIT THIS
tsconfig.json

Update core code

npm install # yarn
npm start # yarn start

preview in local page

cd example
npm install # yarn
npm start # yarn start

host port is http://localhost:3000

npm publish

npm run build
npm version patch
npm publish --registry="廸安内部npm仓库地址"
0.1.53

2 years ago

0.1.55

2 years ago

0.1.56

2 years ago

0.1.35

2 years ago

0.1.36

2 years ago

0.1.37

2 years ago

0.1.50

2 years ago

0.1.51

2 years ago

0.1.49

2 years ago

0.1.41

2 years ago

0.1.42

2 years ago

0.1.43

2 years ago

0.1.45

2 years ago

0.1.46

2 years ago

0.1.47

2 years ago

0.1.48

2 years ago

0.1.40

2 years ago

0.1.38

2 years ago

0.1.39

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago