Login
Discover
Waves
Communities
Raidstead
Write
Login
Signup
lemooljiang
@lemooljiang
76
Designer , Poet , Technology enthusiasts
Followers
2371
Following
95
Follow
Email digest
Resource Credits
Available
Used
Location
Guangzhou
Created
2016-07-16 04:39
RSS Feed
Subscribe
Comments
Blog
Posts
Comments
Communities
Wallet
lemooljiang
starnote
7y
RE: Vue.js实战笔记
直接在子组件中使用 this.$parent 即可获取父组件对象。 这种方法比较简单,但是不太直观,建议使用上一种方法。
$ 0.101
2
lemooljiang
starnote
7y
RE: Vue.js实战笔记
分两步走: 在父组件中动态绑定属性,:parentmsg='msg' 子组件中通过 props: 获取。 传方法也是差不多步骤. //App.vue传值给Header.vue //App.vue中的写法 <template> <div id="app"> <Header :parentmsg="title"
$ 0.103
2
lemooljiang
starnote
7y
RE: Vue.js实战笔记
axios中文文档 参考 参考2 cnpm install axios --save //main.js import axios from 'axios' Vue.prototype.axios = axios //其它js中使用: this.axios({......}) //或者是哪里使用哪里就导入: import axios from 'axios' axios.get(){}
lemooljiang
starnote
7y
RE: Vue.js实战笔记
<template> <div id="app"> <router-link to="/index">首页</router-link> <router-link to="/course">课程</router-link> <router-link
lemooljiang
starnote
7y
RE: Vue.js实战笔记
主要是在 App.vue 中布局。 主要分三步:引入,注册及使用。 <template> <div id="app"> <Header></Header> //3.使用 <Banner></Banner> </div> </template> <script> import
lemooljiang
starnote
7y
RE: Vue.js实战笔记
lemooljiang
starnote
7y
RE: Vue.js实战笔记
手册 参考 cnpm install bootstrap-vue bootstrap --save //src/main.js import BootstrapVue from 'bootstrap-vue' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue/dist/bootstrap-vue.css'
lemooljiang
starnote
7y
RE: Vue.js实战笔记
@keyup.enter='function' .enter //监听enter键 .tab
lemooljiang
starnote
7y
RE: Vue.js实战笔记
.stop @click.stop='show' //可以阻止事件冒泡 .prevent //阻止默认行为 .capture //捕获触发事件 .self //只有点击当前元素才触发 .once //只触发一次
lemooljiang
starnote
7y
RE: Vue.js实战笔记
1. 数组 <h1 :class="['first', 'second']">hello</h1> 2. 三元表达式 <h1 :class="['first', 'second',flag?'active':'']"> 3. 类名 <h1 :class="['first', 'second', { 'active':flag
lemooljiang
starnote
7y
RE: Vue.js实战笔记
1、v-cloak 解决插值表达式的闪烁问题,后面不再需要 <p v-cloak>{{ msg }}</p> [v-cloak]{ display: none; } 2、<p v-text='msg'></p> // 渲染文本内容,会替换整个文本,所以一般使用插值表达式{{ msg }} 3、<p
lemooljiang
starnote
7y
RE: Vue.js实战笔记
什么是生命周期:从Vue实例创建、运行、到销毁期间,总是伴随着各种各样的事件,这些事件,统称为生命周期! 生命周期钩子:就是生命周期事件的别名而已; 生命周期钩子 = 生命周期函数 = 生命周期事件 主要的生命周期函数分类: 创建期间的生命周期函数: beforeCreate:实例刚在内存中被创建出来,此时,还没有初始化好 data 和 methods 属性 created:实例已经在内存中创建OK,此时
lemooljiang
starnote
7y
RE: Vue.js实战笔记
lemooljiang
starnote
7y
RE: Vue.js实战笔记
//text.js export default { name: 'tiantian', age: 28 } export let title = 'every' //main.js import tt from './text.js' import {title} from './text.js' console.log(tt) //tt.name tt.age
lemooljiang
starnote
7y
RE: Vue.js实战笔记
nrm 是一个npm源管理器,允许你快速地在如下npm源间切换: npm install nrm -g nrm ls nrm use taobao //切换不同的镜像源 npm install cnpm -g //安装cnpm工具
lemooljiang
starnote
7y
RE: Vue.js实战笔记
Vue Cli 1.使用cnpm, 注册为国内的镜像,使用cnpm代替npm npm install -g cnpm --registry= 2.cnpm install -g @vue/cli vue --version 3.创建一个新项目 vue create hello-world //babel router vuex 选择这三项就可以了 //sass可以不选填,它是css语法的拓展 //eslink
lemooljiang
starnote
7y
RE: Vue.js实战笔记
lemooljiang
starnote
7y
RE: Vue.js实战笔记
node v12.13.0 / npm 6.12.0 /
[email protected]
/ @vue/cli 4.1.1 "dependencies": { "bootstrap": "^4.4.1", "bootstrap-vue": "^2.1.0", "core-js":
lemooljiang
starnote
7y
RE: Vue.js实战笔记
主站 Vue Cli vue api Vue详细手记 BootstrapVue mpvue(小程序) 项目布署 | 网站图标svg
lemooljiang
cn-reader
7y
RE: 医院复查
大伟兄要多锻炼啊!
← Latest
Older →