提交 70b963f5 编写于 作者: 小刘28's avatar 小刘28 💬

feat:添加文件处理库;优化获取文件后缀名的方法;

上级 48dbc557
/**
* @Author: xiaozuo28
* @Date: 2022年5月13日08:05:20
* @LastEditors: xiaozuo28
* @LastEditTime: 2022年7月17日08:42:42
* @Description: 文件处理
**/
export default {
/**
* @Description 获取文件后缀名
* @Date 2022年5月9日08:40:16
* @Param {String} fileURL 文件地址
* @Return {String} 文件后缀名
**/
getFileSuffix(fileURL = '') {
let index = fileURL.lastIndexOf('.');
if (index == -1) {
return '';
}
let ext = fileURL.substr(index + 1);
return ext.toLocaleLowerCase();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册