当 appkey 发生改变的时候,如果 服务分组 返回了多个,需要用户手动选择,如果只返回了一个服务分组则默认选中
<mtd-form-item
label="服务分组:"
:label-width="130"
prop="groupName"
v-if="servingType == 'TritonServing'"
>
<mtd-select
style="width: 320px"
v-model="formParams.serviceNameserviceName"
placeholder="请选择服务分组"
@change="groupNameChange"
>
<mtd-option
v-for="item in serviceGroupList"
:key="item.name"
:label="item.name"
:value="item.name"
@mouseenter.native="showTips($event, item)"
@mouseleave.native="hideTip($event)"
/>
</mtd-select>
if (this.serviceGroupList.length === 1) {
this.formParams.serviceNameserviceName = this.serviceGroupList[0].name;
} else {
this.formParams.serviceNameserviceName = undefined;
}