当前位置:网站首页>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 :

边栏推荐
- 我花上万学带货:3天赚3元,成交靠刷单
- Flutter SQLite使用
- Tencent always takes epoll, which is annoying
- 【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
- The future of game guild in decentralized games
- Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
- Beidou communication module Beidou GPS module Beidou communication terminal DTU
- Quickly understand what the compressed list in redis is
- Sharing with the best paper winner of CV Summit: how is a good paper refined?
- Topic 2612: the real topic of the 12th provincial competition of the Blue Bridge Cup in 2021 - the least weight (enumerating and finding rules + recursion)
猜你喜欢

游戏公会在去中心化游戏中的未来

mysql统计账单信息(下):数据导入及查询

Fiori 应用通过 Adaptation Project 的增强方式分享

【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)

Use Net core access wechat official account development

What is the future development direction of people with ordinary education, appearance and family background? The career planning after 00 has been made clear
Example code of second kill based on MySQL optimistic lock

Content Audit Technology

我选的热门专业,四年后成了“天坑”

Logstash error: cannot reload pipeline, because the existing pipeline is not reloadable
随机推荐
mysql统计账单信息(下):数据导入及查询
请问flink mysql cdc 全量读取mysql某个表数据,对原始的mysql数据库有影响吗
Research Report on China's software outsourcing industry investment strategy and the 14th five year plan Ⓡ 2022 ~ 2028
王兴的无限游戏迎来“终极”一战
Fiori 应用通过 Adaptation Project 的增强方式分享
[today in history] July 1: the father of time sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world
During Oracle CDC data transmission, the CLOB type field will lose its value during update. There is a value before update, but
【开发大杀器】之Idea
波浪动画彩色五角星loader加载js特效
Have you ever encountered the problem that flynk monitors the PostgreSQL database and checkpoints cannot be used
Report on the current situation and development trend of bidirectional polypropylene composite film industry in the world and China Ⓟ 2022 ~ 2028
【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
The future of game guild in decentralized games
图灵奖得主Judea Pearl:最近值得一读的19篇因果推断论文
Who should I know when opening a stock account? Is it actually safe to open an account online?
PG basics -- Logical Structure Management (trigger)
Asp.netcore利用dynamic简化数据库访问
Machine learning - performance metrics
华为HMS Core携手超图为三维GIS注入新动能
游戏公会在去中心化游戏中的未来