|
27 | 27 | @finish="handleSubmit" |
28 | 28 | layout="vertical"> |
29 | 29 | <a-form-item name="name" ref="name"> |
30 | | - <template #label :title="apiParams.name.description"> |
31 | | - {{ $t('label.name') }} |
32 | | - <a-tooltip> |
33 | | - <info-circle-outlined style="color: rgba(0,0,0,.45)" /> |
34 | | - </a-tooltip> |
| 30 | + <template #label> |
| 31 | + <tooltip-label :title="$t('label.name')" :tooltip="apiParams.name.description"/> |
35 | 32 | </template> |
36 | 33 | <a-input |
37 | 34 | v-model:value="form.name" |
38 | 35 | :placeholder="apiParams.name.description" |
39 | 36 | v-focus="true" /> |
40 | 37 | </a-form-item> |
41 | 38 | <a-form-item name="publickey" ref="publickey"> |
42 | | - <template #label :title="apiParams.publickey.description"> |
43 | | - {{ $t('label.publickey') }} |
44 | | - <a-tooltip> |
45 | | - <info-circle-outlined style="color: rgba(0,0,0,.45)" /> |
46 | | - </a-tooltip> |
| 39 | + <template #label> |
| 40 | + <tooltip-label :title="$t('label.publickey')" :tooltip="apiParams.publickey.description"/> |
47 | 41 | </template> |
48 | 42 | <a-input |
49 | 43 | v-model:value="form.publickey" |
50 | 44 | :placeholder="apiParams.publickey.description"/> |
51 | 45 | </a-form-item> |
52 | 46 | <a-form-item name="domainid" ref="domainid" v-if="isAdminOrDomainAdmin()"> |
53 | | - <template #label :title="apiParams.domainid.description"> |
54 | | - {{ $t('label.domainid') }} |
55 | | - <a-tooltip> |
56 | | - <info-circle-outlined style="color: rgba(0,0,0,.45)" /> |
57 | | - </a-tooltip> |
| 47 | + <template #label> |
| 48 | + <tooltip-label :title="$t('label.domainid')" :tooltip="apiParams.domainid.description"/> |
58 | 49 | </template> |
59 | 50 | <a-select |
60 | 51 | id="domain-selection" |
|
105 | 96 | import { ref, reactive, toRaw } from 'vue' |
106 | 97 | import { api } from '@/api' |
107 | 98 | import { mixinForm } from '@/utils/mixin' |
| 99 | +import TooltipLabel from '@/components/widgets/TooltipLabel' |
108 | 100 |
|
109 | 101 | export default { |
110 | 102 | name: 'CreateSSHKeyPair', |
111 | 103 | mixins: [mixinForm], |
112 | 104 | props: {}, |
| 105 | + components: { |
| 106 | + TooltipLabel |
| 107 | + }, |
113 | 108 | data () { |
114 | 109 | return { |
115 | 110 | domains: [], |
|
0 commit comments