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 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/menu/components/code/sandbox/index.jsx b/src/menu/components/code/sandbox/index.jsx
index 705dfda..33bb103 100644
--- a/src/menu/components/code/sandbox/index.jsx
+++ b/src/menu/components/code/sandbox/index.jsx
@@ -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,7 +169,7 @@
         } trigger="hover">
           <Icon type="tool" />
         </Popover>
-        <CodeContent html={card.html} css={card.css}/>
+        <CodeContent name={card.name} html={card.html} css={card.css} js={card.js}/>
       </div>
     )
   }

--
Gitblit v1.8.0