摘要: <template> <div class="div"> //组建使用 <v-header @click.native="handleClick"></v-header> </div></template> <script> //引入组建 import vHeader from './compone 阅读全文
posted @ 2018-07-19 23:14 菜鸡~大神 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 1.在main.js中注册全局的bus Vue.prototype.bus=new Vue(); 2.在组建中使用 子组建使用:this.bus.$emit('自定义事件名',data) methods:{ handleClicks(){ this.bus.$emit('openMenu',true 阅读全文
posted @ 2018-07-19 23:01 菜鸡~大神 阅读(3036) 评论(0) 推荐(0) 编辑
摘要: 1.对于IE9+、chrome、firefox、Opera、Safari: window.innerHeight浏览器窗口的内部高度; window.innerWidth浏览器窗口的内部宽度; 2.对于IE8.7.6.5: document.documentElement.clientHeight: 阅读全文
posted @ 2018-07-19 22:42 菜鸡~大神 阅读(777) 评论(0) 推荐(0) 编辑