tangjunhao 4 月之前
父节点
当前提交
4efccc2615
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 2 2
      src/views/home.vue
  2. 4 0
      src/views/titlecomponent/MathFunc.vue

+ 2 - 2
src/views/home.vue

@@ -1244,7 +1244,7 @@
           type="textarea"
           placeholder="Please input"
         /> -->
-              <PythonEdit :value="textarea1" language="python" @change="handleEditorChange"/>
+              <PythonEdit v-model="textarea1" language="python" @change="handleEditorChange"/>
               </div>
               <div class="pythfoter">
                 <div class="span active" >
@@ -2663,7 +2663,7 @@ const pythonSubmit = () => {
 
 // python处理编辑器内容变化的方法
 const handleEditorChange = (value) => {
-  console.log('Editor content changed in parent component:', value);
+  // console.log('Editor content changed in parent component:', value);
 };
 
 let MathFuncxinjian = ref('ture')

+ 4 - 0
src/views/titlecomponent/MathFunc.vue

@@ -235,6 +235,10 @@ const getmathfunc = (id,nowid) => {
     wid: wid.value
   };
   request(params).then((res) => {
+    if(res == null){
+      ElMessage.error('MathFunc初始化失败')
+      return
+    }
     if (res.hasOwnProperty("mfcid")) {
       getmathfuncAssign(res);
       emitter.emit("mfcidFromMathFunc", mfcid);