欢迎来到Felix的博客

雨恨云愁,江南依旧称佳丽。水村渔市。一缕孤烟细。天际征鸿,遥认行如缀。平生事。此时凝睇。谁会凭阑意
返回顶部
摘要: 工程的结构 知识点 webpack模板生成的工程结构 官网 http://vuejs-templates.github.io/webpack/ webpack模板工程 build webpack设置文件 config 工程设置文件 src 源文件夹 static 静态文件夹(编译时直接拷贝至发布文件 阅读全文
posted @ 2021-01-19 09:42 felixtester 阅读(41) 评论(0) 推荐(0)
摘要: 组件的结构 知识点 vue命令行开发模式为我们带来的组件开发方式。 组件文件夹 所有的组件都被统一放在工程中的组件文件夹中。 {myproject}/src/components/* 组件格式 template:组件html内容 script:组件js脚本(ES6) style:组件css样式单 实 阅读全文
posted @ 2021-01-18 19:38 felixtester 阅读(55) 评论(0) 推荐(0)
摘要: 自定义css样式 知识点 定义属于自己的样式单文件my.css 实战演习 $ cd assets $ nano my.css ... .myclass1 { color: red; border: 1px solid blue; } ... $ cd ../ $ nano App.vue ... # 阅读全文
posted @ 2021-01-18 19:37 felixtester 阅读(73) 评论(0) 推荐(0)
摘要: 使用Ajax库-axios 知识点 为网页增加远程数据存取能力(Ajax) HTTP库axios(浏览器 or Node.js) axios:Promise based HTTP client for the browser and node.js https://github.com/axios/ 阅读全文
posted @ 2021-01-18 19:36 felixtester 阅读(91) 评论(0) 推荐(0)
摘要: webpack模板工程 知识点 建立webpack模板工程 官网 http://vuejs-templates.github.io/webpack/ 实战演习 $ vue init webpack myweb $ cd myweb $ npm run dev $ npm run build $ co 阅读全文
posted @ 2021-01-18 19:34 felixtester 阅读(62) 评论(0) 推荐(0)
摘要: 命令行安装 知识点 vue命令工具安装 官网 https://github.com/vuejs/vue-cli 实战演习 #最新版本确认 $ npm show vue-cli $ [sudo] npm install -g vue-cli@2.9.3 #安装版本确认 $ vue -V #命令帮助 $ 阅读全文
posted @ 2021-01-18 19:26 felixtester 阅读(68) 评论(0) 推荐(0)
摘要: 组件:组合slot 知识点 slot命名 slot命名 在子组件中通过为多个slot进行命名,来接受父组件的不同内容的数据。 综合例 <div id="myApp"> <nba-all-stars c="奥尼尔" pf="加内特"> <span slot="sf">皮尔斯</span> <span 阅读全文
posted @ 2021-01-18 19:21 felixtester 阅读(62) 评论(0) 推荐(0)
摘要: 组件:slot插槽 知识点 slot slot slot是父组件与子组件的通讯方式,可以将父组件的内容显示在子组件当中。 综合例 <div id="myApp"> <say-to pname="koma"> 你的视频做的太差了。 </say-to> <say-to pname="mike"> 你千万 阅读全文
posted @ 2021-01-18 19:13 felixtester 阅读(55) 评论(0) 推荐(0)
摘要: 组件:事件传递 知识点 v-on $emit v-on 侦听组件事件,当组件触发事件后进行事件处理。 $emit 触发事件,并将数据提交给事件侦听者。 综合例 <div id="myApp"> <h1>人生加法</h1> <add-method :a="6" :b="12" v-on:add_eve 阅读全文
posted @ 2021-01-18 18:48 felixtester 阅读(77) 评论(0) 推荐(0)
摘要: 组件:参数验证 知识点 props:组件参数验证语法 组件的数据 为组件中接受到的变量进行逻辑验证。 综合例 <div id="myApp"> <h1>身世之谜</h1> <show-member-info name="koma" :age="25" :detail="{address:'earth 阅读全文
posted @ 2021-01-18 18:46 felixtester 阅读(72) 评论(0) 推荐(0)