Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chat-query
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
jaden
chat-query
Commits
27ed2d84
Commit
27ed2d84
authored
Jul 05, 2023
by
jaden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix text
parent
5c916b48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
pages/actions/View/chatView.tsx
pages/actions/View/chatView.tsx
+13
-11
No files found.
pages/actions/View/chatView.tsx
View file @
27ed2d84
...
@@ -42,6 +42,17 @@ function Error() {
...
@@ -42,6 +42,17 @@ function Error() {
return
<
code
>
{
error
}
</
code
>;
return
<
code
>
{
error
}
</
code
>;
}
}
const
init
=
`/**
* @description 处理数据的函数
* @param record<string,any> data
*/
function handler(data){
return data
}
`
;
export
function
ChatView
({
export
function
ChatView
({
defaultNode
,
defaultNode
,
props
:
propsRaw
,
props
:
propsRaw
,
...
@@ -206,7 +217,7 @@ export function ChatView({
...
@@ -206,7 +217,7 @@ export function ChatView({
onClick=
{
async
()
=>
{
onClick=
{
async
()
=>
{
const
data
=
await
workerFn
(
const
data
=
await
workerFn
(
propsRaw
,
propsRaw
,
`${editor.getValue()};\n return handler(data);`
`${editor
?
.getValue()};\n return handler(data);`
);
);
console
.
log
(
data
);
console
.
log
(
data
);
setProps
(
data
);
setProps
(
data
);
...
@@ -225,16 +236,7 @@ export function ChatView({
...
@@ -225,16 +236,7 @@ export function ChatView({
}
}
}
}
height=
"300px"
height=
"300px"
defaultLanguage=
"javascript"
defaultLanguage=
"javascript"
defaultValue=
{
`/**
defaultValue=
{
init
}
* @description 处理数据的函数
* @param record<string,any> data
*/
function handler(data){
return data
}
`
}
/>
/>
</
CollapseItem
>
</
CollapseItem
>
</
Collapse
>
</
Collapse
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment