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

zb-fitment-core

v1.0.11

Published

浙北装修组件

Downloads

6

Readme

zb-fitment-core

export { H5Fitment, FitmentPluginList }

导出的是装修的 pc 组件和插件对象列表。

组件分析

H5Fitment

入参

interface Iprops {
  title?: string // 默认的标题
  toolbarConfig: any // toolbar的配置,会通过addGetValue方法,给这个配置注入一个getValue的方法,此方法能够获取最外层父组件的state,并把datasource中的每一个item,ryu开头的方法都删除了
  dataSource?: any[] // 默认的dataSource
  background: string // 页面的背景颜色
  homeIcon: HomeIconI // 悬浮组件
  isMini?: boolean // 是否是微信小程序
}

Toolbar

接收一个toolbarConfig参数,返回一个按钮列表,toolbarConfig为按钮antd Button组件的propsonClick的第一个参数返回主组件的state

TemplateGroup

拖拽组件列表,FitmentPluginList中配置的组件列表

WechatHeader

展示的 h5 模拟器的头部,接受一个title参数,展示页面标题

AddPluginArea

当页面没有组件的时候,默认的占位组件,当有组件拖入的时候,通过event.dataTransfer.getData('pluginId')获取拖入组件的 id,然后渲染相应组件。当拖拽光标移入占位组件区域的时候,修改为进入样式。

HomeIcon

悬浮组件

PageEditor

封面编辑组件,有需要全局添加的组件或参数可以在这里配置

addRyuProps

函数,对plugin列表添加位置移动的方法和属性