taro swiper & scroll tabs

https://taro-docs.jd.com/taro/docs/components/viewContainer/swiper.html

https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html




Swiper 滑动视图容器

https://taro-ui.jd.com/#/docs/swiper


import Taro, { Component } from '@tarojs/taro'
// 引入 Swiper, SwiperItem 组件
import { Swiper, SwiperItem } from '@tarojs/components'
class App extends Component {
render () {
return (
<Swiper
className='test-h'
indicatorColor='#999'
indicatorActiveColor='#333'
vertical
circular
indicatorDots
autoplay>
<SwiperItem>
<View className='demo-text-1'>1</View>
</SwiperItem>
<SwiperItem>
<View className='demo-text-2'>2</View>
</SwiperItem>
<SwiperItem>
<View className='demo-text-3'>3</View>
</SwiperItem>
</Swiper>
)
}
}

tabs

https://taro-ui.jd.com/#/docs/tabs

import Taro from '@tarojs/taro'
import { View } from '@tarojs/components'
import { AtTabs, AtTabsPane } from 'taro-ui'
export default class Index extends Taro.Component {
constructor () {
super(...arguments)
this.state = {
current: 0,
}
}
handleClick (value) {
this.setState({
current: value
})
}
render () {
const tabList = [{ title: '标签页1' }, { title: '标签页2' }, { title: '标签页3' }]
return (
<AtTabs current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
<AtTabsPane current={this.state.current} index={0} >
<View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;' >标签页一的内容</View>
</AtTabsPane>
<AtTabsPane current={this.state.current} index={1}>
<View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</View>
</AtTabsPane>
<AtTabsPane current={this.state.current} index={2}>
<View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页三的内容</View>
</AtTabsPane>
</AtTabs>
)
}
}

xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


taro swiper & scroll tabs的更多相关文章

  1. taro scroll tabs 滚动标签 切换

    taro scroll tabs 滚动标签 切换 https://www.cnblogs.com/lml-lml/p/10954069.html https://developers.weixin.q ...

  2. scroll tabs

    scroll tabs https://github.com/NervJS/taro-ui/blob/dev/src/components/tabs/index.tsx https://github. ...

  3. Taro -- Swiper的图片由小变大3d轮播效果

    Swiper的图片由小变大3d轮播效果 this.state = ({ nowIdx:, swiperH:'', imgList:[ {img:'../../assets/12.jpg'}, {img ...

  4. swiper tabs综合示例

    html部分: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <m ...

  5. swiper快速切换插件(两个综合案例源码)

    swiper快速切换插件 swiper.js自己去官网下载哈.先来一个tab切换案例: demo.html <!doctype html> <html> <head> ...

  6. 移动端滑动效果 swiper 4.0.7

    <!DOCTYPE html><html lang="en"><head> <meta charset="utf-8" ...

  7. 优雅的swiper实例

    swiper实例 <!DOCTYPE html> <html lang="en"> <head> <meta name="vie ...

  8. TabbedPaneDemo

    package swing.tabbedpane; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import ja ...

  9. Swing-选项卡面板JTabbedPane-入门

    注:非原创,内容源自<Swing 的选项卡面板>,笔者做了少量修改. 选项卡面板是一个很常用的Swing组件,在window下,右击我的电脑,查看属性,就是一个典型的选修卡面板.当然还有最 ...

随机推荐

  1. 邮件解析 CNAME记录 A记录 NS记录 MX记录

    域名配置 示例发信配置请至域名 service.i-test.cn DNS服务提供商处添加TXT记录,并保持SPF记录正确,否则会无法发信.*1.所有权验证类型 主机记录 主域名 记录值 状态TXT ...

  2. Python学习【第4篇】:元组魔法

    template = "i am {name},age:{age}" v = template.format(**{"name":'xiaoxing',&quo ...

  3. JavaWeb——JSP内置对象application,JSP属性范围

    application application语法 application对象 JSP属性范围 范围的分类 page request session application pagecontext延伸 ...

  4. charles(3)charles防止30分钟自动重启

    前言 Charles是收费软件,可以免费试用30天.试用期过后,未付费的用户仍然可以继续使用,但是每次使用时间不能超过30分钟,并且启动时将会有10秒种的延时. 此时,我们只需网上找一个注册码即可 解 ...

  5. Codeforces Global Round 11【ABCD】

    比赛链接:https://codeforces.com/contest/1427 A. Avoiding Zero 题意 将 \(n\) 个数重新排列使得不存在为 \(0\) 的前缀和. 题解 计算正 ...

  6. 静态链表 Static Link List

    Static Link List 静态链表 其中上图来自http://www.cnblogs.com/rookiefly/p/3447982.html  参考: http://www.cnblogs. ...

  7. 利用github+hexo搭建的博客

    用github+hexo新建了一个博客,欢迎来访,如果想要搭建类似框架的博客,可以联系我. 新博客地址:只为自由书写的博客

  8. Codeforces Global Round 7 D1. Prefix-Suffix Palindrome (Easy version)(字符串)

    题意: 取一字符串不相交的前缀和后缀(可为空)构成最长回文串. 思路: 先从两边取对称的前后缀,之后再取余下字符串较长的回文前缀或后缀. #include <bits/stdc++.h> ...

  9. Codeforces Round #647 (Div. 2) C. Johnny and Another Rating Drop(数学)

    题目链接:https://codeforces.com/contest/1362/problem/C 题意 计算从 $0$ 到 $n$ 相邻的数二进制下共有多少位不同,考虑二进制下的前导 $0$ .( ...

  10. hdu1558 Segment set

    Problem Description A segment and all segments which are connected with it compose a segment set. Th ...