Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js Vue在两个级别的v-for中获得$index_Vue.js - Fatal编程技术网

Vue.js Vue在两个级别的v-for中获得$index

Vue.js Vue在两个级别的v-for中获得$index,vue.js,Vue.js,这是一张有Vue的桌子 <table> <tr v-for="height in chartHeight" track-by="$index"> <td class="item" v-for="width in chartWidth" track-by="$index"> index of row and column here </td> </tr> </t

这是一张有Vue的桌子

<table>
    <tr v-for="height in chartHeight" track-by="$index">
        <td class="item" v-for="width in chartWidth" track-by="$index">
            index of row and column here
        </td>
    </tr>
</table>

这里的行和列索引
高度
$index
被内部宽度的高度覆盖。如何访问这两个
$index


<table>
    <tr v-for="(hid, height) in chartHeight" track-by="hid">
        <td class="item" v-for="(wid, width) in chartWidth" track-by="wid">
            {{ hid }}, {{ wid }}
        </td>
    </tr>
</table>
{{hid}},{{wid}

{{hid}},{{wid}

您能给出chartHeight和chartWidth的示例吗?您能给出chartHeight和chartWidth的示例吗?