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 发布文章使用:只允许注册用户才可以访问!
taro demos & taro 组件库的更多相关文章
- Taro Next H5 跨框架组件库实践
作者:凹凸曼 - JJ Taro 是一款多端开发框架.开发者只需编写一份代码,即可生成各小程序端.H5 以及 React Native 的应用. Taro Next 近期已发布 beta 版本,全面完 ...
- Taro -- 上传图片公用组件
Taro上传图片公用组件 子组件chooseImage //component/chooseImage/index.js import Taro, { Component } from '@taroj ...
- 京东 Vue3 组件库支持小程序开发啦!
源码抢先看: https://github.com/jdf2e/nutui NutUI 3.0 官网:https://nutui.jd.com/3x/#/ 小程序多端适配 设计初衷 在跨端小程序的开发 ...
- 提升组件库通用能力 - NutUI 在线主题定制功能探索
开发背景 NutUI 作为京东风格的组件库,已具备 H5 和多端小程序开发能力.随着业务的不断发展,组件库的应用场景越来越广.在公司内外面临诸如科技.金融.物流等各多个大型团队使用时,单一的京东 AP ...
- [转载]前端——实用UI组件库
https://www.cnblogs.com/xuepei/p/7920888.html Angular UI 组件 ngx-bootstrap 是一套Bootstrap 组件 官网:https:/ ...
- [转]VUE优秀UI组件库合集
原文链接 随着SPA.前后端分离的技术架构在业界越来越流行,前端的业务复杂度也越来越高,导致前端开发者需要管理的内容,承担的职责越来越多,这一切,使得业界对前端开发方案的思考多了很多,以react.v ...
- 【转】前端——实用UI组件库
Angular UI 组件 ngx-bootstrap 是一套Bootstrap 组件 官网:https://valor-software.com/ngx-bootstrap/#/ github: h ...
- 前端——实用UI组件库
Angular UI 组件 ngx-bootstrap 是一套Bootstrap 组件 官网:https://valor-software.com/ngx-bootstrap/#/ github: h ...
- Vitepress搭建组件库文档(下)—— 组件 Demo
上文 <Vitepress搭建组件库文档(上)-- 基本配置>已经讨论了 vitepress 搭建组件库文档的基本配置,包括站点 Logo.名称.首页 home 布局.顶部导航.左侧导航等 ...
随机推荐
- WPF显示命名空间不存在对应名称
3个办法 1 切换到Release模式,再生成.生成成功后切换回Debug模式就不报错了.这是Release模式下找不到我们自定义的控件导致的报错.所以切换为Release后生成则可以解决此问题. 2 ...
- 存储型XSS
DVWA系列(二)存储型XSS https://www.imooc.com/article/284686 网络安全:存储型XSS https://blog.csdn.net/qq_41500251/a ...
- C#Process调用外部程序
前言 使用C#调用外部程序,一种是通过Process类,一种是通过命令行,本文主要说一下使用C#中的Process类调用外部程序的方式. 过程: 1. 创建Process对象 2. 配置启动选项(输入 ...
- mysqld_exporter的源码分析和定制化(单个mysqld_exporter监控多个数据库实例)
mysqld_exporter是prometheus官方提供的用于监控mysql运行状态的exporter.其相关信息可以参考:https://github.com/prometheus/mysqld ...
- netty写Echo Server & Client完整步骤教程(图文)
1.创建Maven工程 1.1 父节点的pom.xml代码(root pom文件) 1 <?xml version="1.0" encoding="UTF-8&qu ...
- 坐下坐下,基本操作(ZooKeeper 操作篇)
本文作者:HelloGitHub-老荀 Hi,这里是 HelloGitHub 推出的 HelloZooKeeper 系列,免费开源.有趣.入门级的 ZooKeeper 教程,面向有编程基础的新手. Z ...
- AcWing 216 Rainbow 的信号
题意 给定一个长度为n的序列,然后从\(1\sim N\) 这 N 个数中选取两个数\(l,r\) , 如果\(l>r\),则交换\(l,r\).把第\(l\) 个数到第\(r\)个数取出来构成 ...
- Codeforces Global Round 11 D. Unshuffling a Deck(构造/相邻逆序对)
题目链接:https://codeforces.com/contest/1427/problem/D 题意 给出一个大小为 \(n\) 的排列,每次操作可以将 \(n\) 个数分为 \(1 \sim ...
- Codeforces错题本
为什么我这么菜啊QAQ Codeforces 1364C
- Codeforces 1355 E. Restorer Distance(三分)
传送门:E - Restorer Distance 题意:给出四个数 N, A, R, M ,然后给出一个长度为N的序列.让一个数+1花费A,-1花费R,从一个大的数向一个小的数移动1花费M.问让所 ...