Merge pull request #242 from rijn/241
added scrolling property to toggle CSS for creating or hiding scrollbars
This commit is contained in:
commit
a861963bd8
2 changed files with 20 additions and 2 deletions
|
@ -76,6 +76,10 @@
|
|||
footerHide: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
scrollable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
@ -204,13 +208,22 @@
|
|||
} else {
|
||||
if (this.timer) clearTimeout(this.timer);
|
||||
this.wrapShow = true;
|
||||
if (!this.scrollable) {
|
||||
this.addScrollEffect();
|
||||
}
|
||||
}
|
||||
},
|
||||
loading (val) {
|
||||
if (!val) {
|
||||
this.buttonLoading = false;
|
||||
}
|
||||
},
|
||||
scrollable (val) {
|
||||
if (!val) {
|
||||
this.addScrollEffect();
|
||||
} else {
|
||||
this.removeScrollEffect();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,21 +5,26 @@
|
|||
</style>
|
||||
<template>
|
||||
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
|
||||
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
|
||||
scrollable:{{scrollable}}
|
||||
<Modal
|
||||
:visible.sync="modal1"
|
||||
title="普通的Modal对话框标题"
|
||||
:scrollable="scrollable"
|
||||
@on-ok="ok"
|
||||
@on-cancel="cancel">
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
|
||||
</Modal>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
modal1: false
|
||||
modal1: false,
|
||||
scrollable: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Reference in a new issue