2017-03-09 18:31:47 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-06-25 21:11:42 +08:00
|
|
|
<Button type="primary" @click="modal1 = true">Display dialog box</Button>
|
2018-06-26 21:01:56 +08:00
|
|
|
<Button type="primary" @click="modal2 = true">Display dialog box</Button>
|
2018-06-26 19:14:52 +08:00
|
|
|
<Button @click="hc">Click Me</Button>
|
2018-06-25 21:11:42 +08:00
|
|
|
<Modal
|
|
|
|
v-model="modal1"
|
2018-06-26 19:14:52 +08:00
|
|
|
title="Common Modal dialog box title"
|
2018-06-26 20:51:59 +08:00
|
|
|
dragable
|
2018-06-25 21:11:42 +08:00
|
|
|
@on-ok="ok"
|
|
|
|
@on-cancel="cancel">
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
</Modal>
|
2018-06-26 21:01:56 +08:00
|
|
|
<Modal
|
|
|
|
v-model="modal2"
|
|
|
|
title="Common Modal dialog box title2"
|
|
|
|
dragable
|
|
|
|
@on-ok="ok"
|
|
|
|
@on-cancel="cancel">
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
<p>Content of dialog</p>
|
|
|
|
</Modal>
|
2017-03-09 18:31:47 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-06-25 21:11:42 +08:00
|
|
|
data () {
|
|
|
|
return {
|
2018-06-26 21:01:56 +08:00
|
|
|
modal1: false,
|
|
|
|
modal2: false
|
2018-06-25 21:11:42 +08:00
|
|
|
}
|
|
|
|
},
|
2017-03-09 18:31:47 +08:00
|
|
|
methods: {
|
2018-06-25 21:11:42 +08:00
|
|
|
ok () {
|
|
|
|
this.$Message.info('Clicked ok');
|
|
|
|
},
|
|
|
|
cancel () {
|
|
|
|
this.$Message.info('Clicked cancel');
|
2018-06-26 19:14:52 +08:00
|
|
|
},
|
|
|
|
hc () {
|
|
|
|
this.$Message.info('Hello');
|
2017-03-09 18:31:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|