2016-04-23 3 views
0

私はテンプレートを持っていますが、それぞれtr、私は2つのtdを表示する必要があります。これは、次のような階層で実行されます。Vue.js <template> inside <tr>とIE 11

tbody 
    tr v-for 
    template v-for 
     td 
     td 

はい、ループ内にループがあります。 Chromeはこれに問題はありませんが、IEはそれを表示することを拒否します。私はここにオプションがありますか?

+0

テンプレートは、IEでサポートされていないで、すべてのHTTP

これに対処するためのハック方法の一種は、コンポーネントとis=""プロパティを使用することです:/caniuse.com/#feat=template私が知っているこれを行う方法はありません、あなたは手動でtdsを綴る必要があります – Jeff

答えて

0

ジェフはすでに彼のコメント(IEのサポートの不足<template>)で問題を説明しました。

<tr v-for="thing in things"> 
    <td v-for="subThing in thing" is="hackyComponent" :item="subThing"> 

とhackyComponentで

<td>{{item.a}}</td> 
<td>{{item.b}}</td> 

export default { 
replace: true //replaces the original <td> with the template content 
       // Vue might complain about creating a "Fragment Instance" in development, but that's not a real problem. 

} 
関連する問題