fix(接口定义): 修复自定义字段单选框无法选择的缺陷
--bug=1018803 --user=王孝刚 【接口测试】启用自定义模版单选字段无法被选中 https://www.tapd.cn/55049933/s/1275750
This commit is contained in:
parent
875fb55c9d
commit
d73ca1d3b8
|
@ -186,7 +186,7 @@ export default {
|
||||||
},
|
},
|
||||||
customFieldForm: {
|
customFieldForm: {
|
||||||
handler(v, v1) {
|
handler(v, v1) {
|
||||||
if (v && v1 && this.$store.state.apiMap && this.basicForm.id) {
|
if (v && v1 && store.apiMap && this.basicForm.id) {
|
||||||
this.apiMapStatus();
|
this.apiMapStatus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -245,4 +245,8 @@ export default {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
.case-form {
|
||||||
|
height: 95%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div>
|
<div>
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<el-link class="add-text" :underline="false" :disabled="disable" @click="add">
|
<el-link class="add-text" :underline="false" :disabled="disable" @click="add">
|
||||||
<i class="el-icon-plus">{{$t('custom_field.add_option')}}</i>
|
<i class="el-icon-plus">{{ $t('custom_field.add_option') }}</i>
|
||||||
</el-link>
|
</el-link>
|
||||||
</slot>
|
</slot>
|
||||||
<ms-instructions-icon size="13" v-if="isKv" :content="$t('选项值用于对接Jira等平台提交缺陷时,对应字段的属性值')"/>
|
<ms-instructions-icon size="13" v-if="isKv" :content="$t('选项值用于对接Jira等平台提交缺陷时,对应字段的属性值')"/>
|
||||||
|
@ -23,10 +23,10 @@
|
||||||
v-model="element.text"/>
|
v-model="element.text"/>
|
||||||
<span class="text-item" v-else>
|
<span class="text-item" v-else>
|
||||||
<span v-if="element.system">
|
<span v-if="element.system">
|
||||||
{{$t(element.text)}}
|
{{ $t(element.text) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{element.text}}
|
{{ element.text }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -38,13 +38,13 @@
|
||||||
v-model="element.value"/>
|
v-model="element.value"/>
|
||||||
<span class="text-item" v-else-if="isKv">
|
<span class="text-item" v-else-if="isKv">
|
||||||
<span>
|
<span>
|
||||||
{{ (element.value && isKv ? '(' : '') + element.value + (element.value && isKv ? ')' : '')}}
|
{{ (element.value && isKv ? '(' : '') + element.value + (element.value && isKv ? ')' : '') }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<el-link :underline="false" v-for="item in operators" :disabled="element.system && item.isEdit" :key="item.id">
|
<el-link :underline="false" v-for="item in operators" :disabled="element.system && item.isEdit" :key="item.id">
|
||||||
<i :class="item.icon"
|
<i :class="item.icon"
|
||||||
@click="item.click(element, idx)" />
|
@click="item.click(element, idx)"/>
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon";
|
import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon";
|
||||||
import {getUUID} from "metersphere-frontend/src/utils";
|
import {getUUID} from "metersphere-frontend/src/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsSingleHandleDrag",
|
name: "MsSingleHandleDrag",
|
||||||
components: {
|
components: {
|
||||||
|
@ -74,7 +75,7 @@ export default {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return [
|
return [
|
||||||
{ name: "John", text: "text", id: 0 },
|
{name: "John", text: "text", id: 0},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -120,6 +121,9 @@ export default {
|
||||||
if (!this.isKv) {
|
if (!this.isKv) {
|
||||||
item.value = getUUID().substring(0, 8);
|
item.value = getUUID().substring(0, 8);
|
||||||
}
|
}
|
||||||
|
while (typeof item.value === 'number') {
|
||||||
|
item.value = getUUID().substring(0, 8);
|
||||||
|
}
|
||||||
this.data.push(item);
|
this.data.push(item);
|
||||||
this.editIndex = this.data.length - 1;
|
this.editIndex = this.data.length - 1;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue