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 布局.顶部导航.左侧导航等 ...
随机推荐
- 如何设计一个亿级网关(API Gateway)?
1.背景 1.1 什么是API网关 API网关可以看做系统与外界联通的入口,我们可以在网关进行处理一些非业务逻辑的逻辑,比如权限验证,监控,缓存,请求路由等等. 1.2 为什么需要API网关 RPC协 ...
- 洛谷P4981
Description 给定 n 个点,组成一棵树,有多少种组合方法: Analysis 首先,结合题目简化意义和这句话 最多可能存在多少种父子关系 我们可以知道当且仅当有至少一个节点的儿子不同时称他 ...
- 浅谈JavaScript异步编程
单线程模式 我们知道JS的执行环境是单线程的,是因为JS语言最早是运行在浏览器端的语言,目的是为了实现页面上的动态交互.实现动态交互的核心就是DOM操作,因此决定了JS必须是单线程模式工作.我们来假设 ...
- Java8种排序算法学习
冒泡排序 public class test { public static void main(String[] args) { // TODO Auto-generated method stub ...
- Docker运行Mysql,Redis,SpringBoot项目
Docker运行Mysql,Redis,SpringBoot项目 1.docker运行mysql 1.1拉取镜像 1.2启动容器 1.3进入容器 1.4开启mysql 1.5设置远程连接 1.6查看版 ...
- 利用powershell隐藏执行后门
运行后门时,有些后门不能中断.双击运行这种后门会产生一个黑框. 一条命令就能使其在后台执行 命令解释: start-process启动一个进程 -windowstyle窗口样式 hidden隐藏
- python--基础2 (数据类型及应用)
资源池 链接:https://pan.baidu.com/s/1OGq0GaVcAuYEk4F71v0RWw 提取码:h2sd python数据类型 字符串 列表 字典 数字(整数) 数字(浮点数) ...
- 【疑】接入交换机lacp port-channel连接核心突然中断
现状: 职场网络架构为接入交换机2个端口通过lacp协议的active模式组成port-channel上联到核心. 具体配置如下 接入: 核心: 故障现象: zabbix监控到核心交换机对应该接入交换 ...
- PHP-文件、目录相关操作
PHP-文件.目录相关操作 一 目录操作(Directory 函数允许获得关于目录及其内容的信息) 相关函数: 函数 描述 chdir() 改变当前的目录. chroot() 改变根目录. clos ...
- DolphinScheduler1.3.2源码分析(一)看源码前先把疑问列出来
1.谈谈如何看源码 个人觉得拿到一个开源的项目,首先要先使用一下. 如果是有页面的那种,可以先把测试平台部署起来,然后到处随意点点,然后用一下最基础的功能,走一遍基础的使用流程.不用担心会把系统弄 ...