liuQiang 1 éve
szülő
commit
affa65b2ac

BIN
src/assets/images/fileIcon.png


+ 5 - 2
src/components/FileTreeChoice/index.vue

@@ -17,7 +17,8 @@
         >
           <template #default="{ node,data }">
             <span style="display: flex;align-items: center;">
-              <img :src="fileImg" alt="" style="width: 20px;height: 20px;margin-right: 5px;"/>
+              <img v-if="!data.remark" :src="folderImg" alt="" style="width: 20px;height: 20px;margin-right: 5px;"/>
+              <img v-else :src="fileIcon" alt="" style="width: 20px;height: 20px;margin-right: 5px;"/>
               <!-- 放置图片 -->
               <span>{{ node.label }}</span>
               <!-- 显示节点标签 -->
@@ -41,7 +42,8 @@
   <script setup>
 import { reactive, ref, toRaw, toRefs, watch } from "vue";
 import { ElMessage } from "element-plus";
-import fileImg from "@/assets/images/file-img.png";
+import folderImg from "@/assets/images/file-img.png";
+import fileIcon from "@/assets/images/fileIcon.png";
 import useUserStore from "@/store/modules/user";
 import { defineEmits } from "vue";
 const opent = ref(true);
@@ -82,6 +84,7 @@ watchEffect(() => {
 const clickData = ref({});
 const handleNodeClick = (data) => {
   clickData.value = data;
+  // console.log('data',data);
 };
 //确定按钮
   const emit = defineEmits(["fileChangeMsg"]);