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 🙏

© 2026 – Pkg Stats / Ryan Hefner

iosish-file-system

v0.0.97

Published

# 使用姿势 ``` javascript import Vue from 'vue'; import FileSystem from 'iosish-file-system'

Readme

file-master

使用姿势

import Vue from 'vue';
import FileSystem from 'iosish-file-system'

Vue.use(FileSystem, {
    // 操作集的修改写法具体见operation.js 但是不要修改打开及重命名的写法
    configOperations: (operations) => {
        // 多选时右键的操作集
        operations.genMenuDocuments = (targets, context) => {
            const target = targets[0];
            return [
                {
                    title: '打开',
                    action: (function(){
                        this.$emit('openPath', target);
                    }).bind(context),
                },
                ....
        };
        // 单选时右键的操作集
        operations.genMenu = (targets, context) => {
            const target = targets[0];
            return [
                {
                    title: '打开',
                    action: (function(){
                        this.$emit('openPath', target);
                    }).bind(context),
                },
                ....
        };
    }
});
<template>
    <button @click="changemode">显示模式改变</button>
    <toolbar />
    <iosish-file-system :data="data" @api="onApiCalling">
        <template v-slot:brief="{target}">
          <div>{{target}}</div>
        </template>
    </iosish-file-system>
</template>
<script>
import { EventBus, Toolbar }  from 'iosish-file-system'
export default {
    components: {
        'toolbar' :Toolbar,
    },
    data(){
        return {
            data: []
        }
    },
    methods: {
        onApiCalling(payload){
            console.log(payload)
            EventBus.setTarget(someTraget...)
        },
        changemode(){
            EventBus.mode = EventBus.mode === 'tree' ? 'plain': 'tree';
        },
        requestData(){
            setTimeout(() => {
                // 直接操作原来的data就可以实现视图的改变
                this.data[1].children[0].children.splice(0, 1);
                console.log(this.data);
            }, 200);
        },
    }
}
</script>

文件结构设计

[
    {
        "id": "6b95c72317c2bd650fb9dd43f0bf9b0d4270ee06",
        "name":"文件夹",
        "timestamp":1553325813294,
        "ext":"folder",
        "children":[
            {
                "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
                "name":"文件1",
                "timestamp":1553325813294,
                "size":1024,
                "ext":"png",
                "src_small": "xxxxxxxx",
                "src_mid": "yyyyyyyyyyyyy",
                "src_big": "zzzzzzzzzzzzzzz",
                "path":"文件夹/文件1"
            }
        ],
        "path":"文件夹"
    },
    {
        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
        "name":"集货宝",
        "timestamp":1553325813294,
        "ext":"folder",
        "children":[
            {
                "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
                "name":"东南角",
                "timestamp":1553325813294,
                "ext":"folder",
                "children":[
                    {
                        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
                        "name":"东南角的照片1",
                        "timestamp":1553325813294,
                        "size":1024,
                        "ext":"png",
                        "src_small": "xxxxxxxx",
                        "src_mid": "yyyyyyyyyyyyy",
                        "src_big": "zzzzzzzzzzzzzzz",
                        "path":"集货宝/东南角/东南角的照片1"
                    },
                    {
                        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
                        "name":"东南角的照片2",
                        "timestamp":1553325813294,
                        "size":1024,
                        "src_small": "xxxxxxxx",
                        "src_mid": "yyyyyyyyyyyyy",
                        "src_big": "zzzzzzzzzzzzzzz",
                        "ext":"png",
                        "path":"集货宝/东南角/东南角的照片2"
                    },
                    {
                        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
                        "name":"东南角的照片3",
                        "timestamp":1553325813294,
                        "size":1024,
                        "src_small": "xxxxxxxx",
                        "src_mid": "yyyyyyyyyyyyy",
                        "src_big": "zzzzzzzzzzzzzzz",
                        "ext":"png",
                        "path":"集货宝/东南角/东南角的照片3"
                    }
                ],
                "path":"集货宝/东南角"
            }
        ],
        "path":"集货宝"
    }
]

接口设置

  1. 获取文件树的总接口 返回总文件结构

  2. 获取不同类型的快捷链接接口 返回单个文件的结构

[
    {
        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
        "ext":"folder",
        "name":"文件夹",
        "path":"文件夹",
        "timestamp":1553325813294,
        "size":1024
    },
    {
        "id": "a7c9fbf50a2519b4de53974fa188c01ee9663f9e",
        "ext":"png",
        "name":"东南角的照片1",
        "path":"集货宝/东南角/东南角的照片1",
        "src_small": "xxxxxxxx",
        "src_mid": "yyyyyyyyyyyyy",
        "src_big": "zzzzzzzzzzzzzzz",
        "timestamp":1553325813294,
        "size":1024
    }
...]
  1. 抛出的钩子 监听body中抛出的api事件,payload中包含了目标集合及事件类型,具体可以看App.vue中的用法