- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示 - 添加字体文件及样式配置,支持自定义字体 - 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件 - 添加网络状态监听、加密工具等基础工具函数 - 配置 Vuex 状态管理,包括购物车数量、热门搜索词等 - 增加页面组件,如用户协议、分销信息、提现状态等 - 配置项目构建和忽略文件,优化开发体验
56 lines
1.2 KiB
SCSS
56 lines
1.2 KiB
SCSS
|
|
@mixin fn($space,$direction,$size,$n) {
|
|
@if $n {
|
|
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
|
} @else {
|
|
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
|
}
|
|
}
|
|
@mixin get-styles($direction,$i,$space,$n){
|
|
@if $direction == t {
|
|
@include fn($space, top,$i,$n);
|
|
}
|
|
@if $direction == r {
|
|
@include fn($space, right,$i,$n);
|
|
}
|
|
@if $direction == b {
|
|
@include fn($space, bottom,$i,$n);
|
|
}
|
|
@if $direction == l {
|
|
@include fn($space, left,$i,$n);
|
|
}
|
|
@if $direction == x {
|
|
@include fn($space, left,$i,$n);
|
|
@include fn($space, right,$i,$n);
|
|
}
|
|
@if $direction == y {
|
|
@include fn($space, top,$i,$n);
|
|
@include fn($space, bottom,$i,$n);
|
|
}
|
|
@if $direction == a {
|
|
@if $n {
|
|
#{$space}:#{$i*$uni-space-root}px;
|
|
} @else {
|
|
#{$space}:#{-$i*$uni-space-root}px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@each $orientation in m,p {
|
|
$space: margin;
|
|
@if $orientation == m {
|
|
$space: margin;
|
|
} @else {
|
|
$space: padding;
|
|
}
|
|
@for $i from 0 through 16 {
|
|
@each $direction in t, r, b, l, x, y, a {
|
|
.uni-#{$orientation}#{$direction}-#{$i} {
|
|
@include get-styles($direction,$i,$space,true);
|
|
}
|
|
.uni-#{$orientation}#{$direction}-n#{$i} {
|
|
@include get-styles($direction,$i,$space,false);
|
|
}
|
|
}
|
|
}
|
|
} |