How to extract props from a SFC passed as a string #9405
-
So I have this SFC file that is passed as a string const msg = ref('Hello World!') defineProps({ {{ msg }}`is there a function from like 'vue/compiler-sfc' that I can pass this string to and it can return the list of props in the string? I need this urgently for a project |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You can extract specified content from a string through regular expressions. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Please don’t tag maintainers like this. |
Beta Was this translation helpful? Give feedback.
You can extract specified content from a string through regular expressions.