|
9 | 9 | <el-radio-group v-model="radioType" class="radio-block mb-16"> |
10 | 10 | <el-radio value="default"> |
11 | 11 | <p>{{ $t('common.EditAvatarDialog.default') }}</p> |
12 | | - <el-avatar class="avatar-green" shape="square" :size="32"> |
13 | | - <img src="@/assets/workflow/icon_tool.svg" style="width: 58%" alt="" /> |
14 | | - </el-avatar> |
| 12 | + <ToolIcon :size="32" :type="iconType" /> |
15 | 13 | </el-radio> |
16 | 14 |
|
17 | 15 | <el-radio value="custom"> |
|
55 | 53 | </el-dialog> |
56 | 54 | </template> |
57 | 55 | <script setup lang="ts"> |
58 | | -import {computed, ref, watch} from 'vue' |
59 | | -import ToolApi from '@/api/tool/tool' |
| 56 | +import { computed, ref, watch } from 'vue' |
60 | 57 | import { cloneDeep } from 'lodash' |
61 | 58 | import { MsgError, MsgSuccess } from '@/utils/message' |
62 | | -import { defaultIcon, isAppIcon } from '@/utils/common' |
| 59 | +import { isAppIcon } from '@/utils/common' |
63 | 60 | import { t } from '@/locales' |
64 | | -import {loadSharedApi} from "@/utils/dynamics-api/shared-api.ts"; |
65 | | -import {useRoute} from "vue-router"; |
| 61 | +import { loadSharedApi } from '@/utils/dynamics-api/shared-api.ts' |
| 62 | +import { useRoute } from 'vue-router' |
66 | 63 |
|
| 64 | +const props = defineProps<{ |
| 65 | + iconType?: string |
| 66 | +}>() |
67 | 67 | const emit = defineEmits(['refresh']) |
68 | 68 | const route = useRoute() |
69 | 69 |
|
@@ -122,7 +122,8 @@ function submit() { |
122 | 122 | const fd = new FormData() |
123 | 123 | fd.append('file', iconFile.value.raw) |
124 | 124 | loadSharedApi({ type: 'tool', systemType: apiType.value }) |
125 | | - .putToolIcon(detail.value.id, fd, loading).then((res: any) => { |
| 125 | + .putToolIcon(detail.value.id, fd, loading) |
| 126 | + .then((res: any) => { |
126 | 127 | emit('refresh', res.data) |
127 | 128 | dialogVisible.value = false |
128 | 129 | }) |
|
0 commit comments