Browse Source

feat:[模板管理][update]

lkf
luojie 3 months ago
parent
commit
1d24db8066
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/components/Template/CustomTable.vue

+ 5
- 3
src/components/Template/CustomTable.vue View File

@ -90,7 +90,7 @@
{{ row[col.prop] }} {{ row[col.prop] }}
</template> </template>
</div> </div>
<div class="m-l-5 flex1" v-if="isShowBodySub(col)">
<div class="m-l-5 flex1" v-if="isShowBodySub(col,row)">
<template v-if="col.bodySubType === 'inputNumber'"> <template v-if="col.bodySubType === 'inputNumber'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" <HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" type="inputNumber" :fieldItemLabel="fieldItemLabel" type="inputNumber"
@ -111,7 +111,7 @@
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
</template> </template>
<template v-else>
<template v-else-if = "col.bodySubType === 'span'">
{{ row[col.bodySubKey] }} {{ row[col.bodySubKey] }}
</template> </template>
</div> </div>
@ -240,9 +240,11 @@ export default {
//value //value
return arr.some(item => item < 0); return arr.some(item => item < 0);
}, },
isShowBodySub(col) {
isShowBodySub(col,row) {
if (col.hasOwnProperty("disabled")) { if (col.hasOwnProperty("disabled")) {
return col.showBodySub return col.showBodySub
}else if(col.bodySubType === 'span'&&row[col.bodySubKey]){//span
return false;
} }
return col.bodySubType && col.bodySubKey; return col.bodySubType && col.bodySubKey;
}, },

Loading…
Cancel
Save