Merge branch 'main' of github.com:1Panel-dev/MaxKB

This commit is contained in:
shaohuzhang1 2024-04-15 16:02:25 +08:00
commit 117863ed4c
11 changed files with 16 additions and 32 deletions

1
.gitignore vendored
View File

@ -180,3 +180,4 @@ apps/static
models/
data
.dev
poetry.lock

View File

@ -27,7 +27,7 @@ class FunctionField(serializers.Field):
def to_internal_value(self, data):
if not callable(data):
self.fail('不是一函數', value=data)
self.fail('不是一函數', value=data)
return data
def to_representation(self, value):

View File

@ -6,8 +6,8 @@ EMAIL_HOST: ${EMAIL_HOST}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
#
# # 数据库链接信息
# 数据库链接信息
DB_NAME: maxkb
DB_HOST: 127.0.0.1
DB_PORT: 5432

View File

@ -18,7 +18,7 @@ django.setup()
def collect_static():
"""
收集静态文件到指定目录
本项目主要是将前端vue/dist的前项目放到静态目录下面
本项目主要是将前端vue/dist的前项目放到静态目录下面
:return:
"""
logging.info("Collect static files")

View File

@ -35,7 +35,7 @@
import { ref } from 'vue'
import useStore from '@/stores'
import { useRouter } from 'vue-router'
import ResetPassword from './ResetPasssword.vue'
import ResetPassword from './ResetPassword.vue'
import AboutDialog from './AboutDialog.vue'
const { user } = useStore()
const router = useRouter()

View File

@ -332,8 +332,8 @@ h4 {
/* tag */
.default-tag {
background: var(--tag-deflaut-bg);
color: var(--tag-deflaut-color);
background: var(--tag-default-bg);
color: var(--tag-default-color);
border: none;
}
.success-tag {

View File

@ -24,8 +24,8 @@
--sidebar-bg-color: #ffffff;
--sidebar-width: 240px;
/** tag */
--tag-deflaut-bg: rgba(51, 112, 255, 0.2);
--tag-deflaut-color: #2b5fd9;
--tag-default-bg: rgba(51, 112, 255, 0.2);
--tag-default-color: #2b5fd9;
--tag-success-bg: rgba(52, 199, 36, 0.2);
--tag-success-color: #2ca91f;
--tag-warning-bg: rgba(255, 136, 0, 0.2);

View File

@ -40,26 +40,26 @@ export const MsgError = (message: string) => {
/**
*
* @param message: {title, decription,type}
* @param message: {title, description,type}
*/
export const MsgConfirm = (title: string, decription: string, options?: any) => {
export const MsgConfirm = (title: string, description: string, options?: any) => {
const defaultOptions: Object = {
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
...options
}
return ElMessageBox.confirm(decription, title, defaultOptions)
return ElMessageBox.confirm(description, title, defaultOptions)
}
// export const MsgConfirm = ({ title, decription }: any, options?: any) => {
// export const MsgConfirm = ({ title, description }: any, options?: any) => {
// const message: any = h('div', { class: 'app-confirm' }, [
// h('h4', { class: 'app-confirm-title flex align-center' }, [
// h(ElIcon, { class: 'icon' }, [h(WarningFilled)]),
// h('span', { class: 'ml-16' }, title)
// ]),
// h('div', { class: 'app-confirm-decription mt-8' }, decription)
// h('div', { class: 'app-confirm-description mt-8' }, description)
// ])
// const defaultOptions: Object = {

View File

@ -3,23 +3,6 @@
<template #backButton>
<back-button @click="back"></back-button>
</template>
<!-- <template #header>
<el-steps :active="active" finish-status="success" align-center class="create-dataset__steps">
<el-step v-for="(item, index) in steps" :key="index">
<template #icon>
<div class="app-step flex align-center">
<div class="el-step__icon is-text">
<div class="el-step__icon-inner">
<el-icon v-if="active == index + 1" style="margin-top: 1px"><Select /></el-icon>
<span v-else> {{ index + 1 }}</span>
</div>
</div>
<span class="ml-4">{{ item.name }}</span>
</div>
</template>
</el-step>
</el-steps>
</template> -->
<div class="create-dataset__main flex" v-loading="loading">
<div class="create-dataset__component main-calc-height">
<template v-if="active === 0">

View File

@ -172,7 +172,7 @@ function getDocument() {
cloneDocumentList.value = res.data
documentList.value = res.data
currentDocument.value = cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
getParagraphList(currentDocument.value)
currentDocument.value && getParagraphList(currentDocument.value)
})
}