Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加inputNumber组件的全选中文本可配置 #2642

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/packages/inputnumber/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Demo6 from './demos/taro/demo6'
import Demo7 from './demos/taro/demo7'
import Demo8 from './demos/taro/demo8'
import Demo9 from './demos/taro/demo9'
import Demo10 from './demos/taro/demo10'

const InputNumberDemo = () => {
const [translated] = useTranslate({
Expand All @@ -29,6 +30,7 @@ const InputNumberDemo = () => {
'65bafb1d': '支持异步修改',
'7e2394ae': '自定义按钮大小',
'7e2394be': '支持formatter',
'5b7286d1': '支持取消全选中文本',
},
'zh-TW': {
'6333c786': '超出限制事件觸發',
Expand All @@ -43,6 +45,7 @@ const InputNumberDemo = () => {
'65bafb1d': '支持異步修改',
'7e2394ae': '自定義按鈕大小',
'7e2394be': '支持formatter',
'5b7286d1': '支援取消全選中文本',
},
'en-US': {
'6333c786': 'Exceeded limit event triggered',
Expand All @@ -57,6 +60,7 @@ const InputNumberDemo = () => {
'65bafb1d': 'Support for asynchronous modification',
'7e2394ae': 'custom button size',
'7e2394be': 'support formatter',
'5b7286d1': 'support deselect all text',
},
})

Expand Down Expand Up @@ -104,6 +108,11 @@ const InputNumberDemo = () => {

<h2>Formatter</h2>
<Demo9 />

<h2>{translated['5b7286d1']}</h2>
<Cell>
<Demo10 />
</Cell>
</div>
</>
)
Expand Down
9 changes: 9 additions & 0 deletions src/packages/inputnumber/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Demo6 from './demos/h5/demo6'
import Demo7 from './demos/h5/demo7'
import Demo8 from './demos/h5/demo8'
import Demo9 from './demos/h5/demo9'
import Demo10 from './demos/h5/demo10'

const InputNumberDemo = () => {
const [translated] = useTranslate({
Expand All @@ -26,6 +27,7 @@ const InputNumberDemo = () => {
'65bafb1d': '支持异步修改',
'7e2394ae': '自定义按钮大小',
'7e2394be': '支持formatter',
'5b7286d1': '支持取消全选中文本',
},
'zh-TW': {
'6333c786': '超出限制事件觸發',
Expand All @@ -40,6 +42,7 @@ const InputNumberDemo = () => {
'65bafb1d': '支持異步修改',
'7e2394ae': '自定義按鈕大小',
'7e2394be': '支持formatter',
'5b7286d1': '支援取消全選中文本',
},
'en-US': {
'6333c786': 'Exceeded limit event triggered',
Expand All @@ -54,6 +57,7 @@ const InputNumberDemo = () => {
'65bafb1d': 'Support for asynchronous modification',
'7e2394ae': 'custom button size',
'7e2394be': 'support formatter',
'5b7286d1': 'support deselect all text',
},
})

Expand Down Expand Up @@ -100,6 +104,11 @@ const InputNumberDemo = () => {

<h2>Formatter</h2>
<Demo9 />

<h2>{translated['5b7286d1']}</h2>
<Cell>
<Demo10 />
</Cell>
</div>
</>
)
Expand Down
7 changes: 7 additions & 0 deletions src/packages/inputnumber/demos/h5/demo10.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import { InputNumber } from '@nutui/nutui-react'

const Demo10 = () => {
return <InputNumber defaultValue={1} allowEmpty select={false} />
}
export default Demo10
7 changes: 7 additions & 0 deletions src/packages/inputnumber/demos/taro/demo10.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import { InputNumber } from '@nutui/nutui-react-taro'

const Demo10 = () => {
return <InputNumber defaultValue={1} allowEmpty select={false} />
}
export default Demo10
Loading