110110 </a-button-group >
111111
112112 <a-button-group v-else-if =" task.status === 'completed'" >
113- <a-button size =" small" type =" primary" @click =" $emit('export', task.id)" >
114- <template #icon >
115- <icon-download />
113+ <a-dropdown @select =" handleExportSelect" >
114+ <a-button size =" small" type =" primary" >
115+ <template #icon >
116+ <icon-download />
117+ </template >
118+ 导出
119+ <icon-down />
120+ </a-button >
121+ <template #content >
122+ <a-doption value =" download" >
123+ <template #icon >
124+ <icon-download />
125+ </template >
126+ 下载TXT文件
127+ </a-doption >
128+ <a-doption value =" gallery" >
129+ <template #icon >
130+ <icon-book />
131+ </template >
132+ 导出到书画柜
133+ </a-doption >
116134 </template >
117- 导出TXT
118- </a-button >
135+ </a-dropdown >
119136 <a-button size =" small" @click =" $emit('delete', task.id)" >
120137 <template #icon >
121138 <icon-delete />
@@ -164,7 +181,8 @@ import {
164181 IconList ,
165182 IconDown ,
166183 IconUp ,
167- IconExclamationCircleFill
184+ IconExclamationCircleFill ,
185+ IconBook
168186} from ' @arco-design/web-vue/es/icon'
169187
170188// Props
@@ -176,7 +194,7 @@ const props = defineProps({
176194})
177195
178196// Emits
179- defineEmits ([
197+ const emit = defineEmits ([
180198 ' retry' ,
181199 ' pause' ,
182200 ' resume' ,
@@ -240,6 +258,15 @@ const toggleDetails = () => {
240258 showDetails .value = ! showDetails .value
241259}
242260
261+ // 处理导出选择
262+ const handleExportSelect = (value ) => {
263+ if (value === ' download' ) {
264+ emit (' export' , props .task .id , { exportToGallery: false })
265+ } else if (value === ' gallery' ) {
266+ emit (' export' , props .task .id , { exportToGallery: true })
267+ }
268+ }
269+
243270const formatTime = (timestamp ) => {
244271 if (! timestamp) return ' -'
245272 return new Date (timestamp).toLocaleString (' zh-CN' )
0 commit comments