## Head.vue
头部搜索框组件
```
<template>
<div class="head">
<i class="iconfont icon-jiantouarrow487"></i>
<div class="search">
<i class="iconfont icon-sousuo"></i>
<span>输入游玩的景点和城市</span>
</div>
<div class="city">城市</div>
</div>
</template>
<script>
export default {
name: "HomeHead"
};
</script>
<style lang\="scss" scoped>
.head {
height: 130px;
padding: 0 30px;
display: flex;
align-items: center;
background: rgb(2, 188, 213);
i {
font-size: 55px;
margin-right: 30px;
}
.search {
display: flex;
align-items: center;
padding: 0 10px;
border-radius: 20px;
width: 450px;
height: 100px;
background: #fff;
color: #ccc;
margin-right: 30px;
}
.icon-jiantouarrow487 {
color: #fff;
}
.city {
color: #fff;
position: relative;
}
.city::before {
content: "";
position: absolute;
z-index: 100;
right: -30px;
top: 20px;
display: block;
width: 0;
height: 0;
border: 10px solid transparent;
border-top-color: #fff;
}
}
</style>
```
- vs code 所需插件
- 新建项目基础配置
- 新项目初始化
- 项目打包上传
- 适配
- vue-vw
- vue-rem
- 基础
- 跳转
- 循环
- 样式
- 组件
- 子组件自定义事件向父组件传参
- 兄弟组件之间传参(含vuex)
- 实例:实现子组件word、list之间的参数传递
- 父子组件
- vuex的使用
- 精简版(不经过action)
- 组件实例(axios+http)
- axios读取网络数据
- MovieItem组件
- swiper
- better-scroll
- position:fixed搭配使用
- 数据绑定
- 计算属性
- 计算属性(computed)与监听属性(watch)搭配使用
- 侦听
- 动画
- 原理
- 使用iconfont
- 雪碧图
- 插槽
- @import引入外部样式
- 路径配置
- ref属性
- 显示隐藏的控制
- 生命周期
- 数据请求
- vuex
- 小效果
- 1.下滑顶部标题显示
- 2.在页面初始时加入动画效果
- 小项目
- Vue搜索功能
- Vue电影数据获取渲染
- Vue-travel
- main.js
- HTTP.js
- Head.vue
- swiper.js
- Home.vue
- 小技巧
- 1.阻止双击页面图片放大
- 2.缓存设置
- 3.跳转页面后从顶部开始显示
- 4.打包
- 5.使用store.js中的数据
- 使用库
- vant
- vant-list
- weex(实现vue代码编写Android软件)
- 1.启动项目
- 2.搭配Android studio
- vuex
- 1.State
- 2.Getter
- 3.Mutation
- 注
- 使用echarts
- echarts更换主题
