| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <div class="chat-list">
- <chatItem
- v-for="(item, index) in chat_list"
- :key="index"
- :dialog="item"
- :type="type"
- :target_agent_icon="target_agent_icon"
- @update="handleUpdate"
- @merge="toMerge"
- @update_outline="toUpdateOutLine"
- @confirm_outline="toConfirmOutLine"
- ></chatItem>
- </div>
- </template>
- <script setup>
- import chatItem from './chatItem.vue';
- const props = defineProps({
- chat_list: {
- type: Array,
- default: () => []
- },
- type: {
- type: String,
- default: 'znwd'
- },
- target_agent_icon: {
- type: String,
- default: 'icon_1'
- }
- });
- const emit = defineEmits(['update', 'merge', 'update_outline', 'confirm_outline']);
- const handleUpdate = (icon) => {
- emit('update', icon);
- };
- const toMerge = (data) => {
- emit('merge', data);
- };
- const toUpdateOutLine = (data) => {
- console.log(data, 111);
- emit('update_outline', data);
- };
- const toConfirmOutLine = (data) => {
- emit('confirm_outline', data);
- };
- </script>
- <style scoped lang="css">
- .chat-list {
- /* margin-top: 80px; */
- width: 100%;
- }
- </style>
|