![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
Miracleeeeeeee
这个作者很懒,什么都没留下…
展开
-
Vue-实例化Vue对象、数据和方法、属性绑定
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="https://unpkg.com/vue"></script></head...原创 2019-05-14 11:10:11 · 1150 阅读 · 0 评论 -
VueCil-生命周期
methods:{ beforeCreate:function () { alert("组件实例化之前执行的函数") }, created:function () { alert("组件实例化完毕,但页面还未更新") }, beforeMount:function () { aler...原创 2019-05-15 11:04:56 · 221 阅读 · 0 评论 -
VueCil-传值和传引用
传值:string number boolean传引用:array object注意:传引用就类似与C的传值和传址 比如传递个array 然后删除一个元素其他地方调用array的也会被删除例子:app.vue<template> <div id="app"> <app-header v-bind:title="title"></ap...原创 2019-05-15 10:36:38 · 375 阅读 · 0 评论 -
VueCil-属性传值(父组件向子组件传值)
在Vue当中传值有两种形式: 1.父组件向子组件传值 2.子组件向父组件传值父组件向子组件传值app.vue<template> <div id="app"> <app-header></app-header> <!--通过父组件传值需要找到两个的契合点然后给个属性绑定上去--> <!--然后...原创 2019-05-15 10:24:56 · 197 阅读 · 0 评论 -
VueCil-实战demo(组件嵌套)
app.vue<template> <div id="app"> <app-header></app-header> <users></users> <app-footer></app-footer> </div></template>&l...原创 2019-05-15 10:24:42 · 207 阅读 · 0 评论 -
VueCil-组件css作用域
app.vue//给style后面加个scoped范围就好了<style scoped>h1{ color: purple;}</style>User.vue<style scoped>h1{ color: green;}</style>原创 2019-05-14 23:47:37 · 111 阅读 · 0 评论 -
VueCil- 组件嵌套局部组件和全局组件使用
main.jsimport Vue from 'vue'import App from './App.vue'//import Users from "./components/Users";Vue.config.productionTip = false;//全局注册组件//Vue.component("users",Users);new Vue({ render: h =...原创 2019-05-14 23:47:45 · 569 阅读 · 0 评论 -
Vue-脚手架SRC文件流程
index.html->main.js->App.vue原创 2019-05-14 22:58:30 · 459 阅读 · 0 评论 -
Vue-初始组件应用
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 20:22:15 · 98 阅读 · 0 评论 -
Vue-多实例操作
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 19:55:34 · 500 阅读 · 1 评论 -
Vue-for遍历
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 18:47:58 · 169 阅读 · 0 评论 -
Vue-指令v-if
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 18:09:55 · 641 阅读 · 0 评论 -
Vue-动态绑定CSS样式
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 16:28:05 · 450 阅读 · 0 评论 -
Vue-计算属性computed
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 15:27:22 · 75 阅读 · 0 评论 -
Vue-键盘事件、双向数据绑定
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 15:15:22 · 146 阅读 · 0 评论 -
Vue-事件、事件修饰符
index.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title> <script src=...原创 2019-05-14 14:55:47 · 74 阅读 · 0 评论 -
VueCil-路由和HTTP
安装路由 npm install vue-router --save-dev安装Http请求 npm install vue-resource --save-devmain.js// The Vue build version to load with the `import` command// (runtime-only or standalone) has been set in ...原创 2019-05-15 12:09:34 · 181 阅读 · 0 评论