当前位置:网站首页>5. Use of ly tab plug-in of header component
5. Use of ly tab plug-in of header component
2022-07-01 13:15:00 【Justion_】
components Under the new home Folder
add to header.vue Components
<template>
<header>
<h1> Tea seven nets </h1>
<div class="search">
<i class="iconfont icon-RectangleCopy"></i>
<span> Guess you like </span>
</div>
<div class="kufu">
<i class="iconfont icon-yonghu"></i>
</div>
</header>
</template>
<script>
export default {};
</script>
<style scoped>
header {
display: flex;
justify-content: space-around;
align-items: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 1.2267rem;
background-color: #4ac23f;
}
header h1 {
display: flex;
font-size: 0.6267rem;
color: #fff;
padding: 0 0.1rem;
align-items: center;
height: 1.173333rem;
}
header h1 img {
width: 100%;
height: 100%;
}
.search {
display: flex;
align-items: center;
width: 6.56rem;
height: 0.8rem;
background-color: #fff;
border-radius: 12px;
}
.search i {
padding: 0 0.16rem;
color: #ccc;
font-size: 0.7533rem;
}
.search span {
padding: 0 0.06rem;
color: #ccc;
font-size: 0.4533rem;
}
.kufu i {
font-size: 0.76rem;
color: #fff;
}
</style>
Ly-tab A touchable slide for the mobile end has a rebound effect and can be reused Vue Components install npm i ly-tab -S
introduce
import Vue from 'vue' import LyTab from 'ly-tab' Vue.use(LyTab) // Then it can be used globally
stay home Page usage
<template>
<div class="home">
<Tabbar />
<Header />
<ly-tab v-model="selectedId" :items="items" :options="options"> </ly-tab>
</div>
</template>
<script>
import Tabbar from "@/components/common/Tabbar.vue";
import Header from "@/components/home/Header.vue";
export default {
components: {
Tabbar,
Header,
},
name: "Home",
data() {
return {
selectedId: 0,
items: [
{ label: " home page " },
{ label: " recommend " },
{ label: "Android" },
{ label: " front end " },
{ label: " Back end " },
{ label: "iOS" },
{ label: " product " },
{ label: " Artificial intelligence " },
{ label: " Design " },
],
options: {
activeColor: "#4ac23f",
// You can specify here labelKey For the field corresponding to the text in your data
},
};
},
};
</script>
<style scoped>
.ly-tab {
position: fixed;
top: 1.2rem;
left: 0;
}
::v-deep .ly-tab {
box-shadow: none;
border-bottom: none;
}
</style>
effect :
边栏推荐
- What is the future development direction of people with ordinary education, appearance and family background? The career planning after 00 has been made clear
- Simple two ball loading
- nexus搭建npm依赖私库
- Ustime wrote a bug
- Application of 5g industrial gateway in scientific and technological overload control; off-site joint law enforcement for over limit, overweight and overspeed
- MySQL报错1040Too many connections的原因以及解决方案
- How to count the status of network sockets?
- 【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
- Sharing with the best paper winner of CV Summit: how is a good paper refined?
- Report on the current situation and development trend of bidirectional polypropylene composite film industry in the world and China Ⓟ 2022 ~ 2028
猜你喜欢
北斗通信模块 北斗gps模块 北斗通信终端DTU
华为HMS Core携手超图为三维GIS注入新动能
我选的热门专业,四年后成了“天坑”
Shell script imports stored procedures into the database
Detailed explanation of OSPF LSA of routing Foundation
Manage nodejs with NVM (downgrade the high version to the low version)
【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
Fiori 应用通过 Adaptation Project 的增强方式分享
软件测试中功能测试流程
Svg diamond style code
随机推荐
【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
Mysql间隙锁
VM virtual machine configuration dynamic IP and static IP access
Feign & Eureka & Zuul & Hystrix 流程
Research Report on China's software outsourcing industry investment strategy and the 14th five year plan Ⓡ 2022 ~ 2028
Three questions about scientific entrepreneurship: timing, pain points and important decisions
Example code of second kill based on MySQL optimistic lock
SVG钻石样式代码
Redis exploration: cache breakdown, cache avalanche, cache penetration
Sharing with the best paper winner of CV Summit: how is a good paper refined?
Wang Xing's infinite game ushers in the "ultimate" battle
SQLAlchemy在删除有外键约束的记录时,外键约束未起作用,何解?
香港科技大学李泽湘教授:我错了,为什么工程意识比上最好的大学都重要?
不同的测试技术区分
啟動solr報錯The stack size specified is too small,Specify at least 328k
波浪动画彩色五角星loader加载js特效
leetcode 322. Coin Change 零钱兑换(中等)
学历、长相、家境普通的人,未来的发展方向是什么?00后的职业规划都已经整得明明白白......
游戏公会在去中心化游戏中的未来
王兴的无限游戏迎来“终极”一战