tiny-vue_version0/examples/sites/demos/mobile/app/mask/basic-usage.vue

39 lines
662 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="mobile-mask-demo">
<tiny-button @click="visible = true">点击展示遮罩层</tiny-button>
<p v-if="showMsg">遮罩层click事件已触发</p>
<tiny-mask v-model:visible="visible" @click="handleClick"></tiny-mask>
</div>
</template>
<script>
import { Mask, Button } from '@opentiny/vue'
export default {
components: {
TinyMask: Mask,
TinyButton: Button
},
data() {
return {
visible: false,
showMsg: false
}
},
methods: {
handleClick() {
this.showMsg = true
}
},
}
</script>
<style scoped>
.mobile-mask-demo {
height: 100%;
background: #f4f4f4;
}
</style>