nervjs / taro-ui Goto Github PK
View Code? Open in Web Editor NEW一款基于 Taro 框架开发的多端 UI 组件库
Home Page: https://taro-ui.taro.zone
License: MIT License
一款基于 Taro 框架开发的多端 UI 组件库
Home Page: https://taro-ui.taro.zone
License: MIT License
npm 或 yarn 安装 taro-ui 后,node_modules 目录没有 taro-ui 的声明文件,也无法通过 @types/taro-ui 安装
数据
{"code":1,"message":"success","data":{"total":6,"list":[{"id":1,"factory_name":"ABC公司","terminal_no":"ZD70","type_name":"D机器","model_name":"QZJ","vin":"00000000000000001","serial_no":"CAR01","sale_status":"00"},{"id":2,"factory_name":"ABC公司","type_name":"A机器","model_name":"PDJ","vin":"00000000000000002","serial_no":"CAR02","sale_status":"00"},{"id":3,"factory_name":"ABC公司","type_name":"C机器","model_name":"TTJ","vin":"00000000000000003","serial_no":"CAR03","sale_status":"00"},{"id":4,"factory_name":"ABC公司","type_name":"E机器","model_name":"ZZJ","vin":"00000000000000004","serial_no":"CAR04","sale_status":"00"},{"id":5,"factory_name":"ABC公司","type_name":"B机器","model_name":"YLJ","vin":"00000000000000005","serial_no":"CAR05","sale_status":"00"},{"id":6,"factory_name":"ABC公司","type_name":"F机器","model_name":"WJJ","vin":"00000000000000006","serial_no":"CAR06","sale_status":"00"}],"page_num":1,"page_size":6,"size":6,"start_row":0,"end_row":5,"pages":1,"pre_page":0,"next_page":0,"is_first_page":true,"is_last_page":true,"has_previous_page":false,"has_next_page":false,"navigate_pages":8,"navigatepage_nums":[1],"navigate_first_page":1,"navigate_last_page":1,"first_page":1,"last_page":1}}
赋值部分是在Taro.request的then里面,和渲染部分的代码
https://user-images.githubusercontent.com/22185826/44966653-0979ad80-af6f-11e8-8707-c97826f54acf.png
https://user-images.githubusercontent.com/22185826/44966755-a1779700-af6f-11e8-8253-5b3f790fc6c5.png
taro-ui: 1.1.0
页数和翻页行为正确
渲染部分,total没进去,结果整个都不正确了。因为total问题,换页的方法没法继续了,不知道是不是采坑了
弹框中间的边框感觉不是 1px ,过渡效果感觉一股山寨气息,不如不要过渡效果了
近期会上吧?
缺乏常用的选择器组件,比如日期,条件选择等
AtAvatar控件如何兼容taro的
taro里image属性无法传入 JSX 元素
滑动弹出层 底层页面会滚动
eg: 132 3345 4597
eg: 13233454597
TypeError: Cannot read property 'replace' of null
at buildSingleComponent (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1330:37)
at buildSingleComponent (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1388:20)
at buildSingleComponent (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1388:20)
at Promise.all.componentPathList.map.componentObj (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1295:60)
at Array.map (<anonymous>)
at buildDepComponents (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1295:40)
at buildSinglePage (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1136:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
at assertPath (path.js:39:11)
at Object.relative (path.js:1173:5)
at pageDepComponents.forEach.depComponent (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1150:64)
at Array.forEach (<anonymous>)
at componentMap.forEach.component (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1144:31)
at Array.forEach (<anonymous>)
at realComponentsPathList.forEach.component (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1143:24)
at Array.forEach (<anonymous>)
at buildSinglePage (/Users/kenberkeley/Desktop/my-project/node_modules/_@[email protected]@@tarojs/cli/src/weapp.js:1140:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
目前在控件上设置className、style都无效,
希望能接受自定义的style覆盖控件默认值
大家好,
Taro 作为开源项目已经有一段时间了,在开源期间我们积极响应各路开发者的疑问与反馈,持续不断打磨 Taro ,希望 Taro 能更加完善,帮助更多开发者提升开发效率,改善开发体验。但在庞大的开发工作量下我们深感自身能力的不足,不能很好地为大家提供 Demo、案例供大家学习,同时也没有足够的精力去适配开发一些第三方库来让开发工作更加美好。这时候我们深刻觉得社区力量的重要性,所以我们开启这一篇 isuue,强烈希望各路大佬们能一起贡献优秀的 Demo 与案例,开发第三方库的适配,从而让 Taro 更加健壮,更加好用。(by Taro 之父)
Taro UI 是为 Taro 量身定制的一套多端 UI 组件库,目前离成熟的组件库还有一些距离,我们会不断地迭代新版本,例如完善基础组件库、增加业务组件等。社区的活力是我们持续迭代的动力❤️
"taro-ui": "^1.0.1",
问题描述
https://nervjs.github.io/taro-ui/#/docs/tabs
Tabs 标签页组件的tabList数组有多个元素时,会全部显示,没有可横向滑动效果。
且title文字多时,文字无法完整显示,后面文本会被遮挡。
复现步骤
[或者可以直接贴源代码,能贴文字就不要截图]
<View className="tabWrap">
{category[0] && (
<View>
<AtTabs
current={topIndex}
tabList={category}
onClick={this.tabChange.bind(this, category)}
/>
{!!category[topIndex] &&
!!category[topIndex].childs && (
<AtTabs
current={secondIndex}
tabList={category[topIndex].childs}
onClick={this.childTabChange.bind(
this,
category[topIndex].childs
)}
/>
)}
</View>
)}
</View>
期望行为
每个tab应设置一个最低宽度,且tab宽度因由内容文本撑开,当长度超出可视区域宽度时,应可横向滑动。
taro-ui是凹凸实验室的产品吗
希望Drawer能支持自定义内容区
建议 Toast 和 Modal 提供 api 调用版本,组件的方式有些繁琐。
希望AtInput能支持onClick事件,这样的话配合editable就可以实现像选择器那样的输入实现了。
用户输入数字还要切换键盘
如题,taro-ui在小程序中怎么自定义样式。
node v8.11.4 taro: v1.0.0-beta.23 taro-ui: 1.0.1
希望更新内容数据的时候, AtNoticebar视图变化
AtNoticebar只显示初始值, 视图不会随数据变化
如果可以在已有的小程序项目中引用taro-ui,建议更新一下相关使用文档
最近开始使用taro开始尝试写小程序,看到taro-ui,眼前一亮,但是似乎没看见自定义主题的选项?后期是否考虑加入此功能,如果考虑,大概何时会加入?
进入 操作反馈-Toast轻提示,点击添加遮罩层Toast后,其他按钮都点击不了
例如如下 style 无效
<AtButton style="color: red">按钮文案</AtButton>
import Taro, {Component} from '@tarojs/taro'
import {View, Form} from '@tarojs/components'
import { AtInput, AtForm } from 'taro-ui'
import './withdraw.scss'
import ajax from '../../../utils/ajax'
export default class Withdraw extends Component {
constructor(props) {
super(props);
this.state = {}
}
config = {
navigationBarTitleText: '提现'
}
componentWillMount() {
}
onShareAppMessage() {
}
onPullDownRefresh() {
this.componentWillMount();
}
render() {
return (
<View className='withdraw'>
<AtForm>
<AtInput name='name' title='姓名' maxlength={5} />
<AtInput name='tel' title='手机号码' maxlength={11} />
<AtInput name='id_card' title='身份证号' maxlength={18} />
<AtInput name='bank_card_number' title='银行卡号' maxlength={11} />
</AtForm>
</View>
)
}
}
Node: v8.11.2
Taro: v1.0.0-beta.22
Taro-UI: v1.1.0
正常运行
module "npm/taro-ui/dist/weapp/components/icon/index.js" is not defined
Error: module "npm/taro-ui/dist/weapp/components/icon/index.js" is not defined
Component is not found in path "npm/taro-ui/dist/weapp/components/icon/index" (using by "npm/taro-ui/dist/weapp/components/input/index")
Error: Component is not found in path "npm/taro-ui/dist/weapp/components/icon/index" (using by "npm/taro-ui/dist/weapp/components/input/index")
tabs栏的内容比较多,初始化页面的时候可能会初始化隐藏的tab项,是不是可以支持自动滑动到默认选中的项
类似于 Ant Design
的 滚动加载 - 列表 List。
能否建个交流群,这样讨论问题也方便
rt:怎么覆盖样式
parent 组件的 cardClick 没有被调用。
parent 和 child 组件代码 请参见 NervJS/taro#563
taro 已经修正了这个bug,taro-ui 这边是否需要更新?
node: v8.9.3
taro:1.0.0-beta.25
taro-ui: 1.1.5
npm run build:h5 -- --watch
[email protected] build:h5 D:\Program Files\nodejs\progrem\taro\myApp
taro build --type h5 "--watch"
� Taro v1.0.0-beta.18
开始编译项目 myApp
创建 发现文件 src\app.js
创建 发现文件 src\app.scss
创建 发现文件 src\index.html
创建 发现文件 src\actions\counter.js
创建 发现文件 src\constants\counter.js
创建 发现文件 src\reducers\counter.js
创建 发现文件 src\reducers\index.js
创建 发现文件 src\store\index.js
创建 发现文件 src\pages\index\index.js
创建 发现文件 src\pages\index\index.scss
� Compile failed!
./.temp/app.js
Module build failed (from ./node_modules/_babel-loader@7.1.5@babel-loader/lib/in
dex.js):
Error: Couldn't find preset "env" relative to directory "D:\Program Files\node
js\progrem\taro\myApp\.temp"
at Array.map ()
ℹ️ Listening at http://10.1.1.108:8080/
ℹ️ Listening at http://localhost:8080/
监听文件修改中...
按照文档,初始化项目之后(启用Redux),再npm install taro-ui --save, 会报以下错误。 很抱歉,一直做UI设计,前端新手,不知道是不是我哪步漏掉了。 即便我继续按照提示,npm install nervjs --save, 同样的方式安装redux, 也一直还是报以下错误。
`npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.2.16 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.2.17 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.2.17 but none is installed. You must install peer dependencies yourself.
npm WARN @tarojs/[email protected] requires a peer of nervjs@^1.2.17 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /Users/.....PROJECT..../node_modules/.bin/lessc
npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/....PROJECT../node_modules/.bin/lessc: is outside /Users/...PROJECT.../node_modules/less and not a link
npm ERR! File exists: /Users/......PROJECT.../node_modules/.bin/lessc
npm ERR! Move it away, and try again.`
初始化项目时,我启用的是SASS, 不清楚为什么会有这个错误: npm ERR! path /Users/.....PROJECT..../node_modules/.bin/lessc
node v10.8.0
npm v6.2.0
Debug日志在这里: https://www.dropbox.com/s/l7xmjoqsbout2z9/2018-08-28T08_35_30_600Z-debug.log.txt?dl=0
感谢!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.