File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,12 +44,13 @@ export default {
4444
4545 setup (props ) {
4646 const store = useCommandStore ();
47-
47+ const route = useRoute ();
48+ let lang = route .params .lang ;
4849 var id = new Date ().valueOf ();
4950 id = " editorArea" + id;
5051 const { resultTestChanged } = storeToRefs (store);
5152
52- return { store, id, resultTestChanged };
53+ return { store, id, resultTestChanged, lang };
5354 },
5455 data () {
5556 return {
@@ -72,8 +73,10 @@ export default {
7273 this .store .updateCommand (this .editor .getValue ());
7374 },
7475 async testCode () {
75- await this .store .updateCommand (this .editor .getValue ());
76- await this .store .updateCommandTest (this .test .split (" \n " ), this .id );
76+ if (this .lang == " r" ) {
77+ await this .store .updateCommand (this .editor .getValue ());
78+ await this .store .updateCommandTest (this .test .split (" \n " ), this .id );
79+ }
7780 },
7881 },
7982 watch: {
You can’t perform that action at this time.
0 commit comments