jdf2e / nutui-react Goto Github PK
View Code? Open in Web Editor NEW京东风格的移动端 React 组件库 、支持多端小程序(A React UI Toolkit for Mobile Web)
Home Page: https://nutui.jd.com/react/
京东风格的移动端 React 组件库 、支持多端小程序(A React UI Toolkit for Mobile Web)
Home Page: https://nutui.jd.com/react/
请问什么时候可以支持taro?
谢谢
const refreshLoadMore = (done: () => void) => {
setTimeout(() => {
const { newValue } = props; // 假设这个newValue 是该父组件传过来的值,且中途有修改。则需要执行到第二次refreshLoadMore ,newValue 才能取到修改之后的值
const curLen = refreshList.length
for (let i = curLen; i < curLen + 10; i++) {
refreshList.push(${i}
)
}
if (refreshList.length >= 30) {
setRefreshHasMore(false)
} else {
setRefreshList([...refreshList])
}
done()
}, 500)
}
`
<div className="close-btn" onClick={() => setVisible(false)}>
解释一下,相当于关闭弹窗功能和页面的锁定class取消被分成了两个事件。导致关闭了弹窗但是消除锁定class没有生效。
辅助平面的单个字符长度显示为 2 了。
@xiaoyatong 感谢!
现在移动端react库还比较匮乏,真心希望能支持taro,reactnative
dialog弹窗组件希望增加点击弹窗本身抛出事件
`<Dialog
title="组件调用"
visible={visible1}
onOk={() => setVisible1(false)}
onCancel={() => setVisible1(false)}
onClick={()=>{}}
如果需要在弹窗内嵌入组件或其他自定义内容,可以使用组件调用的方式。
嘻嘻
example:
const [content, setContent] = useState('')
指示器的背景色无法设置。
react 在手机端的最大问题就是没有一个能打的 UI 库,这下完美了 ❤️
在原组件上进行业务组件开发时,需要继承原组件的props类型,没法直接通过
import { Icon, IconProps } from '@nutui/nutui-react'
目前只能通过
type IconProps = typeof Icon.defaultProps
这样不友好的方便来获取,感觉代码不够美观
往下拉着拉着就会出现一大片白的
期待能在taro中使用,已star,比trao-ui好看组建更多
目前测试发现小米11、oppo find x3、vivo x20不显示,复现机型算比较多
React does not recognize the iconClassPrefix
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase iconclassprefix
instead. If you accidentally passed it from a parent component, remove it from the DOM element
我看vue版本是支持taro的,react版本后期会支持taro吗
Form组件在日常使用中比较常用,希望能出一个Form组件。感谢大佬!
需求:
上传失败时不希望展示图片,包括关闭按钮
不确定是不是我自己的开发问题,因为刚开始学习和使用react四天时间,还有些生疏,问题是这样的
在渲染列表页的时候,根据不同的情况,如果列表没有数据,则渲染,否则渲染正常的
在return()里使用了{!bool && } ,bool = useState, MyEmpty自定义,{bool&&},同样MyCard自定义,
此时在 MyCard 里面有一个 元素,例如,在获取change事件后,更新 useState时,会不停的重新渲染整个页面,此时页面会出现抖动的情况,如果将MyCard里的元素全部直接写到return()里,则不会出现此情况。
问题就是这样,感谢大佬们的支持。
使用最新的taro模板是react18,安装1.2.2的nutui,报错invalid hook
目前支持的是 vue 的吧。
Upload 默认使用时(非自定义)如果上传非图片格式,显示一片空白,查看源码,只有上传图片才显示img标签。
期望上传 pdf/word/ppt 等格式的文件时,能自定义配置要展示的默认图片,需要暴漏出一个 props。
请问什么时候可以支持react-native啊,感谢🙏
nutui-react 官网「快速上手」一节介绍 WebPack 构建工具 通过 babel 使用按需加载 有误
仅配置 babel-plugin-import 无法正常运行
Failed to compile.
SassError: Undefined variable.
╷
5 │ width: $icon-width;
│ ^^^^^^^^^^^
╵
node_modules/@nutui/nutui-react/dist/packages/icon/icon.scss 5:10 root stylesheet
ERROR in ./node_modules/@nutui/nutui-react/dist/packages/icon/icon.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[7].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[4]!./node_modules/@nutui/nutui-react/dist/packages/icon/icon.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
╷
5 │ width: $icon-width;
│ ^^^^^^^^^^^
╵
node_modules/@nutui/nutui-react/dist/packages/icon/icon.scss 5:10 root stylesheet
后续发现,@nutui/nutui-react 导出的 sass 文件包含 sass variable 但是未引入对应 sass variable 文件,实际配置还需要借助 sass-resources-loader 全局导入 sass variable 文件
@nutui/nutui-react 基于React 视觉风格 JD APP 7.0规范 ,只能开发 h5
能支持react-native吗?如果不行,后面会有计划搞一套吗?
radio组件取消选中后,选中结果没有清空
选择区间日期的时候,选择日期后,再选择这个日期前的日期,会出现文字错位。比如先选5.27 再选5.20
处理input框在fouces状态下boder做一个处理
目前该组件支持H5,希望支同时支持小程序和H5开发。
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.