I have added the ability to write in the text fields.

This commit is contained in:
PascalMarchesseault
2024-06-28 02:37:01 -04:00
parent 146e000b4e
commit 879e3d0ce9
2 changed files with 20 additions and 6 deletions

View File

@@ -85,7 +85,21 @@
</div>
</template>
<script async setup>
<script setup>
import { ref } from 'vue';
const firstName = ref('');
const lastName = ref('');
const occupation = ref('');
const email = ref('');
const phone = ref('');
const birthDate = ref('');
const country = ref('');
const city = ref('');
const address = ref('');
const titre = ref('');
const description = ref('');
const dateRule = value => {
const datePattern = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/(19|20)\d{2}$/;
return datePattern.test(value) || 'Format de date invalide (JJ/MM/AAAA)';
@@ -93,5 +107,5 @@ const dateRule = value => {
</script>
<style scoped>
/* Votre style ici */
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div ref="container">
<div ref="container">
<div class="text-center text-2xl py-4 border-t-4">Liens des réseaux sociaux et de votre site</div>
<div class="px-5 py-2 flex flex-col space-y-4">
<div v-for="network in socialNetworks" :key="network.field">
@@ -17,11 +17,11 @@
<img :src="iconUrl" alt="Icon" class="icon-preview">
</div>
</div>
</div>
</div>
</div>
</template>
<script async setup>
<script setup>
import { ref } from 'vue';
const socialNetworks = ref([
@@ -34,6 +34,7 @@ const socialNetworks = ref([
]);
const iconUrl = ref('');
const iconFile = ref(null);
const onFileChange = (event) => {
const file = event.target.files[0];
@@ -45,7 +46,6 @@ const onFileChange = (event) => {
reader.readAsDataURL(file);
}
};
</script>
<style scoped>