Godofbrowser / vuejs-dialog

A lightweight, promise based alert, prompt and confirm dialog
MIT License
351 stars 111 forks source link

Feature request: setting default value for prompt #55

Open shsmad opened 5 years ago

shsmad commented 5 years ago

Hi, I didn't find any way to set default value of prompt text input field, because data-field input is not reachable from outside (which is set in plugin/js/mixins/dialog-mixin.js`):

plugin/components/views/default-view.vue:

<input type="text" 
    :placeholder="isPrompt ? '' : options.verification"
    v-model="input"
    autocomplete="off"
    id="dg-input-elem"
    ref="inputElem"
    style="width: 100%;margin-top: 10px;
        padding: 5px 15px; font-size: 16px;
        border-radius: 4px; border: 2px solid #eee"
/>

May by you should make any prop, which will hold value, passed to $dialog.prompt as an option to display in <input>?