From 962f90de445d7935ad76ea7b74a98f12ce9a7498 Mon Sep 17 00:00:00 2001
From: vben <anncwb@126.com>
Date: 星期二, 01 十二月 2020 23:51:39 +0800
Subject: [PATCH] feat: support vscode i18n-ally plugin

---
 src/components/Form/src/FormItem.tsx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/Form/src/FormItem.tsx b/src/components/Form/src/FormItem.tsx
index a5a43ee..50eab6f 100644
--- a/src/components/Form/src/FormItem.tsx
+++ b/src/components/Form/src/FormItem.tsx
@@ -47,7 +47,7 @@
     },
   },
   setup(props, { slots }) {
-    const { t } = useI18n('component.form');
+    const { t } = useI18n();
     // @ts-ignore
     const itemLabelWidthRef = useItemLabelWidth(toRef(props, 'schema'), toRef(props, 'formProps'));
 
@@ -175,7 +175,7 @@
       const characterInx = rules.findIndex((val) => val.max);
       if (characterInx !== -1 && !rules[characterInx].validator) {
         rules[characterInx].message =
-          rules[characterInx].message || t('maxTip', [rules[characterInx].max]);
+          rules[characterInx].message || t('component.form.maxTip', [rules[characterInx].max]);
       }
       return rules;
     }

--
Gitblit v1.8.0