yariksav / vuetify-confirm

Extends vuetify.js confirm dialog
MIT License
142 stars 42 forks source link

Feature request: use v-confirm in template #30

Closed zorn-v closed 4 years ago

zorn-v commented 4 years ago

Sometimes there is need to add some logic or component in confirm text. Something like

...
<v-confirm v-model="showConfirm" @result="corfirmResult" 
  title="Some title"  
  button-true-text="Agree" 
  button-false-text="Nope"
>
  Text text text
  <v-checkbox label="Some label" v-model="checkModel" />
  <v-btn text href="some-url" target="_blank">Privacy policy</v-btn>
</v-confirm>
...
yariksav commented 4 years ago

In this case you have to use VDialog directly, as noticed in official vuetify examples. Otherways you can use https://www.npmjs.com/package/vuetify-dialog package. This component does only basic confirm logic

zorn-v commented 4 years ago

In this case you have to use VDialog directly

And write verbose template with title, actions etc. even if I need just specify title, text and buttons. vuetify-dialog - maybe... but it seems overkill for simple needs. I just copy your Confirm.vue component in my project and change text v-html to slot for now )