Commit 6da64e23 authored by wlxuqu's avatar wlxuqu

nvue样式调整

parent a32cd0f6
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/uview-ui/libs/css/style.components.scss";
.nav-wrap { .nav-wrap {
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
...@@ -58,7 +59,8 @@ ...@@ -58,7 +59,8 @@
} }
.nav-title { .nav-title {
display: flex; @include vue-flex;
flex-direction: row;
align-items: center; align-items: center;
} }
...@@ -67,7 +69,7 @@ ...@@ -67,7 +69,7 @@
} }
.nav-title__text { .nav-title__text {
display: flex; @include vue-flex;
color: $u-main-color; color: $u-main-color;
font-size: 50rpx; font-size: 50rpx;
font-weight: bold; font-weight: bold;
...@@ -87,6 +89,6 @@ ...@@ -87,6 +89,6 @@
.nav-desc { .nav-desc {
margin-top: 20rpx; margin-top: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: $u-content-color; color: $u-content-color;
} }
</style> </style>
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
// 定义nvue页面的flex布局默认为row排列
"nvue ": {
"flex-direction": "row"
},
// APP-VUE分包,可提APP升启动速度,2.7.12开始支持,兼容微信小程序分包方案,默认关闭 // APP-VUE分包,可提APP升启动速度,2.7.12开始支持,兼容微信小程序分包方案,默认关闭
"optimization" : { "optimization" : {
"subPackages" : true "subPackages" : true
......
...@@ -65,5 +65,6 @@ ...@@ -65,5 +65,6 @@
.u-cell-item-box { .u-cell-item-box {
background-color: #FFFFFF; background-color: #FFFFFF;
flex-direction: center;
} }
</style> </style>
...@@ -211,8 +211,9 @@ export default { ...@@ -211,8 +211,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../libs/css/style.components.scss"; @import "../../libs/css/style.components.scss";
.u-cell { .u-cell {
@include vue-flex;
align-items: center;
position: relative; position: relative;
display: flex;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
......
...@@ -181,14 +181,14 @@ ...@@ -181,14 +181,14 @@
width: 100%; width: 100%;
&__menu { &__menu {
display: flex; @include vue-flex;
position: relative; position: relative;
z-index: 11; z-index: 11;
height: 80rpx; height: 80rpx;
&__item { &__item {
flex: 1; flex: 1;
display: flex; @include vue-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
margin-left: 6rpx; margin-left: 6rpx;
transition: transform .3s; transition: transform .3s;
align-items: center; align-items: center;
display: flex; @include vue-flex;
&--rotate { &--rotate {
transform: rotate(180deg); transform: rotate(180deg);
......
...@@ -203,7 +203,10 @@ export default { ...@@ -203,7 +203,10 @@ export default {
@import '../../iconfont.css'; @import '../../iconfont.css';
.u-icon { .u-icon {
/* #ifndef APP-NVUE */
display: inline-flex; display: inline-flex;
/* #endif */
flex-direction: row;
align-items: center; align-items: center;
&--left { &--left {
...@@ -251,8 +254,10 @@ export default { ...@@ -251,8 +254,10 @@ export default {
} }
&__img { &__img {
/* #ifndef APP-PLUS */
height: auto; height: auto;
will-change: transform; will-change: transform;
/* #endif */
} }
&__label { &__label {
......
...@@ -230,6 +230,7 @@ ...@@ -230,6 +230,7 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "../../libs/css/style.components.scss";
.u-fixed-placeholder { .u-fixed-placeholder {
box-sizing: content-box; box-sizing: content-box;
} }
...@@ -237,7 +238,7 @@ ...@@ -237,7 +238,7 @@
.u-tabbar { .u-tabbar {
&__content { &__content {
display: flex; @include vue-flex;
align-items: center; align-items: center;
position: relative; position: relative;
position: fixed; position: fixed;
...@@ -277,7 +278,7 @@ ...@@ -277,7 +278,7 @@
&__button { &__button {
position: absolute; position: absolute;
top: 10rpx; top: 14rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
...@@ -287,7 +288,7 @@ ...@@ -287,7 +288,7 @@
font-size: 26rpx; font-size: 26rpx;
line-height: 28rpx; line-height: 28rpx;
position: absolute; position: absolute;
bottom: 12rpx; bottom: 14rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
......
...@@ -45,7 +45,7 @@ text { ...@@ -45,7 +45,7 @@ text {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row!important;
align-items: center; align-items: center;
} }
...@@ -169,4 +169,8 @@ text { ...@@ -169,4 +169,8 @@ text {
} }
} }
// 重置nvue的默认关于flex的样式
.u-reset-nvue {
flex-direction: row;
align-items: center;
}
\ No newline at end of file
.demo { // 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
@mixin vue-flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: $direction;
/* #endif */
} }
\ No newline at end of file
...@@ -6,5 +6,5 @@ module.exports = { ...@@ -6,5 +6,5 @@ module.exports = {
disableHostCheck: true disableHostCheck: true
} }
}, },
//productionSourceMap: false //productionSourceMap: false,
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment