CreateButton.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!--
  2. bouton Créer
  3. -->
  4. <template>
  5. <main>
  6. <v-btn
  7. elevation="2"
  8. color="ot_warning ot_white--text"
  9. @click="showDialog=true"
  10. >
  11. {{ $t('create') }}
  12. </v-btn>
  13. <lazy-LayoutDialog
  14. :show="showDialog"
  15. >
  16. <template #dialogType>{{ $t('creative_assistant') }}</template>
  17. <template #dialogTitle>{{ $t('what_do_you_want_to_create') }}</template>
  18. <template #dialogText>
  19. <LayoutHeaderUniversalCreationGenerateCardsSteps :step="step" @updateStep="step=$event" />
  20. </template>
  21. <template #dialogBtn>
  22. <div class="text-center">
  23. <v-btn
  24. color="ot_super_light_grey"
  25. @click="showDialog=false;step=1"
  26. >
  27. {{ $t('cancel') }}
  28. </v-btn>
  29. <v-btn
  30. v-if="step > 1"
  31. color="ot_super_light_grey"
  32. @click="step=1"
  33. >
  34. {{ $t('previous') }}
  35. </v-btn>
  36. </div>
  37. </template>
  38. </lazy-LayoutDialog>
  39. </main>
  40. </template>
  41. <script lang="ts">
  42. import {defineComponent, Ref,ref} from '@nuxtjs/composition-api'
  43. export default defineComponent({
  44. setup () {
  45. const showDialog:Ref<Boolean> = ref(false);
  46. const step:Ref<Number> = ref(1);
  47. return {
  48. showDialog,
  49. step
  50. }
  51. }
  52. })
  53. </script>
  54. <style scoped>
  55. </style>