@bagelink/vue 1.9.138 → 1.9.142
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.
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ withDefaults(defineProps<{
|
|
|
19
19
|
:style="{ width: `${size}px`, height: `${size}px` }"
|
|
20
20
|
>
|
|
21
21
|
<Image v-if="src" :src="src" :alt="alt || name" />
|
|
22
|
-
<Icon v-else-if="icon" :icon="icon" :size="size" />
|
|
22
|
+
<Icon v-else-if="icon" :icon="icon" :size="size / 40" />
|
|
23
23
|
<p v-else :style="{ 'line-height': `${size}px`, 'font-size': `calc(1.5rem * ${size} / 50)` }">
|
|
24
24
|
{{ (fallback || initials(name || '')).toUpperCase() }}
|
|
25
25
|
</p>
|
|
@@ -18,7 +18,7 @@ import TelInput from '../components/form/inputs/TelInput.vue'
|
|
|
18
18
|
import TextInput from '../components/form/inputs/TextInput.vue'
|
|
19
19
|
import ToggleInput from '../components/form/inputs/ToggleInput.vue'
|
|
20
20
|
import UploadInput from '../components/form/inputs/Upload/UploadInput.vue'
|
|
21
|
-
import { useI18n } from '../i18n'
|
|
21
|
+
import { useI18n, resolveI18n } from '../i18n'
|
|
22
22
|
|
|
23
23
|
import { parseQuery } from '../utils/queryFilter'
|
|
24
24
|
|
|
@@ -283,9 +283,14 @@ function getFieldComponent(type: string) {
|
|
|
283
283
|
return componentMap[type] || TextInput
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
// Merged errors (external from parent + internal validation)
|
|
286
|
+
// Merged errors (external from parent + internal validation), with i18n resolution
|
|
287
287
|
const mergedErrors = computed(() => {
|
|
288
|
-
|
|
288
|
+
const combined = { ...validationErrors.value, ...(props.errors || {}) }
|
|
289
|
+
const resolved: Record<string, string> = {}
|
|
290
|
+
for (const [key, val] of Object.entries(combined)) {
|
|
291
|
+
resolved[key] = resolveI18n(val) ?? val
|
|
292
|
+
}
|
|
293
|
+
return resolved
|
|
289
294
|
})
|
|
290
295
|
|
|
291
296
|
// Get props for field component
|