|
36 | 36 | <AppIcon class="color-secondary" iconName="app-video-play"></AppIcon> |
37 | 37 | </el-button> |
38 | 38 | </el-tooltip> |
39 | | - |
40 | | - <el-divider direction="vertical" /> |
41 | 39 | </span> |
42 | 40 | <span v-if="type == 'ai-chat' || type == 'log'"> |
43 | | - <el-tooltip effect="dark" :content="$t('common.copy')" placement="top"> |
44 | | - <el-button text @click="copy(data)"> |
45 | | - <AppIcon class="color-secondary" iconName="app-copy"></AppIcon> |
46 | | - </el-button> |
47 | | - </el-tooltip> |
48 | | - <el-divider direction="vertical" /> |
49 | | - <el-tooltip effect="dark" :content="$t('chat.operation.regeneration')" placement="top"> |
50 | | - <el-button :disabled="chat_loading" text @click="regeneration"> |
51 | | - <AppIcon iconName="app-refresh" class="color-secondary"></AppIcon> |
52 | | - </el-button> |
53 | | - </el-tooltip> |
54 | | - <el-divider direction="vertical" /> |
55 | | - |
56 | | - <el-tooltip |
57 | | - v-if="buttonData?.vote_status === '-1' && mode === 'mobile'" |
58 | | - effect="dark" |
59 | | - :content="$t('chat.operation.like')" |
60 | | - placement="top" |
61 | | - > |
62 | | - <el-button text :disabled="loading" @click="mobileVoteReasonHandler('0')"> |
63 | | - <AppIcon class="color-secondary" iconName="app-like"></AppIcon> |
64 | | - </el-button> |
65 | | - </el-tooltip> |
| 41 | + <span class="ml-8"> |
| 42 | + <el-tooltip effect="dark" :content="$t('common.copy')" placement="top"> |
| 43 | + <el-button text @click="copy(data)"> |
| 44 | + <AppIcon class="color-secondary" iconName="app-copy"></AppIcon> |
| 45 | + </el-button> |
| 46 | + </el-tooltip> |
| 47 | + </span> |
| 48 | + <span class="ml-8"> |
| 49 | + <el-tooltip effect="dark" :content="$t('chat.operation.regeneration')" placement="top"> |
| 50 | + <el-button :disabled="chat_loading" text @click="regeneration"> |
| 51 | + <AppIcon iconName="app-refresh" class="color-secondary"></AppIcon> |
| 52 | + </el-button> |
| 53 | + </el-tooltip> |
| 54 | + </span> |
| 55 | + <span class="ml-8" v-if="buttonData?.vote_status === '-1' && mode === 'mobile'"> |
| 56 | + <el-tooltip effect="dark" :content="$t('chat.operation.like')" placement="top"> |
| 57 | + <el-button text :disabled="loading" @click="mobileVoteReasonHandler('0')"> |
| 58 | + <AppIcon class="color-secondary" iconName="app-like"></AppIcon> |
| 59 | + </el-button> |
| 60 | + </el-tooltip> |
| 61 | + </span> |
66 | 62 |
|
67 | 63 | <el-popover |
68 | 64 | ref="likePopoverRef" |
|
74 | 70 | v-if="buttonData?.vote_status === '-1' && mode !== 'mobile'" |
75 | 71 | > |
76 | 72 | <template #reference> |
77 | | - <span> |
| 73 | + <span class="ml-8"> |
78 | 74 | <el-tooltip effect="dark" :content="$t('chat.operation.like')" placement="top"> |
79 | 75 | <el-button text :disabled="loading"> |
80 | 76 | <AppIcon class="color-secondary" iconName="app-like"></AppIcon> |
|
91 | 87 | > |
92 | 88 | </VoteReasonContent> |
93 | 89 | </el-popover> |
| 90 | + <span v-if="buttonData?.vote_status === '0'" class="ml-8"> |
| 91 | + <el-tooltip effect="dark" :content="$t('chat.operation.cancelLike')" placement="top"> |
| 92 | + <el-button text @click="cancelVoteHandle('-1')" :disabled="loading"> |
| 93 | + <AppIcon class="color-secondary" iconName="app-like-color"></AppIcon> |
| 94 | + </el-button> |
| 95 | + </el-tooltip> |
| 96 | + </span> |
| 97 | + <span v-if="buttonData?.vote_status === '-1' && mode === 'mobile'" class="ml-8"> |
| 98 | + <el-tooltip effect="dark" :content="$t('chat.operation.oppose')" placement="top"> |
| 99 | + <el-button text :disabled="loading" @click="mobileVoteReasonHandler('1')"> |
| 100 | + <AppIcon class="color-secondary" iconName="app-oppose"></AppIcon> |
| 101 | + </el-button> |
| 102 | + </el-tooltip> |
| 103 | + </span> |
94 | 104 |
|
95 | | - <el-tooltip |
96 | | - effect="dark" |
97 | | - :content="$t('chat.operation.cancelLike')" |
98 | | - placement="top" |
99 | | - v-if="buttonData?.vote_status === '0'" |
100 | | - > |
101 | | - <el-button text @click="cancelVoteHandle('-1')" :disabled="loading"> |
102 | | - <AppIcon class="color-secondary" iconName="app-like-color"></AppIcon> |
103 | | - </el-button> |
104 | | - </el-tooltip> |
105 | | - <el-divider direction="vertical" v-if="buttonData?.vote_status === '-1'" /> |
106 | | - <el-tooltip |
107 | | - v-if="buttonData?.vote_status === '-1' && mode === 'mobile'" |
108 | | - effect="dark" |
109 | | - :content="$t('chat.operation.oppose')" |
110 | | - placement="top" |
111 | | - > |
112 | | - <el-button text :disabled="loading" @click="mobileVoteReasonHandler('1')"> |
113 | | - <AppIcon class="color-secondary" iconName="app-oppose"></AppIcon> |
114 | | - </el-button> |
115 | | - </el-tooltip> |
116 | 105 | <el-popover |
117 | 106 | ref="opposePopoverRef" |
118 | 107 | trigger="click" |
|
123 | 112 | v-if="buttonData?.vote_status === '-1' && mode !== 'mobile'" |
124 | 113 | > |
125 | 114 | <template #reference> |
126 | | - <span> |
| 115 | + <span class="ml-8"> |
127 | 116 | <el-tooltip effect="dark" :content="$t('chat.operation.oppose')" placement="top"> |
128 | 117 | <el-button text :disabled="loading"> |
129 | 118 | <AppIcon class="color-secondary" iconName="app-oppose"></AppIcon> |
|
140 | 129 | > |
141 | 130 | </VoteReasonContent> |
142 | 131 | </el-popover> |
143 | | - <el-tooltip |
144 | | - effect="dark" |
145 | | - :content="$t('chat.operation.cancelOppose')" |
146 | | - placement="top" |
147 | | - v-if="buttonData?.vote_status === '1'" |
148 | | - > |
149 | | - <el-button text @click="cancelVoteHandle('-1')" :disabled="loading"> |
150 | | - <AppIcon class="color-secondary" iconName="app-oppose-color"></AppIcon> |
151 | | - </el-button> |
152 | | - </el-tooltip> |
| 132 | + <span class="ml-8" v-if="buttonData?.vote_status === '1'"> |
| 133 | + <el-tooltip effect="dark" :content="$t('chat.operation.cancelOppose')" placement="top"> |
| 134 | + <el-button text @click="cancelVoteHandle('-1')" :disabled="loading"> |
| 135 | + <AppIcon class="color-secondary" iconName="app-oppose-color"></AppIcon> |
| 136 | + </el-button> |
| 137 | + </el-tooltip> |
| 138 | + </span> |
| 139 | + <span class="ml-8"> |
| 140 | + <el-tooltip effect="dark" :content="$t('chat.share')" placement="top"> |
| 141 | + <el-button text @click.stop="clickShareHandle(props.data.record_id)"> |
| 142 | + <AppIcon class="color-secondary" iconName="app-share"></AppIcon> |
| 143 | + </el-button> |
| 144 | + </el-tooltip> |
| 145 | + </span> |
153 | 146 | </span> |
154 | 147 | <div ref="audioCiontainer"></div> |
155 | 148 | </div> |
@@ -196,7 +189,11 @@ const props = withDefaults( |
196 | 189 | }, |
197 | 190 | ) |
198 | 191 |
|
199 | | -const emit = defineEmits(['update:data', 'regeneration']) |
| 192 | +const emit = defineEmits(['update:data', 'regeneration', 'clickShare']) |
| 193 | +
|
| 194 | +const clickShareHandle = (id: string) => { |
| 195 | + bus.emit('click:share', id) |
| 196 | +} |
200 | 197 |
|
201 | 198 | const copy = (data: any) => { |
202 | 199 | try { |
|
0 commit comments