vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

How can I get md data in my vue components?

Open CatherineYF opened this issue 1 year ago • 0 comments

I want to get some data in a markdown file,and use it in a vue components, I've tried import the md file in

// this README file contains progress data of all pages,I want to get it and show it on this ProgressBar.vue
import readmePage from "../../README.md"

export default {
  name: 'ProgressBar',
  mounted(){
    let pageData = readmePage.render.call(this)
  }
}

now the pageData is a vnode,but it seems mistakenly compiled,only has a div level

CatherineYF avatar Mar 28 '24 04:03 CatherineYF