fix(功能用例):自定义字段样式未对齐

--bug=1008919 --user=李敏 【测试跟踪】测试用例-自定义模板,字段没对齐 https://www.tapd.cn/55049933/s/1109564
This commit is contained in:
limin-fit2 2022-02-24 17:13:30 +08:00 committed by jianxing
parent 9a318b74cf
commit dabcd53b6a
2 changed files with 26 additions and 1 deletions

View File

@ -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') {
//00arrpush0splicei+1i
customFields.push(customFields.splice(i, 1)[0]);
} else {
i++;//0
}
}
return customFields;
},
}
}
</script>

View File

@ -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>