This commit is contained in:
cookfront 2017-03-08 20:39:09 +08:00
parent b92ac81c7a
commit a4988f99bc
2 changed files with 13 additions and 1 deletions

View File

@ -35,6 +35,13 @@ export default {
}, 2000); }, 2000);
} }
} }
},
methods: {
handlePopupButtonClick() {
this.popupShow1 = false;
this.popupShow4 = true;
}
} }
}; };
</script> </script>
@ -49,7 +56,7 @@ export default {
<zan-button @click="popupShow1 = true">从下方弹出popup</zan-button> <zan-button @click="popupShow1 = true">从下方弹出popup</zan-button>
</div> </div>
<zan-popup v-model="popupShow1" position="bottom" class="zan-popup-1"> <zan-popup v-model="popupShow1" position="bottom" class="zan-popup-1">
<zan-button @click="popupShow4 = true" type="primary">从中间弹出popup</zan-button> <zan-button @click="handlePopupButtonClick" type="primary">从中间弹出popup</zan-button>
</zan-popup> </zan-popup>
<div class="zan-row"> <div class="zan-row">
@ -69,6 +76,9 @@ export default {
<div class="zan-row"> <div class="zan-row">
<zan-button @click="popupShow4 = true">从中间弹出popup</zan-button> <zan-button @click="popupShow4 = true">从中间弹出popup</zan-button>
</div> </div>
<zan-popup v-model="popupShow4" class="zan-popup-4">
从中间弹出popup
</zan-popup>
<script> <script>
export default { export default {

View File

@ -18,6 +18,7 @@
transition: .2s ease-out; transition: .2s ease-out;
@m top { @m top {
width: 100%;
top: 0; top: 0;
right: auto; right: auto;
bottom: auto; bottom: auto;
@ -34,6 +35,7 @@
} }
@m bottom { @m bottom {
width: 100%;
top: auto; top: auto;
bottom: 0; bottom: 0;
right: auto; right: auto;