美文网首页
vue is属性

vue is属性

作者: daoqing99 | 来源:发表于2018-04-16 19:59 被阅读0次
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>is属性</title>
</head>

<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <div id="app">
        <table>
            <tbody>
                <tr is='row'>
                </tr>
                <tr is='row'>
                </tr>
                <tr is='row'>
                </tr>
            </tbody>
        </table>
    </div>
    <script>
    Vue.component('row', {
        template: "<tr><td>这是一行</td></tr>"
    })

    new Vue({
        el: '#app'
    })
    </script>
</body>

</html>

tbody里面只能写tr row不识别,用is属性is='row'

相关文章

网友评论

      本文标题:vue is属性

      本文链接:https://www.haomeiwen.com/subject/cdtykftx.html