Skip to content

Vuejs how to use dynamical template in component?

I want to render a custom component which has a dynamical template base on user input. when user input a specific string ([:component-1]), it will be render as a component (CustomComponent) how to achieve this? Thanks a lot for anyone help! Answer I figured it out by using Vue.complie according to dynamically…

RegExp for an identifier

I am trying to write a regular expression for an ID which comes in the following formats: 7_b4718152-d9ed-4724-b3fe-e8dc9f12458a b4718152-d9ed-4724-b3fe-e8dc9f12458a [a_][b]-[c]-[d]-[e]-[f] a – optional 0-3 digits followed by an underscore if there’s at least a digit (if there is underscore is req…