diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue
index 59cc7750..04e3858c 100644
--- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue
+++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue
@@ -58,11 +58,11 @@
+
+
+ 匹配{{ item.result === 1 ? '成功' : '失败' }}
+
+ -->
@@ -113,7 +113,15 @@
-
+
+
+ 运行
@@ -130,6 +138,7 @@ import { ChartDataMonacoEditor } from '../ChartDataMonacoEditor'
import { useFile } from '../../hooks/useFile.hooks'
import { useTargetData } from '../../../hooks/useTargetData.hook'
import { toString, isArray } from '@/utils'
+import { MonacoEditor } from '@/components/Pages/MonacoEditor'
const { targetData } = useTargetData()
defineProps({
@@ -240,6 +249,21 @@ const initFieldListHandle = () => {
}
}
+// 处理编辑器内容更新
+const handleEditorUpdate = (val: string) => {
+ try {
+ if (!val) return (source.value = '此组件无数据源')
+ source.value = JSON.parse(val)
+ } catch (error) {
+ console.log(error)
+ }
+}
+
+// 监听点击运行按钮的事件
+const handleRun = () => {
+ targetData.value.option.dataset = source.value
+}
+
watch(
() => targetData.value?.option?.dataset,
(