| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <div :class="item_klass" @click="handleClick">
- <div class="history-item-icon can-loadmore" v-if="can_loadmore">{{ $t('conversation.history_loadmore') }}</div>
- <!-- <div class="history-item-icon" v-if="!can_loadmore">{{ $t('conversation.history_nomore') }}</div> -->
- </div>
- </template>
- <script setup>
- import { computed } from 'vue';
- const props = defineProps({
- can_loadmore: Boolean
- });
- const emit = defineEmits(['loadmore']);
- const item_klass = computed(() => {
- const obj = {
- 'conversation-history-item': true
- };
- obj['load-more'] = true;
- return obj;
- });
- /**
- * 点击事件
- * 分发ID值
- */
- const handleClick = () => {
- if (!props.can_loadmore) {
- return;
- }
- emit('loadmore');
- };
- </script>
- <style lang="css" scoped>
- .history-item-icon {
- background-color: var(--color-bg-1);
- padding: 20px 30px 20px 30px;
- border-radius: 15px;
- margin-top: 10px;
- margin-bottom: 10px;
- color: var(--color-text-1);
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 13px;
- }
- .history-item-icon.can-loadmore {
- cursor: pointer;
- }
- </style>
|