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.
55 lines
768 B
55 lines
768 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'
|
|
},
|
|
}
|
|
}
|
|
</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;
|
|
}
|
|
}
|
|
}
|
|
</style>
|