javascript - How to dynamically add questions to Vue Webpack template's meta.js file? -


i've forked standard vue webpack template , editing meta.js file. i'm trying find way add property prompts this:

    "pages": {       "type": "input",       "required": true,       "message": "how many pages template have?"      }, 

and thereafter use pages variable add more questions, this:

"page1": {   "type": "string",   "required": true,   "message": "what name page1?"  }, 

i imagine loop defined outside of object adds properties object. loaded @ same time object , variables undefined. ideas?

the meta.json content evaluated vue-cli, have fork , change there.

are questions runtime-dependent, or need contitionals? because works, can find examples of in template's questions right now, example sub-questions linting.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -