Skip to content

Commit cf3e478

Browse files
committed
v1.0.1
ts类型名称调整
1 parent f7ca38e commit cf3e478

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default () => <TreeBasic loadData={...} itemRender={...} />
2424
### Interfaces
2525

2626
```ts
27-
export interface TreeProps<T = DataType> {
27+
export interface TreeBasicProps<T = DataType> {
2828
/** 样式前缀 */
2929
prefixCls: string;
3030
/** 样式名称 */

docs/asset-manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"index.css": "static/css/index.387855a9.chunk.css",
3-
"index.js": "static/js/index.387855a9.chunk.js",
2+
"index.css": "static/css/index.9db466e2.chunk.css",
3+
"index.js": "static/js/index.9db466e2.chunk.js",
44
"runtime-index.js": "static/js/runtime-index.92eae014.js",
55
"static/js/2.e9b6bfc8.chunk.js": "static/js/2.e9b6bfc8.chunk.js",
66
"index.html": "index.html"

docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html style="width:100%;height:100%;overflow:hidden"><head><meta charset="utf-8"/><title>Tree Basic</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"/><style>.demo{width:800px;height:450px;margin:100px auto;background:#fff;font-size:12px;overflow:auto}</style><link href="static/css/index.387855a9.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.92eae014.js"></script><script src="static/js/2.e9b6bfc8.chunk.js"></script><script src="static/js/index.387855a9.chunk.js"></script></body></html>
1+
<!doctype html><html style="width:100%;height:100%;overflow:hidden"><head><meta charset="utf-8"/><title>Tree Basic</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"/><style>.demo{width:800px;height:450px;margin:100px auto;background:#fff;font-size:12px;overflow:auto}</style><link href="static/css/index.9db466e2.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.92eae014.js"></script><script src="static/js/2.e9b6bfc8.chunk.js"></script><script src="static/js/index.9db466e2.chunk.js"></script></body></html>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-widget-tree-basic",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "tree-basic",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

src/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface LoadRenderProps<T = DataType> {
4343
data: T;
4444
}
4545

46-
export interface TreeProps<T = DataType> {
46+
export interface TreeBasicProps<T = DataType> {
4747
/** 样式前缀 */
4848
prefixCls: string;
4949
/** 样式名称 */
@@ -87,7 +87,7 @@ export interface TreeState {
8787
expandedMap: Record<string, boolean>;
8888
}
8989

90-
export class TreeBasic<T = DataType> extends React.Component<TreeProps<T>, TreeState> {
90+
export class TreeBasic<T = DataType> extends React.Component<TreeBasicProps<T>, TreeState> {
9191
static defaultProps = {
9292
prefixCls: "rw-tree",
9393
rootId: null,
@@ -104,14 +104,14 @@ export class TreeBasic<T = DataType> extends React.Component<TreeProps<T>, TreeS
104104
rootComponent: "div",
105105
};
106106

107-
static getDerivedStateFromProps<T>(nextProps: TreeProps<T>) {
107+
static getDerivedStateFromProps<T>(nextProps: TreeBasicProps<T>) {
108108
return {
109109
expandedIds: nextProps.expandedIds,
110110
expandedMap: toMarked(nextProps.expandedIds || []),
111111
};
112112
}
113113

114-
constructor(props: TreeProps<T>) {
114+
constructor(props: TreeBasicProps<T>) {
115115
super(props);
116116

117117
this.state = {

0 commit comments

Comments
 (0)