refactor(创建模板): 优化文件选择界面布局和交互
移除冗余的文件选择按钮,将文件路径选择整合到文本输入框中 调整容器间距和最大宽度限制 删除已显示在输入框中的选中路径展示区域
This commit is contained in:
1 parent
703b5a1040
commit
f2d88bb3d1
2 files changed
+15
-22
No files matched your search
@@ -229,6 +229,6 @@ Building creates different distribution formats based on the platform:
|
||||
|
||||
Artifacts are named with the format `${productName} ${version}_${arch}.${ext}` and stored in the `release/${version}` directory.
|
||||
|
||||
run `pnpm typecheck` before finish the task if need,don't run `pnpm dev`.
|
||||
run `pnpm typecheck` before finish the task if need,don't run `pnpm dev` or `pnpm build`.
|
||||
|
||||
Always respond in 中文
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<v-container
|
||||
fluid
|
||||
class="pa-0 fill-height"
|
||||
class="pa-4 fill-height"
|
||||
style="max-width: 1200px;"
|
||||
>
|
||||
<v-row class="fill-height">
|
||||
<!-- Left Panel - Template Info -->
|
||||
@@ -207,20 +208,20 @@
|
||||
required
|
||||
density="comfortable"
|
||||
ref="fileInputRef"
|
||||
@keydown.enter="selectAndAddFile"
|
||||
/>
|
||||
<v-file-input webkitdirectory directory label="选择文件或文件夹" density="comfortable"></v-file-input>
|
||||
|
||||
<div class="d-flex align-center my-4">
|
||||
<v-btn
|
||||
@click="selectSourceFileOrFolder"
|
||||
variant="outlined"
|
||||
class="mr-2"
|
||||
:disabled="!!currentEditingItem"
|
||||
>
|
||||
选择文件或文件夹
|
||||
</v-btn>
|
||||
</div>
|
||||
<!-- 文件路径选择输入框 -->
|
||||
<v-text-field
|
||||
v-model="selectedSourcePath"
|
||||
label="文件或文件夹"
|
||||
placeholder="点击输入框选择文件或文件夹"
|
||||
readonly
|
||||
:rules="currentEditingItem ? [] : [requiredRule('文件或文件夹')]"
|
||||
:append-inner-icon="isAutoFindMode ? 'mdi-folder' : 'mdi-file'"
|
||||
density="comfortable"
|
||||
class="mt-4"
|
||||
@click="selectSourceFileOrFolder()"
|
||||
/>
|
||||
|
||||
<!-- 选择提示 -->
|
||||
<v-alert
|
||||
@@ -233,14 +234,6 @@
|
||||
<span>选择文件夹则会自动匹配该文件夹下的文件进行复制并且重命名</span>
|
||||
</div>
|
||||
</v-alert>
|
||||
|
||||
<!-- Display selected source -->
|
||||
<div v-if="selectedSourcePath" class="d-flex align-center">
|
||||
<v-icon :color="isAutoFindMode ? 'warning' : 'info'" class="mr-2">
|
||||
{{ isAutoFindMode ? 'mdi-folder' : 'mdi-file' }}
|
||||
</v-icon>
|
||||
<span class="text-truncate">{{ selectedSourcePath }}</span>
|
||||
</div>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
|
||||
Reference in new issue
Block a user