From c97c97c6ab650a6a4eea2092018f242c98fce515 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 22 Nov 2023 17:04:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9B=E5=BB=BA=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/api/type/application.ts | 10 ++ ui/src/components/ai-dialog/index.vue | 43 +++-- ui/src/styles/app.scss | 2 +- ui/src/styles/element-plus.scss | 4 +- .../views/application/CreateApplication.vue | 169 ++++++++++++++++-- ui/src/views/dataset/component/BaseForm.vue | 8 +- .../dataset/component/UploadComponent.vue | 8 +- ui/src/views/dataset/step/StepSecond.vue | 13 +- .../paragraph/component/ParagraphForm.vue | 9 +- .../setting/component/CreateMemberDialog.vue | 1 + 10 files changed, 221 insertions(+), 46 deletions(-) create mode 100644 ui/src/api/type/application.ts diff --git a/ui/src/api/type/application.ts b/ui/src/api/type/application.ts new file mode 100644 index 000000000..ff4f7b8e0 --- /dev/null +++ b/ui/src/api/type/application.ts @@ -0,0 +1,10 @@ +interface ApplicationFormType { + name: string + desc: string + model_id: string + multiple_rounds_dialogue: boolean + prologue: string + example: string[] + dataset_id_list: string[] +} +export type { ApplicationFormType } diff --git a/ui/src/components/ai-dialog/index.vue b/ui/src/components/ai-dialog/index.vue index f1c38dff7..03b587719 100644 --- a/ui/src/components/ai-dialog/index.vue +++ b/ui/src/components/ai-dialog/index.vue @@ -15,31 +15,23 @@

您好,我是 MaxKB 智能小助手

-
- 回答用户提出的 MaxKB 产品使用问题 +
+ {{ data?.prologue }}

您可以尝试输入以下问题:

-
- - DataEase支持哪些类型的数据源?XXXXXXXXXXX -
- -
DataEase支持哪些类型的数据源?XXXXXXXXXXX
-
+ +
+ + DataEase支持哪些类型的数据源? +
+
+ + DataEase支持哪些类型的数据源?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +
+
- -
@@ -87,8 +79,8 @@ import { ref } from 'vue' const props = defineProps({ data: { - type: Array, - default: () => [] + type: Object, + default: () => {} } }) const inputValue = ref('') @@ -122,7 +114,12 @@ const inputValue = ref('') border-radius: 8px; background: var(--app-layout-bg-color); height: 46px; - justify-content: left; + padding: 0 12px; + line-height: 46px; + box-sizing: border-box; + color: var(--el-text-color-regular); + -webkit-line-clamp: 1; + word-break: break-all; &:hover { background: var(--el-color-primary-light-9); } diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index 34909148e..27bb8856c 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -214,7 +214,7 @@ h4 { .ellipsis-1 { display: inline-block; - max-width: 100px; + max-width: 130px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index 9f05a554f..a554b543a 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -172,8 +172,10 @@ } .input-with-select { - .el-input-group__prepend { background-color: var(--el-fill-color-blank); } } +.el-textarea__inner { + font-size: 13px; +} diff --git a/ui/src/views/application/CreateApplication.vue b/ui/src/views/application/CreateApplication.vue index 3dfd92334..749f2dc0f 100644 --- a/ui/src/views/application/CreateApplication.vue +++ b/ui/src/views/application/CreateApplication.vue @@ -1,13 +1,127 @@