Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 909 Bytes

log.md

File metadata and controls

45 lines (38 loc) · 909 Bytes

(warning) Error running install script for optional dependency: "/private/var/www/antony/node_modules/fsevents: Command failed.

  • Install Xcode
  • Terminal "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"

(note) Using Hightlight.js in Vue-Router and Vue.js Dynamic Pages

import hljs from 'highlight.js'
import 'highlight.js/styles/atom-one-dark.css'

const highlightCode = () => {
  const preEl = document.querySelectorAll('pre')

  preEl.forEach((el) => {
    hljs.highlightBlock(el)
  })
}

export default {
    mounted () {
        highlightCode()
    },

    updated () {
        highlightCode()
    }
}

(note) How many content block can there be in one component?

  • Only one
  • eg:
  • Correct
<template>
  <div class="one"></div>
  </template>
  • Incorrect
<template>
  <div class="one"></div>
  <div class="two"></div>
</template>