0.1.56 • Published 4 years ago
data-table-platform v0.1.56
Data-table-platform
廸安科技用于实现资源库等功能实现的基础数据库表
使用方法:
yarn add # or npm install data-table-platformimport {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.jsonUpdate core code
npm install # yarn
npm start # yarn startpreview in local page
cd example
npm install # yarn
npm start # yarn starthost port is http://localhost:3000
npm publish
npm run buildnpm version patch
npm publish --registry="廸安内部npm仓库地址"0.1.53
4 years ago
0.1.55
4 years ago
0.1.56
4 years ago
0.1.35
4 years ago
0.1.36
4 years ago
0.1.37
4 years ago
0.1.50
4 years ago
0.1.51
4 years ago
0.1.49
4 years ago
0.1.41
4 years ago
0.1.42
4 years ago
0.1.43
4 years ago
0.1.45
4 years ago
0.1.46
4 years ago
0.1.47
4 years ago
0.1.48
4 years ago
0.1.40
4 years ago
0.1.38
4 years ago
0.1.39
4 years ago
0.1.11
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago