鸿枫网盘,文件夹面包屑跳转实现功能

2024-06-22 19:28

本文主要是介绍鸿枫网盘,文件夹面包屑跳转实现功能,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

  1. 新增功能,磁盘格式化,层级面包屑跳转,视频预览优化

  2. 主要记录一下面包屑的实现思路

    2.1 面包屑渲染

        <el-breadcrumb separator-class="el-icon-arrow-right">      <el-breadcrumb-item>        <el-link :underline="false" @click="skipCrumbs(0)">根目录</el-link>      </el-breadcrumb-item>        <el-breadcrumb-item v-for="(item,index) in crumbsList":key="index">          <el-link :underline="false" @click="skipCrumbs(item.id)">{{item.name}}</el-link>        </el-breadcrumb-item>    </el-breadcrumb>    
  3. 定义vue dataallCrumbsList: [],crumbsList: [],

    js 代码​

  4.     checkboxOndblclick(disk) {      console.log(disk);      if (disk.isDir===1) {        this.queryParams.parentId = disk.id;        const skip = {          id: disk.id,          parentId: disk.parentId,          name: disk.name        }        this.allCrumbsList.push(skip);        this.allCrumbsList = this.uniqueObjects(this.allCrumbsList);        this.crumbsList=[];        this.generateCrumbs(disk.id);        this.skipList.push(disk.id);        this.skipList = [...new Set(this.skipList)];        this.uploadFileUrl = process.env.VUE_APP_BASE_API + "/disk/file/upload/"+disk.id        this.getList();      }    },    handleSkip(skip) {      if(skip===0) {        let index = this.skipList.indexOf(this.queryParams.parentId);        this.skip(index-1)      }else {        let index = this.skipList.indexOf(this.queryParams.parentId);        this.skip(index+1)      }    },    skip(nextIndex) {      this.crumbsList=[];      if (nextIndex<0) {          this.queryParams.parentId=0;          this.allCrumbsList=[];          this.getList();      }else if (nextIndex>=this.skipList.length) {        this.queryParams.parentId =0;        this.allCrumbsList=[];        this.getList();      } else {        this.queryParams.parentId = this.skipList[nextIndex];        this.generateCrumbs(this.queryParams.parentId);        this.getList();      }    }, uniqueObjects(arr) {      const unique = [];      const seen = new Set();      arr.forEach(item => {        const stringifiedItem = JSON.stringify(item);        if (!seen.has(stringifiedItem)) {          unique.push(item);          seen.add(stringifiedItem);        }      });      return unique;    },    generateCrumbs(id) {      if (id===0) {        this.crumbsList = this.crumbsList.reverse();        return;      }      const crumbs = this.getCrumbsListById(id);      if (crumbs!=null&&crumbs!=undefined) {        this.crumbsList.push(crumbs);        this.generateCrumbs(crumbs.parentId);      }    },    getCrumbsListById(id) {      return this.allCrumbsList.find(item => {        return item.id === id;      });    },    skipCrumbs(id) {      this.queryParams.parentId = id;      this.crumbsList = [];      this.generateCrumbs(this.queryParams.parentId);      this.getList();    },

体验地址  鸿枫网盘

这篇关于鸿枫网盘,文件夹面包屑跳转实现功能的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1085199

相关文章

Spring Shell 命令行实现交互式Shell应用开发

《SpringShell命令行实现交互式Shell应用开发》本文主要介绍了SpringShell命令行实现交互式Shell应用开发,能够帮助开发者快速构建功能丰富的命令行应用程序,具有一定的参考价... 目录引言一、Spring Shell概述二、创建命令类三、命令参数处理四、命令分组与帮助系统五、自定义S

SpringBatch数据写入实现

《SpringBatch数据写入实现》SpringBatch通过ItemWriter接口及其丰富的实现,提供了强大的数据写入能力,本文主要介绍了SpringBatch数据写入实现,具有一定的参考价值,... 目录python引言一、ItemWriter核心概念二、数据库写入实现三、文件写入实现四、多目标写入

Android Studio 配置国内镜像源的实现步骤

《AndroidStudio配置国内镜像源的实现步骤》本文主要介绍了AndroidStudio配置国内镜像源的实现步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,... 目录一、修改 hosts,解决 SDK 下载失败的问题二、修改 gradle 地址,解决 gradle

SpringSecurity JWT基于令牌的无状态认证实现

《SpringSecurityJWT基于令牌的无状态认证实现》SpringSecurity中实现基于JWT的无状态认证是一种常见的做法,本文就来介绍一下SpringSecurityJWT基于令牌的无... 目录引言一、JWT基本原理与结构二、Spring Security JWT依赖配置三、JWT令牌生成与

SpringBoot实现微信小程序支付功能

《SpringBoot实现微信小程序支付功能》小程序支付功能已成为众多应用的核心需求之一,本文主要介绍了SpringBoot实现微信小程序支付功能,文中通过示例代码介绍的非常详细,对大家的学习或者工作... 目录一、引言二、准备工作(一)微信支付商户平台配置(二)Spring Boot项目搭建(三)配置文件

基于Python实现高效PPT转图片工具

《基于Python实现高效PPT转图片工具》在日常工作中,PPT是我们常用的演示工具,但有时候我们需要将PPT的内容提取为图片格式以便于展示或保存,所以本文将用Python实现PPT转PNG工具,希望... 目录1. 概述2. 功能使用2.1 安装依赖2.2 使用步骤2.3 代码实现2.4 GUI界面3.效

MySQL更新某个字段拼接固定字符串的实现

《MySQL更新某个字段拼接固定字符串的实现》在MySQL中,我们经常需要对数据库中的某个字段进行更新操作,本文就来介绍一下MySQL更新某个字段拼接固定字符串的实现,感兴趣的可以了解一下... 目录1. 查看字段当前值2. 更新字段拼接固定字符串3. 验证更新结果mysql更新某个字段拼接固定字符串 -

java实现延迟/超时/定时问题

《java实现延迟/超时/定时问题》:本文主要介绍java实现延迟/超时/定时问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Java实现延迟/超时/定时java 每间隔5秒执行一次,一共执行5次然后结束scheduleAtFixedRate 和 schedu

Java Optional避免空指针异常的实现

《JavaOptional避免空指针异常的实现》空指针异常一直是困扰开发者的常见问题之一,本文主要介绍了JavaOptional避免空指针异常的实现,帮助开发者编写更健壮、可读性更高的代码,减少因... 目录一、Optional 概述二、Optional 的创建三、Optional 的常用方法四、Optio

在Android平台上实现消息推送功能

《在Android平台上实现消息推送功能》随着移动互联网应用的飞速发展,消息推送已成为移动应用中不可或缺的功能,在Android平台上,实现消息推送涉及到服务端的消息发送、客户端的消息接收、通知渠道(... 目录一、项目概述二、相关知识介绍2.1 消息推送的基本原理2.2 Firebase Cloud Me