zoukankan      html  css  js  c++  java
  • 如何在html.js文件中使用vue组件

    1.     html中引入 http-vue-loader.js

      下载地址等详情访问: https://www.npmjs.com/package/http-vue-loader

      html中写法和vue中一样

      <multisearch ref="multiSearchRef" ></multisearch>

    2.   js中使用方法

    Vue.use(httpVueLoader)
    var vm = new Vue({   
      el: '#app',   
      components: {
        'multisearch': httpVueLoader('../../../compoent/multipleSearch.vue'),
      },
    }

    3 vue文件 请注意 和平时快捷键生成的文件不太一样  

    <template>
        <div class="hello">Hello {{who}}</div>
    </template>
     
    <script>
    module.exports = {
        data: function() {
            return {
                who: 'world'
            }
        }
    }
    </script>
     
    <style>
    </style>
    
    
  • 相关阅读:
    Pillar
    Minion配置文件
    Master配置文件
    Grains
    常见的散列函数
    数据结构散列表
    转载:数据结构 二项队列
    转载:数据结构 左式堆
    数据结构 d-堆
    二叉堆的简单介绍
  • 原文地址:https://www.cnblogs.com/guozongzhang/p/10857397.html
Copyright © 2011-2022 走看看