Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CatherineYF opened this issue Mar 28, 2024 · 0 comments
Open

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

CatherineYF opened this issue Mar 28, 2024 · 0 comments

Comments

@CatherineYF
Copy link

CatherineYF commented Mar 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant