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

vs-code-slider

v0.0.9

Published

基于vue3实现仿vs-code的侧边文件管理菜单

Downloads

3

Readme

vs-code-slider

基于vue3实现仿vs-code的侧边文件管理菜单

使用


pnpm install vs-code-slider

查看demo


clone 代码到本地

pnpm install vs-code-slider

pnpm dev

效果如下:

image

1. 文件类型的图标:

| 文件类型 | 图标 | 文件类型 | 图标 | 文件类型 | 图标 | 文件类型 | 图标 | |----------------------|---------------------------------------------------------------|-----------------|------------------------------------------------------------------|-----------------|-----------------------------------------------------------------|-----------|----------------------------------------------------------------| | .c | | .cpp | | .cs | | .cjs | | | .css | | .git、.gitignore | | .go | | .html | | | .png、.jpeg、.jpg、.gif | | .java | | .js | | .json | | | .less | | .license | | .log、.changelog | | .md | | | .npm | | .python | | .react | | readme.md | | | .scss、.sass | | .setting | | .svg | | .tpl | | | .ts | | .tsconfig | | .vue | | .xml | | | .yaml | | .tsconfig | | 默认 | | | |

如不满足,可以issues留言增加

如何使用组件呢,参考demo

<script setup lang="ts">
import VsCodeSlider from 'vs-code-slider';
import {ref} from 'vue';

const arr = ref([
    'vue/d.js',
    'vue/README.md',
    'vue/12.vue',
    'vue/test.md'
]);

</script>

<template>
    <VsCodeSlider
        :files="arr"
    />
</template>
<style scoped>
</style>

组件的props说明如下:

| prop | 类型 | 可选值 | 默认值 | 说明 | |-------------|-----------------|-----|-------------|---------------------------------------------------------| | baseDir | string | - | - | 展示在组件左上角的名称,当不传时,默认是file解析之后的最外层目录名称,如果解析之后有多个,则显示'未命名' | | files | Array<string> | - | [] | 文件数组,当前支持的是完整文件的path组成的数组,具体可以参考例子,组件会自动对层级进行处理和排序 | | theme | string | - | light/dark | 暗黑主题和白色主题 | | width | number | - | 280 | 侧边栏的默认宽度 | | defaultOpen | bool | - | false | 是否默认展示一级目录 | | currentFile | sting | - | 最后一次点击的文件名称 | 当前正在查看的文件,为了顶部的定位到当前文件来使用 | | bgColor | string | - | - | 侧边栏的背景色,优先级最高 | | disabled | bool | - | false | 是否禁用操作 |

2.功能

部分功能完善中,欢迎pr

2.1 文件排序

已支持,默认对文件的按照字母序升序进行排序,同级内文件和字母各自按照升序排列

2.2 全部展开和全部收起

|全部收起| 全部展开 | |-------|----------------------------------| |image| image |

2.3 查找

img.png

2.4 定位

待支持

2.5 增加文件夹

| 点击上方按钮 | 右键添加 | |-----------------------------------|-----------------------------------| | image | image |

2.6 增加文件

| 点击上方按钮 | 右键添加 | |---------------------------------|-----------------------------------| | image | image |

2.7 配置主题

待支持