html部分,定义getPropPosi()方法进行递归运算
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-table
class="targetTable"
:data="ruleForm.target"
border
height="391"
row-key="targetId"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column align="center" prop="type" label="目标号">
<template slot-scope="scope">
<el-form-item
class="targetInput"
label-width="0"
:prop="'target.' + getPropPosi(scope.