Commit af93145520812f7ec6d2782c9ed4db4376202af9
Committed by
GitHub

Merge pull request #756 from hezhiying/modal
修复modal标题属性首次如果没有值,再赋值的话就会没用
Showing
2 changed files
with
11 additions
and
3 deletions
Show diff stats
examples/routers/modal.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | <Button type="primary" @click="modal1 = true">显示对话框</Button> |
4 | + | |
4 | 5 | <Modal |
5 | 6 | v-model="modal1" |
6 | - title="普通的Modal对话框标题" | |
7 | + :title="title" | |
7 | 8 | @on-ok="ok" |
9 | + :mask-closable="false" | |
8 | 10 | @on-cancel="cancel"> |
9 | - <p>对话框内容</p> | |
11 | + <p><Button type="ghost" @click="title = '这是标题'">设置标题</Button> {{title}}</p> | |
10 | 12 | <p>对话框内容</p> |
11 | 13 | <p>对话框内容</p> |
12 | 14 | </Modal> |
... | ... | @@ -16,7 +18,8 @@ |
16 | 18 | export default { |
17 | 19 | data () { |
18 | 20 | return { |
19 | - modal1: false | |
21 | + modal1: true, | |
22 | + title:'' | |
20 | 23 | } |
21 | 24 | }, |
22 | 25 | methods: { | ... | ... |
src/components/modal/modal.vue