npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mini-navigationbar

v0.0.1

Published

小程序自定义标题栏组件,支持设置背景图片,以及背景图片的显示mode,允许在左侧添加一个按钮,适配了Android方便微信的标题靠左显示

Downloads

2

Readme

wx-mini-navigationbar

小程序自定义标题栏组件,支持设置背景图片,以及背景图片的显示mode,允许在左侧添加一个按钮,适配了Android方便微信的标题靠左显示

使用效果

IOS无返回 IOS有返回 Android无返回 Android有返回

使用方法

属性介绍

|属性名 |类型 |默认值 |是否必须 |说明 |-----------|----------|----------|------------|------------------------------------------ |menuSrc |String |'' |否 |按钮图片地址 |bgImgSrc |String |'' |否 |背景图片地址 |bgImgMode |String |aspectFill|否 |背景图片的显示模式 |title |String |'' |否 |标题 |titleTextColor|String |'' |否 |字体和按钮以及loading图标的颜色,按钮和loading暂时只有黑白2色 |backgroundColor|String |'' |否 |整个标题栏的背景颜色 |loading |Boolean |false |否 |是否是加载状态 |backProxy |Boolean |false |否 |是否重写了返回键

标题栏中属性的默认数据会自动获取json配置以及系统的默认数据,如果不需要动态更改样式,可以在json中设置,组件中同样起作用

事件介绍

|属性名 |detail |-----------|------------------------------------------ |NaviBack |返回的逻辑方法 |MenuTap |按钮的点击事件

"usingComponents": {
    "toolBar": "/component/toolbar"
},
<toolBar menuSrc='/image/menu_white.png' bindMenuTap='onMenuTap' bgImgSrc='/image/navi-bg.jpg' />

高度说明: 为了方便适配,这里给出自定义标题栏的计算公式: const MenuRect = wx.getMenuButtonBoundingClientRect() const statusBarHeight = wx.getSystemInfoSync().statusBarHeight; const height = (MenuRect.top - statusBarHeight) * 2 + MenuRect.height +MenuRect.top