GithubHelp home page GithubHelp logo

Comments (5)

wyntau avatar wyntau commented on July 20, 2024

fis3-parser-vue-component 只负责编译 .vue 单文件类型.

请问你的入口文件是怎么写的.

按我的理解的话, .vue文件中不会出现 new Vue()的调用吧

from fis3-parser-vue-component.

johnwaynerui avatar johnwaynerui commented on July 20, 2024

嗯嗯,.vue文件中不会出现new Vue调用,但是整个页面的入口main.js中要启动vue根实例就得写new Vue了,比如new Vue({el: '#app', template: '<App/>'}) 这个App就是我的根组件。

from fis3-parser-vue-component.

wyntau avatar wyntau commented on July 20, 2024

@johnwaynerui 你可以看下 https://github.com/vuejs/vue-hackernews-2.0 中的写法.

或者像下面这样, 把App 放到一个单独的 .vue文件中, 然后在boot.js中引入

import AppComponent from 'app.vue';

let options = Object.assign({
  el: '#container'
}, AppComponent);

new Vue(options);

from fis3-parser-vue-component.

ccqgithub avatar ccqgithub commented on July 20, 2024
import AppComponent from 'app.vue';

let App = Vue.extend(AppComponent)

new App({}).$mount('#app')

from fis3-parser-vue-component.

johnwaynerui avatar johnwaynerui commented on July 20, 2024

@treri @ccqgithub 多谢解答,知道怎么做了。

from fis3-parser-vue-component.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.