Commit a7623668 authored by hiyonx's avatar hiyonx

优化样式

parent 3c7d11b6
......@@ -4,7 +4,7 @@
<el-row class="form-wrap" :gutter="gutter">
<div>
<template v-for="(sapProperties, key) in sapPropertyMap">
<div class="separator">{{ getViewTypeName(key) }}</div>
<el-col :span="24" class="separator">{{ getViewTypeName(key) }}</el-col>
<template v-for="item in sapProperties">
<el-col :span="span" :key="item.id">
<el-form-item :label="item.name" :prop="key + '.' + item.sapField"
......@@ -98,12 +98,8 @@ export default {
},
getViewTypeName(viewType) {
for (let item of this.dict.type.sap_property_view) {
if (item.value == this.form.type && item.raw.cssClass === viewType) {
return item.label
}
}
return viewType
let viewTypeDict = this.dict.type.sap_property_view.find(item => item.value == this.form.type && item.raw.cssClass === viewType) || {}
return viewTypeDict.label || viewType
},
setData(data, sapData, sapPropertyMap) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment