修改树节点切换菜单问题

This commit is contained in:
zhujiyan
2024-09-12 09:56:09 +08:00
parent 3fc8988748
commit 2983418c06

View File

@@ -65,7 +65,7 @@
<el-icon><Download /></el-icon>
</el-button>
<el-button
v-if="activePath != '/'"
v-if="activePath && activePath != '/'"
type="danger"
@click="handleDelDirOrFile(item)"
size="small"
@@ -81,7 +81,7 @@
v-if="item?.type == 'file'"
src="@/assets/img/wenjian.svg"
/>
<!-- <span v-if="!item.type">暂无数据</span> -->
<span v-if="!item.type">暂无数据</span>
<p>
{{
item &&
@@ -94,7 +94,7 @@
</p>
</div>
</div>
<el-empty v-if="dirList.length == 0 || !dirList[0].type" />
<el-empty v-if="dirList.length == 0 || !dirList[0].type || activePathList.length === 0" />
</div>
<popup ref="fileRef"></popup>
<el-dialog
@@ -168,9 +168,12 @@ const isRoot = ref<boolean>(true)
//储存所有点击过的目录
const activePathList: any = ref([])
const nodeClick = (e: any) => {
loading.value = true
if (e.level == 2) {
loading.value = true
nDid.value = e.ndid
dirList.value = []
activePath.value = ''
activePathList.value = []
getDeviceRootPath(nDid.value)
.then((res: any) => {
loading.value = false