Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Field): add api addArrayValue/deleteArrayValue #1451

Merged
merged 2 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/field/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ The api interface provided by the object after `new` (eg `myfield.getValues()`)
|getState | Judge check status | Function(name: String)| 'error' 'success' 'loading' '' | '' |
| getNames | Get the key of all components | Function()| ||
|remove | Delete the data of a certain control or a group of controls. After deletion, the validate/value associated with it will be cleared. | Function(name: String/String[])|
| spliceArray | delete data of name like name.{index} | Function(keyMatch: String, index: Number)| | |
| addArrayValue | add data of name like name.{index} | Function(key: String, index: Number, value1, value2, ...)| | |
| deleteArrayValue | delete data of name like name.{index} | Function(key: String, index: Number, howmany)| | |

#### init
```
Expand Down
3 changes: 2 additions & 1 deletion docs/field/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ let myfield = Field.useField([options]); // 要求 react 版本 > 16.8
| getState | 判断校验状态 | Function(name: String)| 'error' 'success' 'loading' '' | '' |
| getNames | 获取所有组件的key | Function()| | |
| remove | 删除某一个或者一组控件的数据,删除后与之相关的validate/value都会被清空 | Function(name: String/String[])| | |
| spliceArray | 删除 name 是数组格式的数据, 并且自动处理其他 name 的数组错位问题 | Function(keyMatch: String, index: Number)| | |
| addArrayValue | 添加 name 是数组格式的数据, 并且自动处理其他 name 的数组错位问题 | Function(key: String, index: Number, value1, value2, ...)| | |
| deleteArrayValue | 删除 name 是数组格式的数据, 并且自动处理其他 name 的数组错位问题 | Function(key: String, index: Number, howmany)| | |

#### init
```
Expand Down
6 changes: 3 additions & 3 deletions docs/upload/demo/oss.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class App extends React.Component {
signature,
};

// real url
this.url = `//${domain}/${key}`;
// save url to file object
file.tempUrl = `//${domain}/${key}`;

resolve(options);
}, 300);
Expand All @@ -55,7 +55,7 @@ class App extends React.Component {
};
formatter = (res, file) => ({
success: true,
url: this.url
url: file.tempUrl
});
render() {
return (
Expand Down