adata-ui 2.1.16 → 2.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,7 @@ import { useUIValidation } from '#adata-ui/composables/useUIValidation'
|
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(defineProps<{
|
|
6
6
|
formType?: 'get-demo' | 'feedback'
|
|
7
|
+
userInfo: any
|
|
7
8
|
}>(), {
|
|
8
9
|
formType: 'feedback',
|
|
9
10
|
})
|
|
@@ -67,14 +68,19 @@ const send = () => {
|
|
|
67
68
|
emit('submit', { sender_name: fullName.value, phone_number: phone.value, email: mail.value, message: comment.value })
|
|
68
69
|
fullName.value = ''
|
|
69
70
|
phone.value = ''
|
|
70
|
-
mail.value = ''
|
|
71
|
+
mail.value = props.userInfo?.email || ''
|
|
71
72
|
comment.value = ''
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
defineExpose({
|
|
75
76
|
reset: () => (submitted.value = false),
|
|
76
77
|
})
|
|
78
|
+
|
|
79
|
+
onMounted(() => {
|
|
80
|
+
mail.value = props.userInfo?.email
|
|
81
|
+
})
|
|
77
82
|
</script>
|
|
83
|
+
|
|
78
84
|
<template>
|
|
79
85
|
<section class="flex flex-col gap-4 bg-white p-8 dark:bg-gray-900 sm:gap-8 sm:rounded-[20px]">
|
|
80
86
|
<div class="flex flex-col gap-2">
|
|
@@ -5,6 +5,7 @@ import { useUIValidation } from '#adata-ui/composables/useUIValidation'
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
title?: string
|
|
7
7
|
description?: string
|
|
8
|
+
userInfo: any
|
|
8
9
|
}>()
|
|
9
10
|
|
|
10
11
|
const emit = defineEmits(['send'])
|
|
@@ -40,9 +41,13 @@ function onSend() {
|
|
|
40
41
|
emit('send', form)
|
|
41
42
|
submitted.value = false
|
|
42
43
|
form.sender_name = ''
|
|
43
|
-
form.email = ''
|
|
44
|
+
form.email = props.userInfo?.email || ''
|
|
44
45
|
form.phone_number = ''
|
|
45
46
|
}
|
|
47
|
+
|
|
48
|
+
onMounted(() => {
|
|
49
|
+
form.email = props.userInfo?.email
|
|
50
|
+
})
|
|
46
51
|
</script>
|
|
47
52
|
|
|
48
53
|
<template>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import * as z from 'zod'
|
|
3
3
|
import { useUIValidation } from '#adata-ui/composables/useUIValidation'
|
|
4
4
|
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
userInfo: any
|
|
7
|
+
}>()
|
|
8
|
+
|
|
5
9
|
const emit = defineEmits<{
|
|
6
10
|
(e: 'send', num: number): void
|
|
7
11
|
}>()
|
|
@@ -34,7 +38,7 @@ const send = () => {
|
|
|
34
38
|
if (validation.value) return
|
|
35
39
|
emit('send', form)
|
|
36
40
|
form.name = ''
|
|
37
|
-
form.email = ''
|
|
41
|
+
form.email = props.userInfo?.email || ''
|
|
38
42
|
form.phone = ''
|
|
39
43
|
form.comment = ''
|
|
40
44
|
|
|
@@ -46,6 +50,10 @@ const cancel = () => {
|
|
|
46
50
|
defineExpose({
|
|
47
51
|
reset: () => (submitted.value = false),
|
|
48
52
|
})
|
|
53
|
+
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
form.email = props.userInfo?.email
|
|
56
|
+
})
|
|
49
57
|
</script>
|
|
50
58
|
|
|
51
59
|
<template>
|
package/lang/en.ts
CHANGED
package/lang/kk.ts
CHANGED
package/lang/ru.ts
CHANGED