iview/test/routers/more.vue

41 lines
1.1 KiB
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>
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
Scrolling:{{scrolling}}
2017-01-13 15:35:38 +08:00
<Modal
:visible.sync="modal1"
title="普通的Modal对话框标题"
:scrolling="scrolling"
2017-01-13 15:35:38 +08:00
@on-ok="ok"
@on-cancel="cancel">
<p>对话框内容</p>
<p>对话框内容</p>
<p>对话框内容</p>
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
2017-01-13 15:35:38 +08:00
</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,
scrolling: false
2017-01-13 15:35:38 +08:00
}
},
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>