ElemeFE / ElemeFE/element-react
typescript Property 'value' does not exist on type 'MessageBoxData'.ts(2339)
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
### Description
export const myPrompt = (message: string = '请输入内容?', title: string = '提示', errorMessage: string = '请输入内容', callback: Function) => {
MessageBox.prompt(message, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\S/,
inputErrorMessage: errorMessage
}).then(({ value }) => { // ts error `Property 'value' does not exist on type 'MessageBoxData'.ts(2339)`
Message({
type: 'success',
message: '你的邮箱是: ' + value
});
}).catch(() => {
Message({
type: 'info',
message: '您已取消该操作'
});
})
}
### Reproduce Steps
### Error Trace (if possible)
`Property 'value' does not exist on type 'MessageBoxData'.ts(2339)`
Contributor guide
Assessment
This issue has not been assessed yet.