项目启动
This commit is contained in:
@@ -204,7 +204,9 @@
|
||||
|
||||
<script setup lang="uts">
|
||||
// 消息操作
|
||||
// #ifdef APP
|
||||
import { setClipboardData, getClipboardData, SetClipboardDataOption, GetClipboardDataOption, GetClipboardDataSuccessCallbackOption } from '@/uni_modules/lime-clipboard'
|
||||
// #endif
|
||||
import supa from '@/components/supadb/aksupainstance.uts'
|
||||
import { requestCanvasCompletion } from '@/components/supadb/rag.uts'
|
||||
import { RagReq } from '@/uni_modules/rag-req/rag-req.uts'
|
||||
@@ -365,6 +367,7 @@
|
||||
const copyMessage = async (message : ChatMessageData) => {
|
||||
const content = message.content
|
||||
try {
|
||||
// #ifdef APP
|
||||
setClipboardData({
|
||||
data: content,
|
||||
success(res) {
|
||||
@@ -375,8 +378,18 @@
|
||||
})
|
||||
}
|
||||
} as SetClipboardDataOption)
|
||||
|
||||
|
||||
// #endif
|
||||
// #ifndef APP
|
||||
uni.setClipboardData({
|
||||
data: content,
|
||||
success: () => {
|
||||
uni.showToast({ title: '已复制到剪贴板', icon: 'success' })
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({ title: '复制失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
} catch (error) {
|
||||
console.error('复制失败:', error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user