change scrolling to scrollable

This commit is contained in:
Rijn 2017-02-05 22:58:34 -06:00
parent f346ce4bd9
commit 5d0b89ced8
2 changed files with 8 additions and 8 deletions
src/components/modal
test/routers

View file

@ -77,7 +77,7 @@
type: Boolean,
default: false
},
scrolling: {
scrollable: {
type: Boolean,
default: false
}
@ -208,7 +208,7 @@
} else {
if (this.timer) clearTimeout(this.timer);
this.wrapShow = true;
if (!this.scrolling) {
if (!this.scrollable) {
this.addScrollEffect();
}
}
@ -218,7 +218,7 @@
this.buttonLoading = false;
}
},
scrolling (val) {
scrollable (val) {
if (!val) {
this.addScrollEffect();
} else {

View file

@ -5,18 +5,18 @@
</style>
<template>
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
Scrolling:{{scrolling}}
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
scrollable:{{scrollable}}
<Modal
:visible.sync="modal1"
title="普通的Modal对话框标题"
:scrolling="scrolling"
:scrollable="scrollable"
@on-ok="ok"
@on-cancel="cancel">
<p>对话框内容</p>
<p>对话框内容</p>
<p>对话框内容</p>
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
</Modal>
</template>
<script>
@ -24,7 +24,7 @@
data () {
return {
modal1: false,
scrolling: false
scrollable: false
}
},
methods: {