zoukankan      html  css  js  c++  java
  • Vue+webpack

    1.下载vue
    npm i -D vue 
    vue-loader vue-template-compiler vue-style-loader
    
    
    // 简易版的webpack和vue结合
    // 3.0以下版本需要加一句resolve
    vue init webpack-simple aaa
    
    1.import Vue from "vue"
    import App from "./app.vue"
    
    
    
    111.new Vue({
        el:'#app',
        render:h=>h(App)
        <!--render:(h)=>{-->
        <!--    return App-->
        <!--}-->
    })
    
    
    
    222.创建app.vue文件依赖于loader
    vue-loader
    vue-style-loader
    
    template、script、style标签
    <template>
        //内容
        <div>
            this is vue page
            <h1>{{msg}}</h1>
        </div>
    </template>
    
    <script>
        // 代码
        export default {
            name:'app',
            data(){
                return "this is msg"
            }
        }
    </script>
    
    <style>
        // 样式
    </style>

    npm i -D axios ajax请求数据

  • 相关阅读:
    USB
    Google
    机型参数
    mac
    反编译
    xcode
    Ios 消息推送
    真机:特殊
    Android
    object-c
  • 原文地址:https://www.cnblogs.com/2oex/p/9569226.html
Copyright © 2011-2022 走看看