![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
file-folder-selector
Advanced tools
基于Vue3实现的文件选择插件,支持无限层次的文件夹嵌套
English documents please move: README-EN.md
效果图如下:
yarn add file-folder-selector
# or
npm install file-folder-selector --save
在你需要使用此插件的业务代码中导入插件。
<script setup lang="ts">
import { FileSelect } from "file-folder-selector";
// 组件的样式文件,可以在项目的业务代码内导入,也可以在项目的入口文件导入
import "file-folder-selector/dist/style.css";
</script>
在template
中使用即可。
<template>
<file-select />
</template>
插件接收5个可选参数:
fileData
文件树结构数据
title
文件名, 值为string 类型id
文件id, 值为string 类型type
文件类型, 值为"file"或"folder"imgSrc
文件图片地址(可选参数),值为string 类型childData
子文件数据(可选参数),值为array类型,如果type为"folder",则传此参数,数组中的每一项类型就为fileData
的类型。defaultFolderImage
默认的文件夹图标,值为string 类型defaultFileImage
默认的文件图标,值为string 类型defaultSearchImage
默认的搜索图标,值为string 类型defaultFolderPathImage
默认的文件夹路径图标,值为string 类型注意:插件默认的图标更换不支持svg格式的图片,插件的
fileData
参数可参考源码中的FileConfig.json文件
插件提供了1个回调函数:
array
类型,数组中的每一项类型为:{title: string; id: string; type: string }
具体的使用方法可以参考源码中的 file-select-test.vue 文件。
至此,插件的所有使用方法就介绍完了。
我是神奇的程序员,一位前端开发工程师。
如果你对我感兴趣,请移步我的个人网站,进一步了解。
FAQs
基于Vue3实现的文件选择插件,支持无限层次的文件夹嵌套
The npm package file-folder-selector receives a total of 5 weekly downloads. As such, file-folder-selector popularity was classified as not popular.
We found that file-folder-selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.