
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@minidesign/header
Advanced tools
微信小程序自定义header。


- 从小程序基础库版本 2.2.1 或以上、及开发者工具 1.02.1808300 或以上开始,小程序支持使用 npm 安装第三方包
- 如果你的不支持,那么可以先下载下来,在手动拷贝到你的
components/header文件夹下,在使用的细节上调整一下就行了。
npm install --save @minidesign/header{
"usingComponents": {
"header": "@minidesign/header"
}
}
<header>Minidesign Header</header>
| Name | Type | Default | Description |
|---|---|---|---|
| mode | string | 'classic' | 模式,可选值: `'fashion' |
| title | string / void | '' | 标题,默认取小程序app.json文件的配置值,会覆盖默认slot |
| backgroundcolor | string / void | '#ffffff' | 背景颜色,正确的颜色值都可 |
| animation | AnimationData / void | {} | 动画 Data |
| height | number / void | 自适应 | 头部高度,默认自适应,推荐默认 |
| home | string / void | 'pages/index/index' | 首页按钮的路由,仅在 mode="fashion"时有效,默认自动识别小程序配置文件的首页,当 API 无效时获取该值 |
| container-class | string / void | '' | 容器样式 |
| title-class | string / void | '' | 标题样式 |
| left-class | string / void | '' | 左边菜单容器样式 |
| menu-class | string / void | '' | 菜单样式,仅在 mode="fashion"时有效 |
| menustyle | string / void | 'dark' | 菜单模式选择,可选值:`'dark' |
Mode 值说明fashion,流行模式
拥有胶囊菜单,包含【返回】、【首页】两大功能,自动识别当前为首页时菜单不展示
classic,经典模式
拥有经典返回菜单,包含【返回】功能,自动识别当前为首页时菜单不展示。
cover-fashion,流行覆盖模式fashion的cover-view版本,用于覆盖微信小程序原生组建
cover-classic,经典覆盖模式classic的cover-view版本,用于覆盖微信小程序原生组建
custom,自定义模式自定义模式,可完全自定义左侧菜单和中间标题。
cover-custom,自定义覆盖模式custom的cover-view版本,用于覆盖微信小程序原生组建
Slot 说明Slot: <slot></slot>默认的slot会放置在title即标题的地方,同时,若设置了title属性,则忽略默认slot。
<header>这里是默认的slot</header>
Slot: <slot name="left"></slot>、<slot name="title"></slot>自定义 slot 在mode属性为custom | cover-custom时起效,为left左侧菜、title标题。
<header>
<view slot="left">Back</view>
<view slot="title">Minidesign</view>
</header>
FAQs
微信小程序自定义`header`。
We found that @minidesign/header demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.