Skip to content

Commit 0c62de4

Browse files
committed
feat: Internationalization
1 parent 3c2c124 commit 0c62de4

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

frontend/src/views/system/model/ModelForm.vue

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,22 @@ const rules = {
7676
trigger: 'change',
7777
},
7878
],
79-
endpoint: [{ required: true, message: 'endpoint', trigger: 'blur' }],
79+
endpoint: [
80+
{
81+
required: true,
82+
message: t('datasource.please_enter') + t('common.empty') + t('model.api_domain_name'),
83+
trigger: 'blur',
84+
},
85+
],
8086
modelName: [{ required: true, message: t('model.the_basic_model_de'), trigger: 'blur' }],
8187
name: [{ required: true, message: t('model.the_basic_model'), trigger: 'blur' }],
82-
api_key: [{ required: true, message: 'api_key', trigger: 'blur' }],
88+
api_key: [
89+
{
90+
required: true,
91+
message: t('datasource.please_enter') + t('common.empty') + 'API Key',
92+
trigger: 'blur',
93+
},
94+
],
8395
}
8496
8597
onMounted(() => {
@@ -157,7 +169,12 @@ defineExpose({
157169
</el-icon>
158170
</el-tooltip>
159171
</template>
160-
<el-input v-model="modelForm.name" />
172+
<el-input
173+
:placeholder="
174+
$t('datasource.please_enter') + $t('common.empty') + $t('model.model_name')
175+
"
176+
v-model="modelForm.name"
177+
/>
161178
</el-form-item>
162179
<el-form-item prop="type" :label="t('model.model_type')">
163180
<el-select v-model="modelForm.type" style="width: 100%">
@@ -174,7 +191,15 @@ defineExpose({
174191
><span class="custom-require_danger">{{ t('model.basic_model') }}</span>
175192
<span class="enter">{{ t('model.enter_to_add') }}</span>
176193
</template>
177-
<el-select v-model="modelForm.type" style="width: 100%">
194+
<el-select
195+
v-model="modelForm.type"
196+
style="width: 100%"
197+
multiple
198+
filterable
199+
allow-create
200+
default-first-option
201+
:reserve-keyword="false"
202+
>
178203
<el-option
179204
v-for="item in modelList"
180205
:key="item.value"

0 commit comments

Comments
 (0)