mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-24 08:03:53 +08:00
updata:智控台页面添加语言切换,支持中英繁。
This commit is contained in:
@@ -6,23 +6,23 @@
|
||||
style="width: 40px;height: 40px;border-radius: 50%;background: #5778ff;display: flex;align-items: center;justify-content: center;">
|
||||
<img loading="lazy" src="@/assets/home/equipment.png" alt="" style="width: 18px;height: 15px;" />
|
||||
</div>
|
||||
添加智能体
|
||||
{{ $t('addAgentDialog.title') }}
|
||||
</div>
|
||||
<div style="height: 1px;background: #e8f0ff;" />
|
||||
<div style="margin: 22px 15px;">
|
||||
<div style="font-weight: 400;text-align: left;color: #3d4566;">
|
||||
<div style="color: red;display: inline-block;">*</div> 智能体名称:
|
||||
<div style="color: red;display: inline-block;">*</div> {{ $t('addAgentDialog.agentName') }}:
|
||||
</div>
|
||||
<div class="input-46" style="margin-top: 12px;">
|
||||
<el-input ref="inputRef" placeholder="请输入智能体名称.." v-model="wisdomBodyName" @keyup.enter.native="confirm" />
|
||||
<el-input ref="inputRef" :placeholder="$t('addAgentDialog.placeholder')" v-model="wisdomBodyName" @keyup.enter.native="confirm" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;margin: 15px 15px;gap: 7px;">
|
||||
<div class="dialog-btn" @click="confirm">
|
||||
确定
|
||||
{{ $t('addAgentDialog.confirm') }}
|
||||
</div>
|
||||
<div class="dialog-btn" style="background: #e6ebff;border: 1px solid #adbdff;color: #5778ff;" @click="cancel">
|
||||
取消
|
||||
{{ $t('addAgentDialog.cancel') }}
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -50,12 +50,12 @@ export default {
|
||||
},
|
||||
confirm() {
|
||||
if (!this.wisdomBodyName.trim()) {
|
||||
this.$message.error('请输入智能体名称');
|
||||
this.$message.error(this.$t('addAgentDialog.nameRequired'));
|
||||
return;
|
||||
}
|
||||
Api.agent.addAgent(this.wisdomBodyName, (res) => {
|
||||
this.$message.success({
|
||||
message: '添加成功',
|
||||
message: this.$t('addAgentDialog.addSuccess'),
|
||||
showClose: true
|
||||
});
|
||||
this.$emit('confirm', res);
|
||||
|
||||
Reference in New Issue
Block a user