diff --git a/components/navigationBar/navigationBar.js b/components/navigationBar/navigationBar.js index 6e867dc..10c7cd9 100644 --- a/components/navigationBar/navigationBar.js +++ b/components/navigationBar/navigationBar.js @@ -1,55 +1,60 @@ // components/navigationBar.js Component({ - - /** - * 组件的属性列表 - */ - properties: { - title:{ - type: String, - value: '续期提醒' - }, - backgroundImage:{ - type: String, - value: '' - }, - isSowArrow:{ - type: Boolean, - value: false - }, - isShowBg:{ - type: Boolean, - value: false - }, - height:{ - type:String, - value:'' - } + /** + * 组件的属性列表 + */ + properties: { + title: { + type: String, + value: "续期提醒", + }, + backgroundImage: { + type: String, + value: "", + }, + isSowArrow: { + type: Boolean, + value: false, + }, + isShowBg: { + type: Boolean, + value: false, }, + height: { + type: String, + value: "", + }, + titleAlign: { + type: String, + value: "center", // 默认居中对齐 + }, + }, - /** - * 组件的初始数据 - */ - data: { - // 状态栏高度 - statusBarHeight: wx.getStorageSync('statusBarHeight') + 'px', - // 导航栏高度 - navigationBarHeight: wx.getStorageSync('navigationBarHeight') + 'px', - // 胶囊按钮高度 - menuButtonHeight: wx.getStorageSync('menuButtonHeight') + 'px', - // 导航栏和状态栏高度 - navigationBarAndStatusBarHeight: wx.getStorageSync('statusBarHeight') + wx.getStorageSync('navigationBarHeight') + 'px' + /** + * 组件的初始数据 + */ + data: { + // 状态栏高度 + statusBarHeight: wx.getStorageSync("statusBarHeight") + "px", + // 导航栏高度 + navigationBarHeight: wx.getStorageSync("navigationBarHeight") + "px", + // 胶囊按钮高度 + menuButtonHeight: wx.getStorageSync("menuButtonHeight") + "px", + // 导航栏和状态栏高度 + navigationBarAndStatusBarHeight: + wx.getStorageSync("statusBarHeight") + + wx.getStorageSync("navigationBarHeight") + + "px", + }, + /** + * 组件的方法列表 + */ + methods: { + handleGoToBack() { + wx.navigateBack({ + delta: 1, + }); }, - - /** - * 组件的方法列表 - */ - methods: { - handleGoToBack(){ - wx.navigateBack({ - delta: 1 - }) - } - } -}) \ No newline at end of file + }, +}); diff --git a/components/navigationBar/navigationBar.wxml b/components/navigationBar/navigationBar.wxml index 4f4b6a6..1a7e191 100644 --- a/components/navigationBar/navigationBar.wxml +++ b/components/navigationBar/navigationBar.wxml @@ -1,18 +1,31 @@ - - - - - - - - - - {{title}} - + + + + + + + + + + {{title}} + - + + + + + + + + + + + {{title}} + + + \ No newline at end of file diff --git a/components/navigationBar/navigationBar.wxss b/components/navigationBar/navigationBar.wxss index 76fbeba..bf1f5f7 100644 --- a/components/navigationBar/navigationBar.wxss +++ b/components/navigationBar/navigationBar.wxss @@ -41,13 +41,23 @@ text-overflow: ellipsis; white-space: nowrap; } -.arrow-content{ + +.center-align { + text-align: center; +} + +.left-align { + text-align: left; +} + +.arrow-content { position: absolute; left: 40rpx; z-index: 999; display: flex; align-items: center; - } +} + .arrow { width: 18rpx; height: 18rpx; diff --git a/subpages/index/renewalApplication/renewalApplication.wxml b/subpages/index/renewalApplication/renewalApplication.wxml index bb630f7..5faf88c 100644 --- a/subpages/index/renewalApplication/renewalApplication.wxml +++ b/subpages/index/renewalApplication/renewalApplication.wxml @@ -1,5 +1,5 @@ - +