当前位置: 首页 > news >正文

商洛 网站建设个人网站网页首页

商洛 网站建设,个人网站网页首页,安卓手机怎么做网站,罗琳做的网站实现的效果图&#xff1a; 切换选项卡显示不同的内容&#xff0c;把这个选项卡做成了一个组件&#xff0c;需要的自取。 // 组件名为 trapezoidalTab <template> <view class"pd24"><view class"nav"><!-- 左侧 --><view cla…

实现的效果图:

切换选项卡显示不同的内容,把这个选项卡做成了一个组件,需要的自取。

// 组件名为 trapezoidalTab
<template>  <view class="pd24"><view class="nav"><!-- 左侧 --><view class="item" :class="{ active: activeIndex === 0 }" @click="changeTab(0)"> <view :class=" activeIndex === 0 ? 'activeTxt black' : 'itemTxt' ">{{leftLabel}}</view></view><!-- 右侧 --><view class="item" :class="{ active: activeIndex === 1 }"  @click="changeTab(1)"> <view :class="activeIndex == 1 ? 'activeTxt black' : 'itemTxt' ">{{rightLabel}}</view></view></view> <view class="content"><view v-if='activeIndex === 0'><slot name="left"></slot></view><view v-if='activeIndex === 1'><slot name="right"></slot></view></view></view> 
</template>  <script setup> import {ref,defineProps,defineEmits,} from 'vue'const props = defineProps({leftLabel: {type: String,default: '到店取'},rightLabel: {type: String,default: '直达送'},activeIndex: {type: Number,default: 0},})const emit = defineEmits(['changeTab'])const changeTab=(val)=> {emit('changeTab',val) }  
</script>  <style lang="scss" scoped>.nav{display: flex;align-items: flex-end;}.nav .item{flex: 1;height: 80rpx;background: #E6E6E6;border-radius: 10rpx 10rpx 0 0;position: relative;list-style: none;}.nav .item.active{height: 96rpx;background: #FFF;}.nav .item:first-child:before,  .nav .item:last-child:before {  content: '';  display: none;  width: 20rpx;  height: 100%;  background: #FFF;  position: absolute;  top: 0;  z-index: 10;  }  .nav .item:first-child:before {  right: -10rpx;  border-radius: 0 10rpx 0 0;  transform: skew(10deg);  }  .nav .item:last-child:before {  left: -10rpx;  border-radius: 10rpx 0 0 0;  transform: skew(-10deg);  }  .nav .item.active:first-child:before,  .nav .item.active:last-child:before {  display: block;  }.itemTxt{height: 80rpx;text-align: center;line-height: 80rpx;font-weight: 500;font-size: 28rpx;color: rgba(0,0,0,0.4);}.activeTxt{text-align: center;height: 96rpx;line-height: 96rpx;font-weight: bold;font-size: 32rpx;}.content{width: 100%;background: #fff;}
</style>

使用组件:

<trapezoidal-tab @changeTab="changeTab" :activeIndex='activeIndex'><template v-slot:left><view>左边部分内容</view></template><template v-slot:right><view>右边部分内容</view></template>
</trapezoidal-tab>const activeIndex = ref(0) //tab选项卡 0:到店取 1:直达送
// 切换tab选项卡
const changeTab =(val)=>{activeIndex.value = val
}

http://www.dinnco.com/news/36392.html

相关文章:

  • 清溪网站建设公司cms建站系统
  • 安徽淮北做网站的公司有哪些淘宝运营一般要学多久
  • 1网站建设公司百度站长工具seo综合查询
  • wordpress付费主题windows优化大师怎么使用
  • 马鞍山做网站的公司站牛网是做什么的
  • 外语网站建设seo网站监测
  • 网站建设维护保密协议广西seo经理
  • 微信订阅号做微网站免费的外贸b2b网站
  • 网站怎样续费广告语
  • 邯郸网站设计应搜韦欣cidun8上词百度百科官网入口
  • 做汽车价格的网站西安seo阳建
  • 兰州app定制开发seo优化课程
  • 安阳县面积东莞网络营销优化
  • 政府网站建设内容规划seo推广专员
  • 合肥专业网站建设今天实时热搜榜排名
  • 网站建设找谁做长尾关键词搜索
  • 网站开发者营业推广策划
  • 凡科网可以免费做网站吗域名注册查询入口
  • 汉口专业网站推广公司seo建站公司
  • 一级a做爰片365网站免费网站排名优化在线
  • 郑州做旅游网站东莞seo优化排名
  • 手机网站建设定制南京seo圈子
  • 猪八戒网做网站怎么样长沙seo优化排名
  • 亳州是网站建设淘宝运营培训班哪里有
  • 做最好的色书网站微信推广怎么做
  • 门户网站策划方案app推广引流方法
  • 自己做的网站显示iis7长春百度seo公司
  • 网站改版引导优化怎么做
  • xampp做网站百度站长提交
  • 温州市平阳县建设局网站中国职业技能培训中心官网