Skip to content

Commit e5f4686

Browse files
committed
feat: Add folder select
1 parent 7b70cf2 commit e5f4686

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/renderer/src/components/MainPage.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author : itchaox
44
* @Date : 2024-07-06 11:57
55
* @LastAuthor : itchaox
6-
* @LastTime : 2024-07-25 00:30
6+
* @LastTime : 2024-07-25 10:54
77
* @desc :
88
-->
99
<script setup lang="ts">
@@ -49,7 +49,6 @@ async function copy() {
4949
const treeData = ref([])
5050
5151
// 忽略文件夹列表
52-
// const folderList: any = ref(['dist', 'build'])
5352
const folderList: any = ref([])
5453
5554
// 扫描目录
@@ -116,7 +115,7 @@ function getIgnoreFolderList() {
116115
isFolderAndPush(treeData.value)
117116
118117
let uniquePaths = [...new Set(result)]
119-
folderList.value = [...folderList.value, ...uniquePaths]
118+
folderList.value = uniquePaths
120119
}
121120
122121
// 设置
@@ -833,7 +832,7 @@ const handleScroll = (scrolledContainer, otherContainer) => {
833832
忽略文件夹
834833
<el-tooltip
835834
effect="dark"
836-
content="忽略不需要扫描的文件夹,避免性能损失甚至程序失去响应,比如:node_modules 文件夹,程序内部已自动忽略 node_modules 文件夹"
835+
content="忽略不需要扫描的文件夹,提高扫描效率。可新增需要过滤的文件夹,例如:macOS 下为 /build、/dist,Windows 下为 \build、\dist。"
837836
placement="top"
838837
>
839838
<el-icon size="16" style="margin-left: 3px"><Warning /></el-icon>
@@ -848,6 +847,8 @@ const handleScroll = (scrolledContainer, otherContainer) => {
848847
collapse-tags
849848
:max-collapse-tags="3"
850849
filterable
850+
default-first-option
851+
allow-create
851852
>
852853
<el-option
853854
v-for="item in folderList.filter((i) => i)"
@@ -903,7 +904,7 @@ const handleScroll = (scrolledContainer, otherContainer) => {
903904
忽略文件类型
904905
<el-tooltip
905906
effect="dark"
906-
content="可以选择忽略不需要的文件类型,以提高扫描效率"
907+
content="可以选择忽略不需要的文件类型,以提高扫描效率。可新增需要过滤的文件类型。"
907908
placement="top"
908909
>
909910
<el-icon size="16" style="margin-left: 3px"><Warning /></el-icon>

0 commit comments

Comments
 (0)