revive 4 years ago
parent
commit
07fa8d4def
2 changed files with 24 additions and 3 deletions
  1. +19
    -3
      src/views/main_web/workspace/components/folder-item.vue
  2. +5
    -0
      src/views/main_web/workspace/workspace.new.vue

+ 19
- 3
src/views/main_web/workspace/components/folder-item.vue View File

@@ -6,7 +6,6 @@
> >
<div <div
class="defultImage-mid foldernew-mid" class="defultImage-mid foldernew-mid"
/> />
<strong <strong
class="yiyunwenjian_name" class="yiyunwenjian_name"
@@ -16,12 +15,24 @@
<strong class="visontext" <strong class="visontext"
>{{ folder.childCount + folder.fileCount }}个项目</strong> >{{ folder.childCount + folder.fileCount }}个项目</strong>


<template v-if="isClient">
<!-- 绿色钩 -->
<div
class="yijianxietong isonselect"
>
<i
class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon"
@click="commitFolder"
/>
</div>
</template>

<!-- 右键菜单 --> <!-- 右键菜单 -->
<div class="contextmenu" v-show="rightMenuVisible" <div class="contextmenu" v-show="rightMenuVisible"
:style="{ top: rightMenuTop + 'px', left: rightMenuLeft + 'px'}" :style="{ top: rightMenuTop + 'px', left: rightMenuLeft + 'px'}"
> >
<ul class="rightMenu folderRightMenu"> <ul class="rightMenu folderRightMenu">
<li v-if="isClient" @click.stop="downloadFolder">下载文件夹</li>
<li v-if="isClient" @click.stop="downloadFolder">从云端更新</li>
</ul> </ul>
</div> </div>
</div> </div>
@@ -62,7 +73,12 @@ export default {
}, },
closeRightMenu() { closeRightMenu() {
this.rightMenuVisible = false; this.rightMenuVisible = false;
}
},
commitFolder(e) {
e.stopPropagation();
e.preventDefault();
this.$emit('commitFolder', this.folder);
},
}, },
watch: { watch: {
rightMenuVisible(value) { rightMenuVisible(value) {


+ 5
- 0
src/views/main_web/workspace/workspace.new.vue View File

@@ -114,6 +114,7 @@
@onDownloadAll="downloadFolder" @onDownloadAll="downloadFolder"
:activeRightMenuId="tempRightFileId" :activeRightMenuId="tempRightFileId"
@dblclick.native="intoSubFolder(folder)" @dblclick.native="intoSubFolder(folder)"
@commitFolder="commitFolder"
/> />
</div> </div>
</div> </div>
@@ -927,6 +928,10 @@ export default {
errorHandler, errorHandler,
); );
}, },
commitFolder(folder) {
const path = `${this.localWorkspacePrefix}\\${this.currentNodeFolder.folderName}${folder.folderPath ? `\\${folder.folderPath}`:''}`.replace(/\//g, '\\');
this.clientUpload([path]);
},
/** /**
* 点击文件事件:直接打开文件 * 点击文件事件:直接打开文件
*/ */


Loading…
Cancel
Save