You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

63 lines
917 B

<template>
<view class="niu-grid" :class="{center}" :style="[gridStyle]">
<view class="niu-grid-item">
<slot></slot>
</view>
</view>
</template>
<script>
export default{
name: "niu-grid",
props:{
num: {
type: Number,
default: 5
},
hover: {
type: Boolean,
default: true
},
center: {
type: Boolean,
default: false
},
type: {
type: String,
default: 'icon'
},
gridStyle: {
type: Object,
default: ()=>{}
},
rect: {
type: String,
default: '80rpx'
},
},
methods: {
registerGridItem(){
console.log(222);
}
}
}
</script>
<style lang="scss" scoped>
.niu-grid{
box-sizing: border-box;
&.center{
display: flex;
align-items: center;
justify-content: center;
.niu-grid-item{
margin: 0;
}
}
.niu-grid-item{
display: flex;
// align-items: center;
flex-wrap: wrap;
}
}
</style>