2017-02-21 11:36:41 +08:00
|
|
|
<style lang="less">
|
|
|
|
.vertical-center-modal{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.ivu-modal{
|
|
|
|
top: 0;
|
|
|
|
}
|
2016-12-26 14:50:39 +08:00
|
|
|
}
|
|
|
|
</style>
|
2016-09-09 14:29:19 +08:00
|
|
|
<template>
|
2017-02-21 11:36:41 +08:00
|
|
|
<i-button @click="modal9 = true">距离顶部 20px</i-button>
|
2017-01-13 15:35:38 +08:00
|
|
|
<Modal
|
2017-02-21 11:36:41 +08:00
|
|
|
title="对话框标题"
|
|
|
|
:visible.sync="modal9"
|
|
|
|
:style="{top: '20px'}">
|
|
|
|
<p>对话框内容</p>
|
|
|
|
<p>对话框内容</p>
|
|
|
|
<p>对话框内容</p>
|
|
|
|
</Modal>
|
|
|
|
<i-button @click="modal10 = true">垂直居中</i-button>
|
|
|
|
<Modal
|
|
|
|
title="对话框标题"
|
|
|
|
:visible.sync="modal10"
|
|
|
|
class-name="vertical-center-modal">
|
2017-01-13 15:35:38 +08:00
|
|
|
<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 {
|
2017-02-21 11:36:41 +08:00
|
|
|
modal9: false,
|
|
|
|
modal10: false,
|
2017-01-13 15:35:38 +08:00
|
|
|
}
|
|
|
|
}
|
2016-09-09 14:29:19 +08:00
|
|
|
}
|
2016-11-09 18:23:17 +08:00
|
|
|
</script>
|