setup()

in studio/components/log/index.tsx [50:83]


  setup(props) {
    hljs.registerLanguage('studio-log', () => ({
      contains: [
        {
          scope: 'info',
          begin: 'INFO'
        },
        {
          scope: 'warning',
          begin: 'WARNING'
        },
        {
          scope: 'error',
          begin: 'ERROR'
        }
      ]
    }))
    return () =>
      h(
        NConfigProvider,
        {
          hljs,
          class: styles.hljs
        },
        () =>
          h(NLog, {
            log: props.value,
            language: 'studio-log',
            style: {
              height: props.height + 'px'
            }
          })
      )
  }