This commit is contained in:
2026-07-24 16:56:15 +08:00
180 changed files with 50264 additions and 1407 deletions

View File

@@ -283,8 +283,10 @@
// 长按文件
const handleLongPress = (folder) => {
if (isSelectFolder.value) return;
const isWyxd = folder.name && folder.name.toLowerCase().endsWith('.wyxd');
const itemList = isWyxd ? ['下载', '删除', 'WYXD查看器'] : ['下载', '删除'];
uni.showActionSheet({
itemList: ['下载', '删除'], // ['删除', '下载', '压缩', '重命名']
itemList: itemList,
success: (res) => {
switch (res.tapIndex) {
case 0:
@@ -293,12 +295,9 @@
case 1:
handleDelete(folder);
break;
// case 2:
// handleDownload(folder);
// break;
// case 3:
// handleRename(folder);
// break;
case 2:
if (isWyxd) openWyxdViewer(folder);
break;
}
}
})
@@ -458,6 +457,17 @@
});
};
// WYXD 查看器入口
const openWyxdViewer = (folder) => {
const filePath = folder.path.startsWith('./') ? folder.path.slice(2) : folder.path;
uni.navigateTo({
url: '/pages/WYXD/WYXD?workspaceId=' + encodeURIComponent(workspaceId.value)
+ '&filePath=' + encodeURIComponent(filePath)
+ '&fileName=' + encodeURIComponent(folder.name)
+ '&userToken=' + encodeURIComponent(UserToken.value)
});
};
// 删除
const handleDelete = (folder) => {
uni.showModal({