Skip to content

How can I get md data in my vue components? #3208

Open
@CatherineYF

Description

@CatherineYF

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 <script>,then I got an object with a render function
then I try this:

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions