更新记录

1.0.2(2024-06-11)

处理安卓不能正常编译自定义基座问题。

1.0.1(2024-05-18)

删除测试代码文件.

1.0.0(2024-05-18)

初始化发布

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.6.8,Android:4.4,iOS:11,HarmonyNext:不确定 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

概述

XF-zipUTS封装了Zip文件解压和压缩的功能。

插件接口

isPasswordProtected

是否受密码保护

uni-app项目中(nvue)调用示例:

import { isPasswordProtected } from "@/uni_modules/XF-zipUTS"

isPasswordProtected({
  zipFilePath: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { isPasswordProtected } from "@/uni_modules/XF-zipUTS";
import { ProtectedOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  zipFilePath: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ProtectedOptions;
isPasswordProtected(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

zipProgress

监听压缩及解压进度

uni-app项目中(nvue)调用示例:

import { zipProgress } from "@/uni_modules/XF-zipUTS"

zipProgress({
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { zipProgress } from "@/uni_modules/XF-zipUTS";
import { ZipProgressOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  complete: (res : any) => {
    console.log(res)
  }
} as ZipProgressOptions;
zipProgress(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

unzip

解压文件

uni-app项目中(nvue)调用示例:

import { unzip } from "@/uni_modules/XF-zipUTS"

unzip({
  zipFilePath: "",
  destDirectory: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { unzip } from "@/uni_modules/XF-zipUTS";
import { UnzipOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  zipFilePath: "",
  destDirectory: "",
  complete: (res : any) => {
    console.log(res)
  }
} as UnzipOptions;
unzip(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

unzipWithPassword

解压带密码的文件

uni-app项目中(nvue)调用示例:

import { unzipWithPassword } from "@/uni_modules/XF-zipUTS"

unzipWithPassword({
  zipFilePath: "",
  destDirectory: "",
  password: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { unzipWithPassword } from "@/uni_modules/XF-zipUTS";
import { UnzipWithPasswordOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  zipFilePath: "",
  destDirectory: "",
  password: "",
  complete: (res : any) => {
    console.log(res)
  }
} as UnzipWithPasswordOptions;
unzipWithPassword(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

unzipAssets

解压Assets文件

uni-app项目中(nvue)调用示例:

import { unzipAssets } from "@/uni_modules/XF-zipUTS"

unzipAssets({
  assetsPath: "",
  destDirectory: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { unzipAssets } from "@/uni_modules/XF-zipUTS";
import { UnzipWithPasswordOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  assetsPath: "",
  destDirectory: "",
  complete: (res : any) => {
    console.log(res)
  }
} as UnzipWithPasswordOptions;
unzipAssets(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

zipFiles

压缩文件

uni-app项目中(nvue)调用示例:

import { zipFiles } from "@/uni_modules/XF-zipUTS"

zipFiles({
  files: [],
  destFile: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { zipFiles } from "@/uni_modules/XF-zipUTS";
import { ZipFilesOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  files: [],
  destFile: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ZipFilesOptions;
zipFiles(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

zipFolder

压缩文件夹

uni-app项目中(nvue)调用示例:

import { zipFolder } from "@/uni_modules/XF-zipUTS"

zipFolder({
  folder: "",
  destFile: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { zipFolder } from "@/uni_modules/XF-zipUTS";
import { ZipFolderOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  folder: "",
  destFile: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ZipFolderOptions;
zipFolder(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

zipFilesWithPassword

压缩文件带密码

uni-app项目中(nvue)调用示例:

import { zipFilesWithPassword } from "@/uni_modules/XF-zipUTS"

zipFilesWithPassword({
  files: [],
  destFile: "",
  password: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { zipFilesWithPassword } from "@/uni_modules/XF-zipUTS";
import { ZipFilesWithPasswordOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  files: [],
  destFile: "",
  password: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ZipFilesWithPasswordOptions;
zipFilesWithPassword(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

zipFolderWithPassword

压缩文件夹带密码

uni-app项目中(nvue)调用示例:

import { zipFolderWithPassword } from "@/uni_modules/XF-zipUTS"

zipFolderWithPassword({
  folder: "",
  destFile: "",
  password: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { zipFolderWithPassword } from "@/uni_modules/XF-zipUTS";
import { ZipFolderWithPasswordOptions } from "@/uni_modules/XF-zipUTS/utssdk/interface.uts";

let options = {
  folder: "",
  destFile: "",
  password: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ZipFolderWithPasswordOptions;
zipFolderWithPassword(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

getUncompressedSize

获取总文件大小

uni-app项目中(nvue)调用示例:

import { getUncompressedSize } from "@/uni_modules/XF-zipUTS"

let zipFilePath = "";
getUncompressedSize(zipFilePath);

uni-app x项目(uvue)中调用示例:

import { getUncompressedSize } from "@/uni_modules/XF-zipUTS";

let zipFilePath = "";
getUncompressedSize(zipFilePath);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问