457
457
</h4 >
458
458
<div class =" dialog-bg" >
459
459
<div class =" flex align-center p-24" >
460
- <div class =" mr-12" >
460
+ <div
461
+ class =" edit-avatar mr-12"
462
+ @mouseenter =" showEditIcon = true"
463
+ @mouseleave =" showEditIcon = false"
464
+ >
461
465
<AppAvatar
462
466
v-if =" isAppIcon(applicationForm?.icon)"
463
467
shape =" square"
473
477
shape =" square"
474
478
:size =" 32"
475
479
/>
480
+ <AppAvatar
481
+ v-if =" showEditIcon"
482
+ shape =" square"
483
+ class =" edit-mask"
484
+ :size =" 32"
485
+ @click =" openEditAvatar"
486
+ >
487
+ <el-icon ><EditPen /></el-icon >
488
+ </AppAvatar >
476
489
</div >
477
-
478
490
<h4 >
479
491
{{
480
492
applicationForm?.name || $t('views.application.applicationForm.form.appName.label')
505
517
@change =" openCreateModel($event)"
506
518
></CreateModelDialog >
507
519
<SelectProviderDialog ref =" selectProviderRef" @change =" openCreateModel($event)" />
520
+ <EditAvatarDialog ref =" EditAvatarDialogRef" @refresh =" refreshIcon" />
508
521
</LayoutContainer >
509
522
</template >
510
523
<script setup lang="ts">
@@ -516,6 +529,8 @@ import ParamSettingDialog from './component/ParamSettingDialog.vue'
516
529
import AddDatasetDialog from ' ./component/AddDatasetDialog.vue'
517
530
import CreateModelDialog from ' @/views/template/component/CreateModelDialog.vue'
518
531
import SelectProviderDialog from ' @/views/template/component/SelectProviderDialog.vue'
532
+
533
+ import EditAvatarDialog from ' @/views/application-overview/component/EditAvatarDialog.vue'
519
534
import applicationApi from ' @/api/application'
520
535
import { isAppIcon } from ' @/utils/application'
521
536
import type { FormInstance , FormRules } from ' element-plus'
@@ -545,6 +560,7 @@ const selectProviderRef = ref<InstanceType<typeof SelectProviderDialog>>()
545
560
546
561
const applicationFormRef = ref <FormInstance >()
547
562
const AddDatasetDialogRef = ref ()
563
+ const EditAvatarDialogRef = ref ()
548
564
549
565
const loading = ref (false )
550
566
const datasetLoading = ref (false )
@@ -596,6 +612,7 @@ const providerOptions = ref<Array<Provider>>([])
596
612
const datasetList = ref ([])
597
613
const sttModelOptions = ref <any >(null )
598
614
const ttsModelOptions = ref <any >(null )
615
+ const showEditIcon = ref (false )
599
616
600
617
const submit = async (formEl : FormInstance | undefined ) => {
601
618
if (! formEl ) return
@@ -730,6 +747,13 @@ function getProvider() {
730
747
})
731
748
}
732
749
750
+ function openEditAvatar() {
751
+ EditAvatarDialogRef .value .open (applicationForm .value )
752
+ }
753
+ function refreshIcon() {
754
+ getDetail ()
755
+ }
756
+
733
757
function refresh() {
734
758
getDataset ()
735
759
}
0 commit comments