iview/test/routers/more.vue

36 lines
839 B
Vue
Raw Normal View History

<style>
body{
height: 2000px !important;
2016-12-26 14:50:39 +08:00
}
</style>
2016-09-09 14:29:19 +08:00
<template>
2017-01-13 15:35:38 +08:00
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
<Modal
:visible.sync="modal1"
title="普通的Modal对话框标题"
@on-ok="ok"
@on-cancel="cancel">
<p>对话框内容</p>
<p>对话框内容</p>
<p>对话框内容</p>
</Modal>
2016-09-09 14:29:19 +08:00
</template>
<script>
export default {
2017-01-13 15:35:38 +08:00
data () {
return {
modal1: false
}
},
methods: {
ok () {
this.$nextTick(() => this.modal1 = true);
this.$Message.info('点击了确定');
},
cancel () {
this.$Message.info('点击了取消');
}
}
2016-09-09 14:29:19 +08:00
}
2016-11-09 18:23:17 +08:00
</script>