From 3935fec99cc3ad5ec9394952a84bc2ffdaf9ef97 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 28 三月 2021 11:03:42 +0800 Subject: [PATCH] 2021-03-28 --- src/menu/components/code/sandbox/index.jsx | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/menu/components/code/sandbox/index.jsx b/src/menu/components/code/sandbox/index.jsx index 0cb56a5..33bb103 100644 --- a/src/menu/components/code/sandbox/index.jsx +++ b/src/menu/components/code/sandbox/index.jsx @@ -18,7 +18,7 @@ const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) const EditorCode = asyncIconComponent(() => import('./editorcode')) -const BraftContent = asyncComponent(() => import('@/tabviews/custom/components/share/braftContent')) +const CodeContent = asyncComponent(() => import('./codecontent')) class CodeSandBox extends Component { static propTpyes = { @@ -28,7 +28,7 @@ } state = { - dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, back: false } @@ -56,7 +56,8 @@ columns: [], scripts: [], html: '', - css: '' + css: '', + js: '', } if (card.config) { @@ -67,6 +68,7 @@ _card.style = config.style _card.html = config.html _card.css = config.css + _card.js = config.js } this.setState({ @@ -167,10 +169,7 @@ } trigger="hover"> <Icon type="tool" /> </Popover> - <BraftContent - value={card.wrap.datatype !== 'static' ? '<p class="empty-content">瀵屾枃鏈�</p>' : card.html} - encryption="false" - /> + <CodeContent name={card.name} html={card.html} css={card.css} js={card.js}/> </div> ) } -- Gitblit v1.8.0