|
@@ -213,13 +213,6 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- const menuOptions = ref([
|
|
|
|
- {
|
|
|
|
- label: 'Upload File',
|
|
|
|
- value: 'Upload File',
|
|
|
|
- },
|
|
|
|
- ]);
|
|
|
|
-
|
|
|
|
const footerClass = computed(() => {
|
|
const footerClass = computed(() => {
|
|
let classes = ['p-4 pt-0'];
|
|
let classes = ['p-4 pt-0'];
|
|
if (isMobile.value) {
|
|
if (isMobile.value) {
|
|
@@ -272,14 +265,6 @@
|
|
:text="item.message"
|
|
:text="item.message"
|
|
@delete="handleDelete(item)"
|
|
@delete="handleDelete(item)"
|
|
/>
|
|
/>
|
|
- <div class="sticky bottom-0 left-0 flex justify-center">
|
|
|
|
- <NButton v-if="loading" type="warning" @click="handleStop">
|
|
|
|
- <template #icon>
|
|
|
|
- <SvgIcon icon="ri:stop-circle-line" />
|
|
|
|
- </template>
|
|
|
|
- Stop Responding
|
|
|
|
- </NButton>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</main>
|
|
@@ -294,27 +279,30 @@
|
|
ref="inputRef"
|
|
ref="inputRef"
|
|
v-model:value="prompt"
|
|
v-model:value="prompt"
|
|
:autosize="{ minRows: 1, maxRows: isMobile ? 1 : 4 }"
|
|
:autosize="{ minRows: 1, maxRows: isMobile ? 1 : 4 }"
|
|
- :placeholder="t('chat.placeholder')"
|
|
|
|
class="!rounded-full px-2 py-1"
|
|
class="!rounded-full px-2 py-1"
|
|
|
|
+ placeholder="今天想聊些什么~"
|
|
size="large"
|
|
size="large"
|
|
type="textarea"
|
|
type="textarea"
|
|
@keypress="handleEnter"
|
|
@keypress="handleEnter"
|
|
>
|
|
>
|
|
- <template #prefix>
|
|
|
|
- <n-popselect :options="menuOptions" placement="top" trigger="click">
|
|
|
|
- <n-button class="!mr-2" size="large" text>
|
|
|
|
- <template #icon>
|
|
|
|
- <SvgIcon icon="ion:attach" />
|
|
|
|
- </template>
|
|
|
|
- </n-button>
|
|
|
|
- </n-popselect>
|
|
|
|
- </template>
|
|
|
|
<template #suffix>
|
|
<template #suffix>
|
|
- <n-button :loading="loading" text @click="handleSubmit">
|
|
|
|
|
|
+ <n-button
|
|
|
|
+ v-if="!loading"
|
|
|
|
+ class="!cursor-pointer"
|
|
|
|
+ size="large"
|
|
|
|
+ text
|
|
|
|
+ @click="handleSubmit"
|
|
|
|
+ >
|
|
<template #icon>
|
|
<template #icon>
|
|
<SvgIcon icon="mdi:sparkles-outline" />
|
|
<SvgIcon icon="mdi:sparkles-outline" />
|
|
</template>
|
|
</template>
|
|
</n-button>
|
|
</n-button>
|
|
|
|
+ <div v-if="loading" class="!cursor-pointer" @click="handleStop">
|
|
|
|
+ <SvgIcon
|
|
|
|
+ class="!text-3xl hover:text-gray-500 !cursor-pointer"
|
|
|
|
+ icon="ri:stop-circle-line"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
</n-input>
|
|
</n-input>
|
|
</div>
|
|
</div>
|