king
2021-03-28 3935fec99cc3ad5ec9394952a84bc2ffdaf9ef97
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>
    )
  }