Skip to content

Commit 004f78c

Browse files
feat: folder
1 parent 2e15552 commit 004f78c

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

ui/src/components/app-icon/icons/folder.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,29 @@ export default {
9191
])
9292
},
9393
},
94+
'app-add-folder': {
95+
iconReader: () => {
96+
return h('i', [
97+
h(
98+
'svg',
99+
{
100+
style: { height: '100%', width: '100%' },
101+
viewBox: '0 0 16 16',
102+
version: '1.1',
103+
xmlns: 'http://www.w3.org/2000/svg',
104+
},
105+
[
106+
h('path', {
107+
d: 'M42.666667 170.666667a42.666667 42.666667 0 0 1 42.666666-42.666667h357.632a42.666667 42.666667 0 0 1 38.144 23.594667L512 213.333333h426.666667a42.666667 42.666667 0 0 1 42.666666 42.666667v597.333333a42.666667 42.666667 0 0 1-42.666666 42.666667H85.333333a42.666667 42.666667 0 0 1-42.666666-42.666667V170.666667zM5.33317 8.33333C5.33317 8.14924 5.48241 8 5.6665 8H7.33317V6.33333C7.33317 6.14924 7.48241 6 7.6665 6H8.33317C8.51726 6 8.6665 6.14924 8.6665 6.33333V8H10.3332C10.5173 8 10.6665 8.14924 10.6665 8.33333V9C10.6665 9.18409 10.5173 9.33333 10.3332 9.33333H8.6665V11C8.6665 11.1841 8.51726 11.3333 8.33317 11.3333H7.6665C7.48241 11.3333 7.33317 11.1841 7.33317 11V9.33333H5.6665C5.48241 9.33333 5.33317 9.18409 5.33317 9V8.33333Z',
108+
fill: 'currentColor',
109+
}),
110+
h('path', {
111+
d: 'M0.666504 13.3333V2.66667C0.666504 2.29848 0.964981 2 1.33317 2H6.92115C7.17366 2 7.4045 2.14267 7.51743 2.36852L7.99984 3.33333H14.6348C15.0205 3.33333 15.3332 3.63181 15.3332 4V13.3333C15.3332 13.7015 15.0205 14 14.6348 14H1.36492C0.979194 14 0.666504 13.7015 0.666504 13.3333ZM1.99984 4.66667V12.6667H13.9998V4.66667H1.99984Z',
112+
fill: 'currentColor',
113+
}),
114+
],
115+
),
116+
])
117+
},
118+
},
94119
}

ui/src/components/folder-tree/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@
5151
<template #dropdown>
5252
<el-dropdown-menu>
5353
<el-dropdown-item @click.stop="openCreateFolder(data)">
54-
<el-icon><EditPen /></el-icon>
54+
<AppIcon iconName="app-add-folder"></AppIcon>
5555
{{ '添加子文件夹' }}
5656
</el-dropdown-item>
5757
<el-dropdown-item @click.stop="openEditFolder(data)">
5858
<el-icon><EditPen /></el-icon>
5959
{{ $t('common.edit') }}
6060
</el-dropdown-item>
61-
<el-dropdown-item divided @click.stop="deleteFolder(data)">
61+
<el-dropdown-item
62+
divided
63+
@click.stop="deleteFolder(data)"
64+
:disabled="data.id === 'default'"
65+
>
6266
<el-icon><Delete /></el-icon>
6367
{{ $t('common.delete') }}
6468
</el-dropdown-item>
@@ -212,7 +216,7 @@ function refreshFolder() {
212216
}
213217
:deep(.overflow-inherit_node__children) {
214218
.el-tree-node__children {
215-
overflow: inherit;
219+
overflow: inherit !important;
216220
}
217221
}
218222
</style>

ui/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default defineConfig(({ mode }) => {
1717
const prefix = process.env.VITE_DYNAMIC_PREFIX || ENV.VITE_BASE_PATH
1818
const proxyConf: Record<string, string | ProxyOptions> = {}
1919
proxyConf['/api'] = {
20+
// target: 'http://43.166.1.146:8080',
2021
target: 'http://127.0.0.1:8080',
2122
changeOrigin: true,
2223
rewrite: (path: string) => path.replace(ENV.VITE_BASE_PATH, '/'),

0 commit comments

Comments
 (0)