Upgrade to openai style for aichat (#46)
This commit is contained in:
1 parent
3918446e7a
commit
7869cc0acd
14 files changed
+431
-220
No files matched your search
@@ -1,67 +1,13 @@
|
||||
<template>
|
||||
<div class="introduction">
|
||||
<el-row class="introduction-items" justify="center" :gutter="15">
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-regular fa-sun" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('chat.title.complexQuestion') }}</h3>
|
||||
<el-row class="items" justify="center" :gutter="15">
|
||||
<el-col v-for="(item, itemKey) in items" :key="itemKey" :md="6" :sm="12" :xs="24">
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question1')"
|
||||
:content="item.content"
|
||||
:icon="item.icon"
|
||||
:color="item.color"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question1'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question2')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question2'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question3')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question3'))"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-solid fa-book" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('chat.title.professionalQuestion') }}</h3>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question4')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question4'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question5')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question5'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question6')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question6'))"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-solid fa-fire" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('chat.title.getTips') }}</h3>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question7')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question7'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question8')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question8'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question9')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question9'))"
|
||||
@click="$emit('draft', item.content)"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -70,21 +16,42 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import IntroductionItem from './IntroductionItem.vue';
|
||||
import { ElRow, ElCol } from 'element-plus';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConversationIntroduction',
|
||||
components: {
|
||||
FontAwesomeIcon,
|
||||
IntroductionItem,
|
||||
ElRow,
|
||||
ElCol
|
||||
},
|
||||
emits: ['draft'],
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
icon: 'fa-solid fa-pen-nib',
|
||||
content: this.$t('chat.message.question1'),
|
||||
color: 'rgb(226, 197, 65)'
|
||||
},
|
||||
{
|
||||
icon: 'fa-solid fa-laptop-code',
|
||||
content: this.$t('chat.message.question2'),
|
||||
color: 'rgb(203, 139, 208)'
|
||||
},
|
||||
{
|
||||
icon: 'fa-solid fa-fan',
|
||||
content: this.$t('chat.message.question3'),
|
||||
color: 'rgb(118, 208, 235)'
|
||||
},
|
||||
{
|
||||
icon: 'fa-solid fa-plane-departure',
|
||||
content: this.$t('chat.message.question4'),
|
||||
color: 'rgb(237, 98, 98)'
|
||||
}
|
||||
].sort(() => Math.random() - 0.5)
|
||||
};
|
||||
},
|
||||
computed: {}
|
||||
});
|
||||
@@ -92,34 +59,16 @@ export default defineComponent({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.introduction {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
padding: 30px 0;
|
||||
padding: 60px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.title {
|
||||
height: 70px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.introduction-items {
|
||||
height: fit-content;
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.introduction-item {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.items {
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,9 +80,6 @@ export default defineComponent({
|
||||
transform: initial;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
.introduction-items {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user