<template>
<view @touchmove.stop="" class="mask">
<view ref="main" :class="mode" :style="style" class="absolute transition-property-transform">
<slot ></slot>
</view>
</view>
</template>
<script>
export default {
props:{
bgStyle:{
type:Object,
default:{},
},
mode:{
type:String,
default:'center',
},
show:{
type:Boolean,
default:false,
}
},
name:"mNavigation",
watch: {
show(newValue, oldValue) {
if (newValue === true) {
this.style={transform:"translateY(0%)"}
}else{
}
}
},
data() {
return {
style:{transform:"translateY(100%)"}
};
},
mounted() {
this.$nextTick(() => {
setTimeout(()=>{
console.log(this.$refs['main']);
},3000)
});
},
methods:{
getStyle(){
}
}
}
</script >
<style lang="scss" scoped>
.left{
left: 0;
}
.right{
right: 0;
}
.top{
top: 0;
}
.bottom{
bottom: 0;
}
.center{
position: absolute;
alignItems: center;
justify-content: center;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
0 个回复