fix: build

This commit is contained in:
wangdan-fit2cloud 2025-07-01 20:30:43 +08:00
parent 10eac10404
commit 1f8cffb189
11 changed files with 21 additions and 22 deletions

1
ui/env.d.ts vendored
View File

@ -1,4 +1,5 @@
/// <reference types="vite/client" />
declare module 'katex'
interface Window {
sendMessage: ?((message: string, other_params_data: any) => void)
MaxKB: {

View File

@ -31,8 +31,8 @@
"echarts": "^5.6.0",
"element-plus": "^2.9.10",
"file-saver": "^2.0.5",
"katex": "^0.16.10",
"highlight.js": "^11.11.1",
"katex": "^0.16.22",
"md-editor-v3": "^5.6.1",
"mermaid": "^11.6.0",
"moment": "^2.30.1",
@ -54,6 +54,7 @@
},
"devDependencies": {
"@tsconfig/node22": "^22.0.1",
"@types/file-saver": "^2.0.7",
"@types/node": "^22.14.0",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.2.3",

View File

@ -262,7 +262,7 @@ const playDemoText: (application_id: string, data: any, loading?: Ref<boolean>)
/**
*
*/
const textToSpeech: (
const postTextToSpeech: (
application_id: String,
data: any,
loading?: Ref<boolean>,
@ -318,7 +318,7 @@ export default {
publish,
updatePlatformConfig,
playDemoText,
textToSpeech,
postTextToSpeech,
speechToText,
getMcpTools,
}

View File

@ -704,7 +704,7 @@ const getSpeechToTextAPI = () => {
return chatAPI.speechToText(data, loading)
}
} else {
return applicationApi.textToSpeech
return applicationApi.postTextToSpeech
}
}
const speechToTextAPI = getSpeechToTextAPI()

View File

@ -268,7 +268,7 @@ const getTextToSpeechAPI = () => {
return chatAPI.textToSpeech(data, loading)
}
} else {
return applicationApi.textToSpeech
return applicationApi.postTextToSpeech
}
}
const textToSpeechAPI = getTextToSpeechAPI()

View File

@ -28,7 +28,7 @@ const {
} = route as any
const isShared = computed(() => {
return folderId === 'shared' || route.name?.includes('ResourceManagement')
return folderId === 'shared'
})
const { theme } = useStore()
const isDefaultTheme = computed(() => {

View File

@ -122,11 +122,12 @@ function submit() {
} else if (radioType.value === 'custom' && iconFile.value) {
const fd = new FormData()
fd.append('file', iconFile.value.raw)
overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => {
emit('refresh')
MsgSuccess(t('common.saveSuccess'))
dialogVisible.value = false
})
// todo
// overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => {
// emit('refresh')
// MsgSuccess(t('common.saveSuccess'))
// dialogVisible.value = false
// })
} else {
MsgError(t('common.EditAvatarDialog.uploadImagePrompt'))
}

View File

@ -176,7 +176,7 @@ watch(dialogVisible, (bool) => {
}
})
watch(
() => form.authentication,
() => form.value.authentication,
(b) => {
if (b) {
applicationApi.getChatUserAuthType().then((ok) => {

View File

@ -10,19 +10,15 @@
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import useStore from '@/stores'
import { t } from '@/locales'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const FormRef = ref()
const { chatUser } = useStore()
const props = defineProps<{ applicationProfile: any; modelValue: boolean }>()
const loading = ref<boolean>(false)
const router = useRouter()
const emit = defineEmits(['update:modelValue'])
const auth = () => {
return chatUser.passwordAuthentication(form.value.password).then((ok) => {
router.push({ name: 'chat', params: { accessToken: chatUser.accessToken } })

View File

@ -1,7 +1,7 @@
<template>
<div>
<el-form ref="FormRef" :model="form" @submit.prevent="validator">
<el-form-item prop="value" :rules="rules.value">
<el-form-item prop="value" :rules="rules">
<el-input show-password v-model="form.value" />
</el-form-item>
<el-button class="w-full mt-8" type="primary" @click="validator" :loading="loading">
@ -11,7 +11,7 @@
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ref, reactive } from 'vue'
import { useRoute } from 'vue-router'
import useStore from '@/stores'
import { t } from '@/locales'
@ -38,9 +38,9 @@ const validator = () => {
FormRef.value.validate()
}
const rules = {
const rules = reactive({
value: [{ required: true, validator: validator_auth, trigger: 'manual' }],
}
})
const form = ref({
type: 'password',

View File

@ -36,8 +36,8 @@ export default defineConfig((conf: any) => {
const ENV = loadEnv(mode, envDir)
const proxyConf: Record<string, string | ProxyOptions> = {}
proxyConf['/admin/api'] = {
// target: 'http://47.92.195.88:8080/',
target: 'http://127.0.0.1:8080',
target: 'http://47.92.195.88:8080/',
// target: 'http://127.0.0.1:8080',
changeOrigin: true,
}
proxyConf['/oss'] = {