1、直接复制粘贴引入uniapp页面
如果缺少什么css 自己补充就好了,做个笔记,内容过少的情况,tab选项不是百分百的切换到最后一个,没想好怎么优化
<template>
<view class="page">
<!-- 顶部选卡 -->
<view class="scroll-row d-flex justify-between border-top position-fixed top-0" style="height: 80rpx;background-color: #FFFFFF;z-index: 1000;">
<view
@tap="changeTab(index)"
:class="tabIndex === index ? 'main-text-color ' : ''"
class="scroll-row-item px-3 flex-1"
style="height: 80rpx; line-height: 80rpx;"
v-for="(i, index) in tabbars"
:key="index"
>
<text class="font-md pb-1" :style="tabIndex === index ? 'border-bottom: 5rpx solid #3088ff; ' : ''">{
{
i.name }}</text>
</view>
</view>
<!-- 填充 -->
<view style="height: 80rpx;" class="w-100"></view>
<!-- 列表 -->
<scroll-view scroll-y="true" @scroll="tabScoll" :scroll-top="scrollInto" scroll-with-animation :scroll-into-view="scrollinto" :style="'height:' + scrollH + 'px;'" @scrolltolower="loadmore(index)">
<view class="scroll-box">
<view class="box1" :id="'tab'+index" v-for="(item,index) in conentist" :key="index">
<view>我是第{
{
index}}个6666</view>
<view>我是第{
{
index}}个6666</view>
<view>我是第{
{
index}}个6666</view>
<view>我是第{
{
index}}个6666</view>
<view>我是第{
{
index}