this.options是未定义的。我没有任何名为this.options的字段

时间:2019-01-10 12:04:40

标签: vue.js

我正在做一个项目,而Vue一直让我发疯。由于某种原因,无论我尝试什么,我都会不断收到错误

    new Vue.component('interactbutton',{
        template:'<input type="file" id="Step1Image" placeholder="Step 1 Image...">'
})
    new Vue({
        el:"#MainViewPortApp"
    })

我的HTML

    <!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="Js/VueApps.js"></script>
    <title></title>
</head>
<body>
    <div id="MainViewPortApp">

        <interactbutton></interactbutton>


    </div>



</body>
<script type="text/javascript"></script>




</html>

1 个答案:

答案 0 :(得分:0)

Vue.component不是构造函数。请勿同时使用new

相关问题