SettingMenuScreen.vue
1 <script setup lang="tsx"> 2 // import { computed } from 'vue'; 3 import { useChatbotStore } from '@/renderer/store/chatbot' 4 5 const chatbotStore = useChatbotStore() 6 7 import LogoAvatar from '@/renderer/components/common/LogoAvatar.vue' 8 </script> 9 10 <template> 11 <v-list v-model:selected="chatbotStore.currentChatbotId" nav mandatory> 12 <v-list-item 13 v-for="(item, index) in chatbotStore.chatbots" 14 :key="index" 15 slim 16 :value="index" 17 link 18 :ripple="false" 19 :title="item.name" 20 > 21 <template #prepend> 22 <LogoAvatar :item="item"></LogoAvatar> 23 </template> 24 <template #append> 25 <v-list-item-action> 26 <v-icon-btn 27 class="mr-1" 28 color="error" 29 variant="plain" 30 icon="mdi-delete-outline" 31 rounded="lg" 32 size="small" 33 @click="chatbotStore.removeChatbot(index)" 34 > 35 </v-icon-btn> 36 </v-list-item-action> 37 </template> 38 </v-list-item> 39 </v-list> 40 </template> 41 42 <style scoped></style>