随笔分类 -  vue拓荒记

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