# Vue-Travel **Repository Path**: lisa_zhu2012/Vue-Travel ## Basic Information - **Project Name**: Vue-Travel - **Description**: 慕课网imooc 旅游demo - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-10-15 - **Last Updated**: 2020-12-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Vue-Travel #### 项目介绍 慕课网imooc 旅游demo #### 软件架构 软件架构说明 CSS预处理工具:stylus stylus-loader -D 字体图标-阿里图标:iconfont 轮播图工具swiper:vue-awesome-swiper@2.6.7 城市列表滚动插件better-scroll 状态管理工具 vuex #### 安装教程 1. git clone xxxx 2. npm install 3. npm run dev #### 使用说明 1. 如果浏览器的手机模拟器不能点击的时候,切换一下模拟器就会好用 2. xxxx 3. xxxx #### 知识点注意 1. ``` ellipsis() overflow: hidden white-space: nowrap text-overflow: ellipsis min-width: 0 /* 宽度内容溢出技巧 */ ``` 2. css 点击区域布局尽量大;布局注意内容,使用ellipsis防止溢出 3. network-online 可以变更3G 2G 网速 4. 样式:.home-swiper轮播高度比例布局 ``` ``` 5. ``` 轮播图更改样式 穿透 >>> .home-swiper >>> .swiper-pagination-bullet-active background: #ffffff ``` 6. 一维数组通过计算属性转换成二维数组 ``` computed: { pages() { const pages = [] this.iconList.forEach((item, index) => { // 项,下标 const page = Math.floor(index / 8) // 0 1 2 3 4 5 6 7 8 9 向下取整数 if (!pages[page]) { // page = 0 page = 0 pages[page] = [] } pages[page].push(item) // pages[0] item1 pages[0] += item2 }) return pages } } ``` 7. static 里面的内容可以直接访问 8. .gitignore文件夹中添加static/mock 这个文件夹就不会添加到git仓库 9. ``` better-scroll