@import './variable.less';
// flex
.flex-center(column) {
display: flex;
flex-direction: column;
align-items: center;
}
.flex-center(row) {
display: flex;
align-items: center;
}
.banner(@height: 400rpx) {
width: 100%;
height: @height;
image {
.full-image();
}
}
// list
.table-view(@width: 100%; @spacing: 12rpx) {
.flex-center(column);
width: 100%;
padding-bottom: @spacing * 2;
&-item {
width: @width;
margin-top: @spacing;
}
}
.collection-view(@width: 650rpx; @row: 4; @spacing-top: 24rpx; @spacing-left: 24rpx) {
.flex-center(row);
flex-wrap: wrap;
width: @width;
&-item {
width: (@width - @spacing-left * (@row - 1)) / @row;
margin-top: @spacing-top;
margin-right: @spacing-left;
&:nth-child(@{row}n) {
margin-right: 0;
}
}
}
.footer() {
position: fixed;
bottom: 0;
display: flex;
width: 100%;
height: calc(80rpx + env(safe-area-inset-bottom));
}
.full-image() {
width: 100%;
height: 100%;
}
.square(@len) {
width: @len;
height: @len;
}
.circle(@radius) {
width: @radius;
height: @radius;
overflow: hidden;
border-radius: @radius / 2;
}
.with-btnFooter() {
height: calc(100% - @btnFooter-height);
}
.with-footer() {
height: calc(100% - @descFooter-height);
}
|