@smt-ui/component
Advanced tools
Comparing version 1.2.3 to 1.2.4
{ | ||
"name": "@smt-ui/component", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "extension base", | ||
@@ -47,3 +47,3 @@ "author": "jialipeng <jialipeng@baidu.com>", | ||
}, | ||
"gitHead": "bdb7c5a07deac68ba03034bbc2ee4b22d3cf6cb7" | ||
"gitHead": "ab85fd5f78d70388447c00522cae0cba54caab71" | ||
} |
@@ -96,2 +96,7 @@ /** | ||
value: false | ||
}, | ||
// 状态栏的颜色 | ||
navigationBarColor: { | ||
type: String, | ||
value: '#000' | ||
} | ||
@@ -98,0 +103,0 @@ }; |
@@ -67,5 +67,10 @@ /** | ||
navigationColorMap: { | ||
'#ffffff': '#000000', | ||
'#000000': '#ffffff' | ||
}, | ||
lifetimes: { | ||
attached: function () { | ||
const homePagePaths = this.data.homePagePaths; | ||
const {homePagePaths, navigationBarColor} = this.data; | ||
this.showHomeIcon = !homePagePaths.includes(getCurrentPages()[0].route); | ||
@@ -86,2 +91,8 @@ this.showBackIcon = getCurrentPages().length > 1; | ||
} | ||
// 改变切换状态栏的颜色 | ||
swan.setNavigationBarColor({ | ||
frontColor: navigationBarColor, | ||
backgroundColor: this.navigationColorMap[navigationBarColor] | ||
}); | ||
} | ||
@@ -88,0 +99,0 @@ }, |
@@ -81,2 +81,3 @@ /** | ||
}, | ||
lifetimes: { | ||
@@ -83,0 +84,0 @@ ready() { |
@@ -1,1 +0,1 @@ | ||
{"name":"component","label":"通用","type":"component","configPath":"./smart-design-config.json","version":"1.2.2"} | ||
{"name":"component","label":"通用","type":"component","configPath":"./smart-design-config.json","version":"1.2.3"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1076563
16183