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

iteach-upload

v1.0.41

Published

modeType 1素材上传、2、校本库、个人上传 3、作业包 4、课程产品课件上传,6教研云(个人,校本云盘) 9默认展示上传按钮 ``` @Prop({ required: false, default: 1 }) public modeType!: number; // ``` limit 最大允许上传个数 ``` @Prop({ required: false, default: 3 }) public limit!: number; ``` acceptTy

Downloads

3

Readme

#iteach-upload

Props

modeType 1素材上传、2、校本库、个人上传 3、作业包 4、课程产品课件上传,6教研云(个人,校本云盘) 9默认展示上传按钮

@Prop({ required: false, default: 1 })
    public modeType!: number; //

limit 最大允许上传个数

@Prop({ required: false, default: 3 })
public limit!: number;

acceptType 限定上传文件类型,例如:'.ppts,.mp4'

@Prop({ required: false, default: '.jpg' })
public acceptType!: string; 

sourceType 素材库上传时限定素材类型

@Prop({ required: false, default: '6' })
public sourceType!: string; // 

addParams{} 直接上传文件的附加参数

@Prop({
    required: false,
    default: () => {
        return {
            param: {} // 参数
            url:'' //上传路径
        }
    }
})
public addParams!: any;

jyy2 兼容教研云的悬浮窗,值为1时生效

public jyy2: any = false;

type 素材库上传时特殊类型

public type: string = ''; 

sliceType 素材库上传时特殊切片类型

public sliceType: string = ''; 

sourceItem 素材库替换素材

@Prop({
    required: false,
    default: () => {
        return {
        modifyType: '',
        resourceId: '',
        }
    }
})
public sourceItem!: any;

Emit func

1、@changeFile 文件上传完成之后,返回文件上传结果

public changeFile(list: Array<{ previewUrl: any; fileId: any; sliceType: any; downloadUrl: any; size: any; structJson: any; coverImgUrl: any; fileMd5: any; fileName: any; }>,fileId?:string | undefined) {
    this.$emit('changeFile',list,fileId);
}

2、@changeFilePercent 进度条更新事件

public changeFilePercent(filePercent: number, id: any) {
    this.fileList.forEach((v: any) => {
    if (v.sourceId === id) {
        v.filePercent = filePercent;
    }
    });
    this.$forceUpdate();
    this.$emit('changeFilePercent',filePercent,id)
}

3、@startUploadEvent 开始上传

public startUploadEvent(): void {
    this.$emit('startUploadEvent')
}

4、@singleChangeFile 单文件上传完成

public singleChangeFile(file: any, fileId: any) {
    this.$emit('singleChangeFile', file, fileId);
}

5,changeError 上传数量超出限制 #Event func 1、addFileFunc() 自定义按钮唤起文件上传

<iteach-upload ref="upload1"></iteach-upload>
this.$refs.upload1.addFileFunc();

2、按钮自定义样式,插槽处可填写自定义element,点击后自动唤起文件上传

<iteach-upload>
    <slot/>
</iteach-upload>

3、stopDownload() 删除文件列表的某一个文件

public stopDownload(file: any, fileId: string): void {
    this.$refs.upload1.stopDownload(file, fileId);
}

4、clearFiles()//清空文件选择器中的文件

public clearFiles(){
    this.$refs.upload1.clearFiles();
}

5、setSourceItem() //编辑素材时数据传入

6、getFilemd5(file) // 直接传入文件

7、setOthers() // 增加文件额外参数 public setOthers(item:any): void { this.$refs.iteachUpns.setOthers(item) }

##callBack 1、singleFinishCallback 单文件上传完成回调

2、