fix: 树组件调整&接口场景删除文案限制长度

This commit is contained in:
baiqi 2024-07-22 18:00:32 +08:00 committed by 刘瑞斌
parent 73a797f578
commit 4152e6fded
3 changed files with 19 additions and 6 deletions

View File

@ -41,6 +41,7 @@
fixedSize: true,
buffer: 15, // 10 padding
}"
hide-switcher-if-no-children
@check="onSelect"
>
<template #title="nodeData">
@ -158,6 +159,7 @@
key: itemKey,
label: itemTitle,
children: itemChildren ? travel(itemChildren) : [],
expanded: true,
});
}
});
@ -187,6 +189,11 @@
.arco-transfer-view-header {
@apply bg-white;
}
.arco-transfer-view-body {
.ms-tree-container {
padding-left: 16px;
}
}
}
.arco-transfer-operations {
.arco-btn-secondary {

View File

@ -31,7 +31,7 @@
<icon-caret-down v-if="_props.expanded" class="text-[var(--color-text-4)]" />
<icon-caret-right v-else class="text-[var(--color-text-4)]" />
</div>
<div v-else class="h-full w-[16px]"></div>
<div v-else-if="!props.hideSwitcherIfNoChildren" class="h-full w-[16px]"></div>
</template>
<a-tooltip
v-if="$slots['title']"
@ -126,6 +126,7 @@
actionOnNodeClick?: 'expand'; //
nodeHighlightClass?: string; //
hideSwitcher?: boolean; //
hideSwitcherIfNoChildren?: boolean; //
handleDrop?: boolean; //
// 使
// (使 data filterTreeData slot node data使 data filterTreeData )
@ -160,6 +161,7 @@
}),
disabledTitleTooltip: false,
useMapData: true,
hideSwitcherIfNoChildren: false,
}
);
@ -275,9 +277,11 @@
});
filterTreeData.value = val;
}
if (props.defaultExpandAll && treeRef.value) {
treeRef.value.expandAll(true);
}
nextTick(() => {
if (props.defaultExpandAll && treeRef.value) {
treeRef.value.expandAll(true);
}
});
} else {
updateDebouncedSearch();
}
@ -303,7 +307,9 @@
});
filterTreeData.value = data.value;
}
treeRef.value?.expandAll(false);
nextTick(() => {
treeRef.value?.expandAll(false);
});
} else {
updateDebouncedSearch();
}

View File

@ -965,7 +965,7 @@
* 删除接口
*/
function deleteScenario(record?: ApiScenarioTableItem, isBatch?: boolean, params?: ApiScenarioBatchParam) {
let title = t('api_scenario.table.deleteScenarioTipTitle', { name: record?.name });
let title = t('api_scenario.table.deleteScenarioTipTitle', { name: characterLimit(record?.name) });
let selectIds = [record?.id || ''];
if (isBatch) {
title = t('api_scenario.table.batchDeleteScenarioTip', {