mirror of
https://github.com/keven1024/015.git
synced 2026-06-07 12:54:34 +00:00
feat(i18n): add 'add' translation in multiple languages and update InputGroupField, KvInputGroupField, and NotifyConfigField components to use localized text for button labels
This commit is contained in:
@@ -6,6 +6,7 @@ const props = defineProps<{
|
||||
label?: string
|
||||
rules?: RuleExpression<string[]>
|
||||
}>()
|
||||
const { t } = useI18n()
|
||||
const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.rules)
|
||||
</script>
|
||||
|
||||
@@ -30,7 +31,7 @@ const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.
|
||||
</div>
|
||||
<Button class="self-start" size="sm" @click="() => setValue([...(value || []), ''])">
|
||||
<LucidePlus class="size-4" />
|
||||
添加
|
||||
{{ t('common.add') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,6 +31,7 @@ const props = defineProps<{
|
||||
config?: KvInputConfig
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
const config = computed(() => {
|
||||
return {
|
||||
key: { ...defaultConfig.key, ...(props.config?.key ?? {}) },
|
||||
@@ -95,7 +96,7 @@ const updateKey = (index: number, nextKey: string | number) => {
|
||||
</div>
|
||||
<Button type="button" class="self-start" size="sm" @click="() => setValue([...(value ?? []), ['', '']])">
|
||||
<LucidePlus class="size-4" />
|
||||
添加
|
||||
{{ t('common.add') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user