-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: up-navbar/up-status-bar组件支持uni-app-x
- Loading branch information
jry
committed
Aug 28, 2024
1 parent
f6b0cd6
commit 7ed1f86
Showing
10 changed files
with
472 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/uni_modules/uview-plus/components/up-navbar/navbar.uts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* @Author : LQ,jry | ||
* @Description : | ||
* @version : 4.0 | ||
* @Date : 2021-08-20 16:44:21 | ||
* @LastAuthor : jry | ||
* @lastTime : 2024-08-28 14:20:58 | ||
* @FilePath : /uview-plus/libs/config/props/navbar | ||
*/ | ||
import color from '../../libs/config/color' | ||
|
||
export default { | ||
// navbar 组件 | ||
navbar: { | ||
safeAreaInsetTop: true, | ||
placeholder: false, | ||
fixed: true, | ||
border: false, | ||
leftIcon: 'arrow-left', | ||
leftText: '', | ||
rightText: '', | ||
rightIcon: '', | ||
title: '', | ||
bgColor: '#ffffff', | ||
titleWidth: '400rpx', | ||
height: '44px', | ||
leftIconSize: 20, | ||
leftIconColor: color['mainColor'], | ||
autoBack: false, | ||
titleStyle: {} | ||
} | ||
} as UTSJSONObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { defineMixin } from '../../libs/vue' | ||
import defProps from './navbar' | ||
let crtProp = defProps['navbar'] as UTSJSONObject | ||
|
||
export const propsNavbar = defineMixin({ | ||
props: { | ||
// 是否开启顶部安全区适配 | ||
safeAreaInsetTop: { | ||
type: Boolean, | ||
default: crtProp['safeAreaInsetTop'] | ||
}, | ||
// 固定在顶部时,是否生成一个等高元素,以防止塌陷 | ||
placeholder: { | ||
type: Boolean, | ||
default: crtProp['placeholder'] | ||
}, | ||
// 是否固定在顶部 | ||
fixed: { | ||
type: Boolean, | ||
default: crtProp['fixed'] | ||
}, | ||
// 是否显示下边框 | ||
border: { | ||
type: Boolean, | ||
default: crtProp['border'] | ||
}, | ||
// 左边的图标 | ||
leftIcon: { | ||
type: String, | ||
default: crtProp['leftIcon'] | ||
}, | ||
// 左边的提示文字 | ||
leftText: { | ||
type: String, | ||
default: crtProp['leftText'] | ||
}, | ||
// 左右的提示文字 | ||
rightText: { | ||
type: String, | ||
default: crtProp['rightText'] | ||
}, | ||
// 右边的图标 | ||
rightIcon: { | ||
type: String, | ||
default: crtProp['rightIcon'] | ||
}, | ||
// 标题 | ||
title: { | ||
type: [String, Number], | ||
default: crtProp['title'] | ||
}, | ||
// 背景颜色 | ||
bgColor: { | ||
type: String, | ||
default: crtProp['bgColor'] | ||
}, | ||
// 标题的宽度 | ||
titleWidth: { | ||
type: [String, Number], | ||
default: crtProp['titleWidth'] | ||
}, | ||
// 导航栏高度 | ||
height: { | ||
type: [String, Number], | ||
default: crtProp['height'] | ||
}, | ||
// 左侧返回图标的大小 | ||
leftIconSize: { | ||
type: [String, Number], | ||
default: crtProp['leftIconSize'] | ||
}, | ||
// 左侧返回图标的颜色 | ||
leftIconColor: { | ||
type: String, | ||
default: crtProp['leftIconColor'] | ||
}, | ||
// 点击左侧区域(返回图标),是否自动返回上一页 | ||
autoBack: { | ||
type: Boolean, | ||
default: crtProp['autoBack'] | ||
}, | ||
// 标题的样式,对象或字符串 | ||
titleStyle: { | ||
type: [Object], | ||
default: crtProp['titleStyle'] | ||
} | ||
} | ||
}) |
Oops, something went wrong.