SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">

<head>
    <title>slot content extend 实例</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>

<body>
    <h1>lot content extend 实例</h1>
    <hr>
    <div id="app">
        <jscomponent>
            <span slot="blogUrl">{{jsData.blogUrl}}</span>
            <span slot="netName">{{jsData.netName}}</span>
            <span slot="skill">{{jsData.skill}}</span>
        </jscomponent>
    </div>

    <template id="tep">
        <div>
            <p>博客地址:<slot name="blogUrl"></slot></p>
            <p>网名:<slot name="netName"></slot></p>
            <p>技术类型:<slot name="skill"></slot></p>
        </div>
    </template>

    <script type="text/javascript">
        var jscmp = {
            template: "#tep",
        }

        var app = new Vue({
            el: '#app',
            data: {
                jsData: {
                    blogUrl: "https://www.cnblogs.com/wyt007/",
                    netName: "进击的辣条",
                    skill: "web前端"
                }
            },
            components: {
                "jscomponent": jscmp
            }
        })
    </script>
</body>

</html>

本项目引用的自定义外部资源