随笔分类 - vue拓荒记
遇到问题,思考,解决,总结,飞升
摘要:1.父组件中给子组件定义一个ref. 然后通过ref 访问子组件的属性和方法 2.用事件监听的方式 注意: 新版本的vue中 用mitt这个插件
阅读全文
摘要:https://cn.vuejs.org/v2/guide/components-props.html#%E7%A6%81%E7%94%A8-Attribute-%E7%BB%A7%E6%89%BF
阅读全文
摘要:path模块是node.js中处理路径的核心模块。可以很方便的处理关于文件路径的问题。 const path = require('path') // 拼接路径 function resolve(dir) { return path.join(__dirname, dir) } module.exp
阅读全文
摘要:
阅读全文
摘要:https://cn.vuejs.org/v2/api/#v-cloak
阅读全文
摘要:[vuex] do not mutate vuex store state outside mutation handlers. import * as types from './mutation-types' import {playMode} from 'common/js/config' i
阅读全文
摘要:<template> <div class="search-box"> <i class="icon-search"></i> <input class="box" v-model="query" :placeholder="placeholder"> <i @click="clear" v-sho
阅读全文
摘要:当多个组件需要处理同一个问题,并且处理该问题的逻辑又相似,非常推荐用mixin
阅读全文
摘要:<template> <div class="hello"> <div class="toggle" @click="fullScreen = !fullScreen" v-show="fullScreen">toggle</div> <transition name="normal" @enter
阅读全文
摘要:<template> <div class="a"> <div class="basic" ref="ba">基本元素</div> <chil ref="ccd"></chil> </div> </template> <script> import Chil from '.../chil.vue'
阅读全文
摘要:1. 2. 3. 4. 5. 6. 7.“动态路由”和“编程式路由”参数的接收方式:路由的参数 页面之间跳转的参数
阅读全文
摘要:{ "name": "webpack-demo", "version": "1.0.0", "description": "learning webpack", "private": true, > 表示项目是私有的,不会发布到npm的线上仓库 "main": "index.js", > 向外暴露的
阅读全文
摘要:vue-cli[2.x]中: 安装 npm install fastclick --save 使用: 在main.js中 :先 import fastClick from 'fastclick' 然后 fastClick.attach(document.body) import Vue from '
阅读全文

浙公网安备 33010602011771号