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

wx-custom-clip

v1.1.8

Published

微信小程序自定义图片剪裁组件

Downloads

4

Readme

微信小程序自定义剪裁组件

一个简易的自定义形状剪裁组件。

小蓝阿姨的博客:https://blog.csdn.net/qq_18470967

专业软件开发:https://fuzhu123.taobao.com/


使用效果

GIF 2023-2-5 13-26-06


如何安装

# npm方式安装
npm i wx-custom-clip
# yarn方式安装
yarn add wx-custom-clip

在根目录中安装完毕依赖后,在微信开发人员工具的菜单栏中点击工具 - 构建npm sample


使用方法

使用组件很简单,有手就行

"usingComponents": {
  "custom-clip": "/miniprogram_npm/wx-custom-clip/lib/clip-image/index"
}

提供了一个简单的例子:https://gitee.com/pony177/wx-custom-clip/tree/master/sample/miniprogram-3

这个例子是一个剪裁例子

sample

直接在例子里头自己学用哈,四个点和线的颜色的改变也写在例子里了,秒懂的那种。

参数不多,传一个src进去,两个绑定方法就搞定了

<clip-image
  wx:if="{{ show }}"
  src="{{ src }}"
  id="clip"
  bind:confirm="onConfirm"
  bind:cancel="onCancel"
 />

回调方法onConfirm返回值是四个坐标还有图像的url

image-20230205135242064

有了这四个坐标你想继续干啥都可以,这四个坐标分别为左上,右上,左下,右下