fix
This commit is contained in:
20
src/App.vue
20
src/App.vue
@@ -2,11 +2,29 @@
|
|||||||
<router-view/>
|
<router-view/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style lang="less">
|
||||||
#app {
|
#app {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.ipad{
|
||||||
|
*{
|
||||||
|
-webkit-touch-callout:none;
|
||||||
|
-khtml-user-select:none;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select:none;
|
||||||
|
input,textarea{
|
||||||
|
-webkit-touch-callout:default;
|
||||||
|
-khtml-user-select:auto;
|
||||||
|
-webkit-user-select:auto;
|
||||||
|
-moz-user-select:auto;
|
||||||
|
-ms-user-select: auto;
|
||||||
|
user-select:auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default defineComponent({
|
|||||||
let imageUrlList = (fileList.filter((item:any)=>item.type == 'image').length > 0)? fileList.filter((item:any)=>item.type == 'image').map((item:any)=>item.minioPath).join(',') : ''
|
let imageUrlList = (fileList.filter((item:any)=>item.type == 'image').length > 0)? fileList.filter((item:any)=>item.type == 'image').map((item:any)=>item.minioPath).join(',') : ''
|
||||||
data.chatList.push({content:{message:data.chatContent,think:''},role:'user',fileList:fileList})
|
data.chatList.push({content:{message:data.chatContent,think:''},role:'user',fileList:fileList})
|
||||||
data.chatList.push({content:{message:'',think:''},role:'system'})
|
data.chatList.push({content:{message:'',think:''},role:'system'})
|
||||||
const eventSource = new EventSource(`${process.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=${data.selectObject.id}&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}`);
|
const eventSource = new EventSource(`${import.meta.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=${data.selectObject.id}&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}`);
|
||||||
data.chatContent = ''
|
data.chatContent = ''
|
||||||
dataDom.textarea.value = ''
|
dataDom.textarea.value = ''
|
||||||
data.filList = []
|
data.filList = []
|
||||||
|
|||||||
@@ -275,7 +275,6 @@ import { useI18n } from "vue-i18n";
|
|||||||
import { getMousePosition } from "@/tool/mdEvent";
|
import { getMousePosition } from "@/tool/mdEvent";
|
||||||
import { removeClass } from "element-plus/es/utils";
|
import { removeClass } from "element-plus/es/utils";
|
||||||
import collectionModal from './collection.vue'
|
import collectionModal from './collection.vue'
|
||||||
const FileSaver = require("file-saver");
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "homePage",
|
name: "homePage",
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default defineComponent({
|
|||||||
data.loadingShow = false
|
data.loadingShow = false
|
||||||
})
|
})
|
||||||
// let projectId = ''
|
// let projectId = ''
|
||||||
// const eventSource = new EventSource(`${process.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}&process=${data.selectFlow.value}`);
|
// const eventSource = new EventSource(`${import.meta.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}&process=${data.selectFlow.value}`);
|
||||||
// eventSource.onmessage = function(event) {
|
// eventSource.onmessage = function(event) {
|
||||||
// let eventData = JSON.parse(event.data)
|
// let eventData = JSON.parse(event.data)
|
||||||
// if(eventData.status == "[PROJECT_CREATE_SIGNAL]"){
|
// if(eventData.status == "[PROJECT_CREATE_SIGNAL]"){
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ let flexible = (designWidth, maxWidth,minWidth) =>{
|
|||||||
width = getUniversalZoomLevel() * width
|
width = getUniversalZoomLevel() * width
|
||||||
height = getUniversalZoomLevel() * height
|
height = getUniversalZoomLevel() * height
|
||||||
maxWidth = maxWidth || 1920;
|
maxWidth = maxWidth || 1920;
|
||||||
|
if(width < 1100){
|
||||||
|
document.body.classList.add('ipad')
|
||||||
|
}else{
|
||||||
|
document.body.classList.remove('ipad')
|
||||||
|
}
|
||||||
if(width/height>1.98) width = height * 1.98;
|
if(width/height>1.98) width = height * 1.98;
|
||||||
width > maxWidth && (width = maxWidth);
|
width > maxWidth && (width = maxWidth);
|
||||||
width < minWidth && (width = minWidth);
|
width < minWidth && (width = minWidth);
|
||||||
|
|||||||
@@ -13,19 +13,19 @@ axios.defaults.headers.post["lang"] = "en"; //配置语言请求头
|
|||||||
axios.defaults.withCredentials = true; //跨域携带cookie
|
axios.defaults.withCredentials = true; //跨域携带cookie
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
// if(process.env.NODE_ENV == "development"){
|
// if(import.meta.env.NODE_ENV == "development"){
|
||||||
// axios.defaults.baseURL = ""; //配置接口地址
|
// axios.defaults.baseURL = ""; //配置接口地址
|
||||||
// }else{
|
// }else{
|
||||||
// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
// axios.defaults.baseURL = import.meta.env.VUE_APP_BASE_URL; //配置接口地址
|
||||||
// }
|
// }
|
||||||
// let httpIp
|
// let httpIp
|
||||||
// if(process.env.NODE_ENV == 'development'){
|
// if(import.meta.env.NODE_ENV == 'development'){
|
||||||
// httpIp = 'http://192.168.1.12:10086'
|
// httpIp = 'http://192.168.1.12:10086'
|
||||||
// }else{
|
// }else{
|
||||||
// httpIp = ''
|
// httpIp = ''
|
||||||
// }
|
// }
|
||||||
let httpIp = process.env.NODE_ENV == "development" ? "" : "";
|
let httpIp = import.meta.env.NODE_ENV == "development" ? "" : "";
|
||||||
// let httpIp = process.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
|
// let httpIp = import.meta.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
|
||||||
|
|
||||||
axios.defaults.baseURL = httpIp; //配置接口地址
|
axios.defaults.baseURL = httpIp; //配置接口地址
|
||||||
// console.log(axios.defaults.baseURL);
|
// console.log(axios.defaults.baseURL);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function getUniversalZoomLevel() {
|
|||||||
return window.outerWidth / window.innerWidth;
|
return window.outerWidth / window.innerWidth;
|
||||||
}
|
}
|
||||||
const getUploadUrl = () => {
|
const getUploadUrl = () => {
|
||||||
let url = process.env.VUE_APP_BASE_URL || ''
|
let url = import.meta.env.VUE_APP_BASE_URL || ''
|
||||||
// let url = "http://18.167.251.121:10086"
|
// let url = "http://18.167.251.121:10086"
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user