taro demos & taro 组件库
taro demos & taro 组件库
ui demo
https://github.com/qit-team/taro-yanxuan
https://github.com/fengchunsgit/taro-meituan
tarojs/components
Text, View, Image
https://www.npmjs.com/package/@tarojs/components
https://taro-docs.jd.com/taro/docs/components/viewContainer/view.html
import Taro, { Component, Config } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
export default class PageView extends Component {
constructor() {
super(...arguments)
}
render() {
return (
<View className='components-page'>
<Text>flex-direction: row 横向布局</Text>
<View className='flex-wrp' style='flex-direction:row;'>
<View className='flex-item demo-text-1'/>
<View className='flex-item demo-text-2'/>
<View className='flex-item demo-text-3'/>
</View>
<Text>flex-direction: column 纵向布局</Text>
<View className='flex-wrp' style='flex-direction:column;'>
<View className='flex-item flex-item-V demo-text-1'/>
<View className='flex-item flex-item-V demo-text-2'/>
<View className='flex-item flex-item-V demo-text-3'/>
</View>
</View>
)
}
}
taro 组件库说明
https://nervjs.github.io/taro/docs/components-desc.html
https://github.com/NervJS/taro/tree/2.x/packages/taro-components/src/components
https://github.com/NervJS/taro/blob/2.x/packages/taro-components/src/index.js
demo
import Taro, { Component, Config } from '@tarojs/taro'
import {
View,
Text,
Image,
} from '@tarojs/components'
import './index.scss'
import {
AtButton,
AtFloatLayout,
} from 'taro-ui'
const log = console.log;
export default class TicketCard extends Component {
config: Config = {
navigationBarTitleText: '立即购票'
}
constructor () {
super(...arguments)
this.state = {
current: 0,
isOpened: false,
}
}
gotoIndex () {
Taro.navigateTo({
url: '/pages/index/index',
// url: '/pages/index',
})
}
handleClose () {
this.setState({
isOpened: false,
})
}
handleOpen () {
this.setState({
isOpened: true,
})
}
componentWillMount () { }
componentDidMount () { }
componentWillUnmount () { }
componentDidShow () { }
componentDidHide () { }
render () {
return (
<View className='at-row'>
<View className='at-col at-col-12'>
<Text>TicketCard</Text>
<Image className='img' src={require('../../assets/alipay.png')} />
</View>
</View>
)
}
}
微信组件
https://developers.weixin.qq.com/miniprogram/dev/component/
Taro UI
https://github.com/NervJS/taro-ui
https://github.com/NervJS/taro-ui/blob/dev/src/index.ts
https://github.com/NervJS/taro-ui/tree/dev/src/components
Taro 框架
https://nervjs.github.io/taro/docs/tutorial.html#页面配置
Taro 规范
https://nervjs.github.io/taro/docs/spec-for-taro.html
Taro 生命周期
https://nervjs.github.io/taro/docs/state.html
Taro 函数式组件
https://nervjs.github.io/taro/docs/functional-component.html#类函数式组件
Taro 最佳实践
https://nervjs.github.io/taro/docs/best-practice.html
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
最新文章
- mac os 中类似于Linux的yum工具,或ubuntu的apt-get工具Homebrew
- 从手工测试转型web自动化测试继而转型成专门做自动化测试的学习路线。
- Charles使用问题, iOS7的http代理(http proxy)配置不生效问题
- 【Java 小实验】重写(覆写 Override)返回值类型能不能相同
- linux下getsockopt和setsockopt具体解释及測试
- T4模板demo
- Bucket Sort - leetcode [桶排序]
- python--注释
- Python任务调度模块 – APScheduler,实现定时任务
- mysql数据库保存sesison会话
- Node爬取简书首页文章
- Jenkins之定时任务
- csharp中DateTime总结-转
- Java的反射技术
- (Power Strings)sdutoj2475
- 模块讲解----json模块(跨平台的序列化与反序列化)
- java单例模式之懒汉式分析
- POJ3348:Cows——题解
- postgreSQL PL/SQL编程学习笔记(三)——游标(Cursors)
- 20145210姚思羽 《网络对抗技术》 Web安全基础实践
热门文章
- 《进击吧!Blazor!》第一章 3.页面制作
- Codeforces 1439B. Graph Subset Problem (思维,复杂度分析)
- 用友GRP-u8 SQL注入
- linux最初配置( vimrc设置 、tab键设置 inputrc、中文输入法等等)
- 2017-2018 ACM-ICPC German Collegiate Programming Contest (GCPC 2017)(9/11)
- Codeforces Round #682 (Div. 2) C. Engineer Artem (构造)
- Java 窗口 绘制图形 #1
- OkHttp Client Ignore certificate
- 001、Python数据结构
- PHP的常用函数 持续更新