0.1.56 • Published 3 years ago

data-table-platform v0.1.56

Weekly downloads
-
License
Unlicense
Repository
-
Last release
3 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

3 years ago

0.1.55

3 years ago

0.1.56

3 years ago

0.1.35

3 years ago

0.1.36

3 years ago

0.1.37

3 years ago

0.1.50

3 years ago

0.1.51

3 years ago

0.1.49

3 years ago

0.1.41

3 years ago

0.1.42

3 years ago

0.1.43

3 years ago

0.1.45

3 years ago

0.1.46

3 years ago

0.1.47

3 years ago

0.1.48

3 years ago

0.1.40

3 years ago

0.1.38

3 years ago

0.1.39

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago