Vue
uniapp获取当前路径
admin 发表于2024-12-13 浏览412 评论0
// 获取当前页面栈数组 const pages = getCurrentPages(); // 获取当前页面(数组中的最后一个) const currentPage = pages[pages.length - 1]; // 获取当前页面路径 const currentPath = currentPage.route; // 全部路径 const fullPath = pages[pages.length - 1].$page.fullPath; console.log(currentPath);
Vue
前端(vue)用downloadjs实现下载功能
admin 发表于2024-10-18 浏览593 评论0
一、下载downloadjs
npm install downloadjs
二、引入
import download from 'downloadjs'