fix(功能用例):自定义字段样式未对齐
--bug=1008919 --user=李敏 【测试跟踪】测试用例-自定义模板,字段没对齐 https://www.tapd.cn/55049933/s/1109564
This commit is contained in:
parent
9a318b74cf
commit
dabcd53b6a
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-row v-for="(i) in (customFieldRowNums)" :key="i">
|
||||
<span class="custom-item" v-for="(item, j) in issueTemplate.customFields" :key="j">
|
||||
<span class="custom-item" v-for="(item, j) in sortCustomFields" :key="j">
|
||||
<span v-if="j >= (i - 1)*3 && j < (i - 1)*3+3">
|
||||
<el-col :span="8" v-if="item.type !== 'richText'">
|
||||
<el-form-item :label="item.system ? $t(systemNameMap[item.name]) : item.name" :prop="item.name"
|
||||
|
@ -55,6 +55,19 @@ export default {
|
|||
systemNameMap() {
|
||||
return SYSTEM_FIELD_NAME_MAP;
|
||||
},
|
||||
sortCustomFields() {
|
||||
let total = 0;//定义total用于控制循环结束
|
||||
let customFields = this.issueTemplate.customFields;
|
||||
for (let i = 0; total < customFields.length; total++) {
|
||||
if (customFields[i].type === 'richText') {
|
||||
//循环到是0的位置就删除该元素0并且在arr末尾push进这个元素0,由于splice删除了该位置元素,所以i不用+1,下次循环仍然检查i位置的元素
|
||||
customFields.push(customFields.splice(i, 1)[0]);
|
||||
} else {
|
||||
i++;//循环到不是0的位置就继续往后循环
|
||||
}
|
||||
}
|
||||
return customFields;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -148,4 +148,16 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.el-date-editor.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
.custom-with >>> .el-input__inner{
|
||||
height: 32px;
|
||||
}
|
||||
>>> .el-input--suffix .el-input__inner{
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue