无人机管理后台前端(已迁走)
张含笑
2025-12-01 f4f6d20842dff13ca9fcb932d274be0582bf311f
feat:添加选中效果
1 files modified
13 ■■■■■ changed files
src/views/layerManagement/components/leftList.vue 13 ●●●●● patch | view | raw | blame | history
src/views/layerManagement/components/leftList.vue
@@ -59,6 +59,7 @@
        :expand-on-click-node="false"
         :check-on-click-node="false" 
        :filter-node-method="filterNode"
        highlight-current
        @check="handleCheck"
        :props="{
          label: 'name',
@@ -193,6 +194,12 @@
};
// 定位按钮事件
const handleLocation = node => {
 const currentKey = treeRef.value.getCurrentKey();
      if (currentKey === node.data.id) {
        treeRef.value.setCurrentKey(null); // 取消高亮
      } else {
        treeRef.value.setCurrentKey(node.data.id); // 高亮当前节点
      }
  if (node.data.level === 2) {
    layerParams.value.isSingleLocating = false;
    // 新增:标记当前定位的文件夹ID
@@ -452,7 +459,10 @@
  // padding-left: 0 !important;
  border-bottom: 1px dotted  rgba(255,255,255,0.1);
  }
  // 定位选中节点的背景色样式
  ::v-deep(.el-tree-node.is-current > .el-tree-node__content) {
    background-color: rgba(64, 158, 255, 0.2) !important; // 浅蓝色半透明背景
  }
  .isTheTerritory {
    :deep() {
      .el-tree-node__expand-icon {
@@ -470,6 +480,7 @@
    display: flex;
    justify-content: space-between;
    align-items: center;
     padding-right: 12px;
    width: 100%;
       .nodeName {
    font-size: 12px !important;