更新记录
0.1.0(2026-06-10)
- feat: 鸿蒙支持密码
0.0.9(2026-01-27)
fix: 解决ios中文乱码问题
0.0.8(2026-01-25)
- fix: 解决安卓中文乱码问题
平台兼容性
uni-app(4.76)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| √ | √ | - | - | √ | √ | 5.0 | √ | √ |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - | - | - | - | - |
uni-app x(4.76)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| - | - | 5.0 | √ | √ | - |
lime-zip 压缩解压
- UTS跨平台压缩解压插件,支持密码保护、进度回调。
- 鸿蒙由于官方未提供加密和进度的API 暂时不支持密码和进度回调
安装
插件市场导入,在页面引入,自定义基座
注意 本插件是付费,建议:
✅ 先试用后购买
✅ 完成安卓/iOS真机测试
✅ 试用测试满意后,慎重考虑后再购买自定义基座说明:
- 本插件使用 UTS 原生能力,必须在自定义基座中运行,标准基座无法使用
- CLI 项目特别注意:请检查根目录
package.json,确保所有@dcloudio/*相关包的版本号一致,且与当前 HBuilderX 版本对齐。版本不一致会导致自定义基座编译失败或运行异常
代码演示
压缩
支持加密、多路径
sourcePath: 路径支持文件或文件件
sourcePaths: 路径数组,可选,同样支持文件或文件夹
password: 设置密码,可选
import { zip, type ZipOptions } from '@/uni_modules/lime-zip'
zip({
password: '444555', // 可选加密密码
sourcePath: '/static', // 支持文件/文件夹
outputPath: '/storage/backup_${Date.now()}.zip', // 可选输出路径,不写默认则为缓存地址
// sourcePath: '/static/logo.svg',
// sourcePaths: ['/static/mp3/b.mp3', '/static/font/uni.ttf'],
// sourcePaths: ['/static/mp3', '/static/font'],
success(res) {
console.log('zip res', res.tempFilePath)
},
fail(err) {
console.log('err', err)
},
progress(p : number, t : number) {
//鸿蒙next不支持
console.log('进度', p)
console.log('总数', t)
}
} as ZipOptions)
解压
password: 解压包密码,如果有的话。没有不需要写
zipPath: 解压包路径
import { unzip, type UnZipOptions } from '@/uni_modules/lime-zip'
unzip({
password: '444555', // 加密压缩包必填,若无密侧忽略
zipPath: res.tempFilePath,
outputPath: '/unpacked', // 可选解压目录
success(res) {
console.log('unzip res', res)
},
fail(err) {
console.log('unzip err', err)
},
progress(p : number, t : number) {
//鸿蒙next不支持
unprogress.value = Math.round((p / t) * 100)
}
} as UnZipOptions)
UNIAPP
压缩
import { zip } from '@/uni_modules/lime-zip'
zip({
password: '444555', // 可选加密密码
sourcePath: '/static', // 支持文件/文件夹
outputPath: '/storage/backup_${Date.now()}.zip', // 可选输出路径,不写默认则为缓存地址
// sourcePath: '/static/logo.svg',
// sourcePaths: ['/static/mp3/b.mp3', '/static/font/uni.ttf'],
// sourcePaths: ['/static/mp3', '/static/font'],
success(res) {
console.log('zip res', res.tempFilePath)
},
fail(err) {
console.log('err', err)
},
progress(p, t) {
console.log('进度', p)
console.log('总数', t)
}
})
解压
password: 解压包密码,如果有的话。没有不需要写
zipPath: 解压包路径
import { unzip } from '@/uni_modules/lime-zip'
unzip({
password: '444555', // 加密压缩包必填,若无密侧忽略
zipPath: res.tempFilePath,
outputPath: '/unpacked', // 可选解压目录
success(res) {
console.log('unzip res', res)
},
fail(err) {
console.log('unzip err', err)
},
progress(p , t ) {
//鸿蒙next不支持
unprogress.value = Math.round((p / t) * 100)
}
})
查看示例
- 导入后直接使用这个标签查看演示效果
<!-- // 代码位于 uni_modules/lime-zip/compoents/lime-zip -->
<lime-zip />

收藏人数:
购买源码授权版(
试用
赞赏(0)
下载 72412
赞赏 576
下载 12237826
赞赏 1920
赞赏
京公网安备:11010802035340号