17 lines
546 B
SCSS
17 lines
546 B
SCSS
|
|
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
|||
|
|
@mixin vue-flex($direction: row) {
|
|||
|
|
/* #ifndef APP-NVUE */
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: $direction;
|
|||
|
|
/* #endif */
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 通过scss的mixin功能,把原来需要写4行的css,变成一行
|
|||
|
|
// 目的是保持代码干净整洁,不至于在nvue下,到处都要写display:flex的条件编译
|
|||
|
|
@mixin flex($direction: row) {
|
|||
|
|
/* #ifndef APP-NVUE */
|
|||
|
|
display: flex;
|
|||
|
|
/* #endif */
|
|||
|
|
flex-direction: $direction;
|
|||
|
|
}
|