Commit 690210fd authored by 张媛's avatar 张媛

修复代码格式问题

parent fc2a4d9f
import React from 'react'; import React from 'react';
import { UnControlled as CodeMirror } from 'react-codemirror2'; import { UnControlled as CodeMirror } from 'react-codemirror2';
const jsBeautify = require("js-beautify").html; const jsBeautify = require("js-beautify").html;
......
...@@ -10,7 +10,8 @@ interface Props { ...@@ -10,7 +10,8 @@ interface Props {
const CodePanel =(args:Props) => { const CodePanel =(args:Props) => {
return( return(
<div className = "code"> <div className = "code">
<CodeMirror value={args.code} <CodeMirror
value={args.code}
options = {{ options = {{
mode:"javascript", mode:"javascript",
theme:"dracula", theme:"dracula",
...@@ -26,7 +27,8 @@ const CodePanel =(args:Props) => { ...@@ -26,7 +27,8 @@ const CodePanel =(args:Props) => {
const StylePanel = (args:Props)=>{ const StylePanel = (args:Props)=>{
return( return(
<div className = "code"> <div className = "code">
<CodeMirror value={args.code} <CodeMirror
value={args.code}
options = {{ options = {{
mode:"css", mode:"css",
theme:"dracula", theme:"dracula",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment