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

@rancheer/goods-card

v1.0.3

Published

该组件已废弃,无法使用

Downloads

10

Readme

该组件已废弃,无法使用

1)配置属性

| props属性 | 类型 | 默认值|是否必传 | ---- | ---- | ---- | ---- | | goodsData 商品数据 | Object | {} | 是 | |transfer 字段适配(商品的字段不一致)| String | normal只有必须的商品名称、价格、规格 normal/search/tuangou/favorite | 否 | | shape 外层大小 | String | middle mini/middle/big/super | 否 | direction 展示方向 | String | vertical vertical/column | 否 | | className 自定义样式 | String | '' | 否 | | otherPrice 显示当前价格的额外价格 | String | “” pt 拼团价格/yj 原价 | 否 | |showSku 显示商品规格 | Boolean | true | 否 | |showSubTitle 显示副标题 | Boolean | false | 否 | |showAnglerTag 左上角角标| Boolean| true| 否| |showActivityTag 活动标签| Boolean| true | 否| |showShopName 店铺名称| Boolean |true|否| |showSaleCount 显示销量 | Boolean|false|否| |preview 商品预览| Boolean |false|否| |showPtButton 显示拼团按钮| Boolean|false|否| |showAddCart 显示加入购物车按钮 |Boolean|true|否| |slotImage 商品主图插槽 | Boolean | false | 否 | | slotTitle 商品标题/副标题插槽 | Boolean | false | 否 | | slotGoods 商品规格、价格、店铺插槽 | Boolean | false | 否 | |slotBottom 商品底部/右边拓展插槽 | Boolean | false | 否 |

2)回调方法 | 方法名称 | 描述| 是否必传 | | ---- | ---- | ----| |bindPtHandle | 当显示拼团按钮时可用 返回商品对象 | 否 | |bindAddCartHandle | 当显示购物车按钮时可用 返回商品对象 | 否 | |bindDeatailHandle | 点击商品的回调方法 返回商品对象 | 否 | |bindReadyhandle | 商品数据加载完成时的回调 返回 callback| 否| | 实验性bindErrorHandle | 商品数据加载异常时的回调 返回 error对象| 否 | 3)自定义内容显示 | 插槽名称 | 作用部位| 描述 | | ---- | ---- | ----| | | 商品主图 | 替换当前商品组件的主图显示部位 | | | 商品标题/副标题 | 替换当前的商品标题与副标题部位 | | | 商品规格、价格、店铺 | 替换当前的商品规格、价格、店铺部位 | ||在商品底部/右边拓展| 拓展底部/右边|