diff --git a/pages.json b/pages.json index f4dd102..42fce0c 100644 --- a/pages.json +++ b/pages.json @@ -8,6 +8,15 @@ }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/login", + "style": { + "navigationBarTitleText": "登录" + }, + "meta": { + "auth": false + } + }, { "path": "pages/index/index", "aliasPath": "/", diff --git a/pages/index/login.vue b/pages/index/login.vue new file mode 100644 index 0000000..eb3a726 --- /dev/null +++ b/pages/index/login.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/peach/config/zIndex.js b/peach/config/zIndex.js new file mode 100644 index 0000000..2e51b68 --- /dev/null +++ b/peach/config/zIndex.js @@ -0,0 +1,20 @@ +// uniapp在H5中各API的z-index值如下: +/** + * actionsheet: 999 + * modal: 999 + * navigate: 998 + * tabbar: 998 + * toast: 999 + */ + +export default { + toast: 10090, + noNetwork: 10080, + popup: 10075, // popup包含popup,actionsheet,keyboard,picker的值 + mask: 10070, + navbar: 980, + topTips: 975, + sticky: 970, + indexListSticky: 965, + popover: 960, +} diff --git a/peach/index.js b/peach/index.js index 5811fa2..d8b33fb 100644 --- a/peach/index.js +++ b/peach/index.js @@ -2,6 +2,8 @@ import $store from '@/peach/store' import $platform from '@/peach/platform' import $url from '@/peach/url' import $router from '@/peach/router' +import $helper from '@/peach/helper' +import zIndex from '@/peach/config/zIndex.js' import dayjs from 'dayjs' import relativeTime from 'dayjs/plugin/relativeTime' import duration from 'dayjs/plugin/duration' @@ -16,6 +18,8 @@ const peach = { $platform, $url, $router, + $helper, + $zIndex: zIndex, } export async function peachInit() { diff --git a/peach/ui/pb-fixed/pb-fixed.vue b/peach/ui/pb-fixed/pb-fixed.vue index 886da4f..e68cf97 100644 --- a/peach/ui/pb-fixed/pb-fixed.vue +++ b/peach/ui/pb-fixed/pb-fixed.vue @@ -9,12 +9,12 @@ left: sticky ? 'auto' : '0px', top: state.fixed && !bottom ? (noNav ? val : val + sys_navBar) + 'px' : 'auto', bottom: insetHeight, - zIndex: index + sheep.$zIndex.navbar, + zIndex: index + peach.$zIndex.navbar, }, !alway ? { opacity: state.opacityVal } : '', ]" > - + { if (unref(props.bottom)) { state.fixed = value >= - state.content.bottom - sheep.$platform.device.windowHeight + state.content.height + unref(props.val) + state.content.bottom - peach.$platform.device.windowHeight + state.content.height + unref(props.val) } else { state.fixed = value >= - state.content.top - (unref(props.noNav) ? unref(props.val) : unref(props.val) + sheep.$platform.navbar) + state.content.top - (unref(props.noNav) ? unref(props.val) : unref(props.val) + peach.$platform.navbar) } } diff --git a/peach/ui/pb-inner-navbar/pb-inner-navbar.vue b/peach/ui/pb-inner-navbar/pb-inner-navbar.vue index b4cd5fe..78fb0dc 100644 --- a/peach/ui/pb-inner-navbar/pb-inner-navbar.vue +++ b/peach/ui/pb-inner-navbar/pb-inner-navbar.vue @@ -19,7 +19,7 @@ :class="state.isDark ? 'text-white' : 'text-black'" :style="[{ height: sys_navBar - sys_statusBar + 'px' }]" > - + @@ -82,6 +82,11 @@ const props = defineProps({ default: 100, }, + leftIcon: { + type: String, + default: '', + }, + title: { //返回文本 type: String, diff --git a/peach/ui/pb-layout/pb-layout.vue b/peach/ui/pb-layout/pb-layout.vue index 739775b..f220797 100644 --- a/peach/ui/pb-layout/pb-layout.vue +++ b/peach/ui/pb-layout/pb-layout.vue @@ -5,6 +5,7 @@ - + @@ -62,6 +63,10 @@ const props = defineProps({ type: String, default: '', }, + leftIcon: { + type: String, + default: '', + }, navbar: { type: String, default: 'normal', diff --git a/peach/ui/pb-navbar/pb-navbar.vue b/peach/ui/pb-navbar/pb-navbar.vue index 2168965..ccb8736 100644 --- a/peach/ui/pb-navbar/pb-navbar.vue +++ b/peach/ui/pb-navbar/pb-navbar.vue @@ -128,7 +128,7 @@ const props = defineProps({ }, leftIcon: { type: String, - default: 'left', + default: '', }, rightIcon: { type: String,