平台兼容性
使用示例:
<template>
<view>
<view>
<button class="footer-button" type="default" @click="popup">Controller</button>
</view>
<xyz-bottom-category ref="xyzBottomCategory"></xyz-bottom-category>
</view>
</template>
<script>
import xyzBottomCategory from "../../components/xyz-category/xyz-bottom-category.vue";//组件路径
export default {
components: {
xyzBottomCategory//引入
},
data() {
return {
bottom: 100//调整以控制组件距页面底部的距离,实际上是一个div遮罩层
};
},
methods: {
onCancel(e) {
console.log(e)
},
popup() {
this.$refs.xyzBottomCategory.show();//底部弹出xyz-bottom-category
},
exampleEvent(index){
console.log('index:'+index);
}
}
};
</script>
<style>
.footer-button {
background-color: #F4F5F6;
width: 750upx;
position: relative;
top: 0upx;
height: 100upx;
}
</style>