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

zhkj-ui

v1.2.1

Published

用于图片上传和编辑

Downloads

7

Readme

智慧科技图片处理 v1.2.1

用于图片上传和处理 (缩放,裁剪,镜像,旋转,滤镜等)

更新日志

2022-11-07 v1.2.1 优化上传数量限制 2022-11-07 v1.1.7 新增图片压缩质量参数 quality 默认为0.5

2022-08-08 新增强制更新视图方法 updateforce

2022-08-11 修复存在多个裁剪组件时不显示的bug

安装方式

$ npm i zhkj-ui

使用方式

// 在main.js中引入与注册
import zhkjUi from "zhkj-ui"
import "zhkj-ui/dist/zhkj-ui.css"
Vue.use(zhkjUi);
Vue.component('imageUpload', zhkjUi.imageUpload);

// 普通使用
<imageUpload action="http://xxx/api/upload" v-model="fileurl" @upload="upload" tip="只能上传jpg/png文件,且不超过500kb"></imageUpload>

// avue.js中使用
<template>
    ...
	<avue-form :option="option" v-model="form"></avue-form>
	...
</template>

data:{
    return {
         form: {},
         option: {
            column: [
              {
                label: '图片上传',
                prop: 'thumb',
                component: 'imageUpload',
                span: 24,
                event: {
                  upload: (val) => {
                    this.form.thumb = val;
                  },
                },
                params: {
                  action: '/api/blade-resource/oss/endpoint/put-file',
                  headers: {
                    Authorization: 'tokenxxxxxx',
                  },
                  tip: "只能上传jpg/png文件,且不超过500kb",
                }
              }
           ]
      },
    }
}

配置项

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :-------- | --------------------------- | ------------ | :----: | ------------- | | propsHttp | 返回数据结构体配置 | object | — | {res: 'data'} | | data | 上传时附带的额外参数 | object | — | — | | multiple | 是否支持多选文件 | boolean | — | false | | limit | 最大允许上传个数 | number | — | 3 | | fileSize | 上传文件的大小限制,单位为M | number | — | — | | headers | 携带的头部附加参数 | object | — | — | | accept | upload时文件类型 | String/Array | — | — | | tip | 文字提示 | String | — | — | | action | 上传的地址 | String | — | — | | quality | 图片压缩质量 | number | 0-1 | 0.5 |

第三方依赖

Element-ui

tui-image-editor