iview / iview/iview-admin

如何使用Modal调用Modal?

Open
#882 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
16.3k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Description

例如,我在confirm和custom这两个方法中都写了Modal.confirm,但是当我使用confirm的onOk来调用custom时,弹出的custom对话框**闪烁**一下就**消失**了,这是为什么呢?**

```
confirm () {
this.$Modal.confirm({
content: '

1

',
onOk: () => {
this.custom();
}
});
},
custom () {
this.$Modal.confirm({
content: '

2

',
okText: 'OK',
cancelText: 'Cancel'
});
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior using the confirm and custom methods shown in the issue, focusing on the confirm onOk callback and the nested Modal.confirm call. Inspect the modal component's handling of closing and opening dialogs, then verify that the second dialog remains visible after the first is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.