fix: Components slider and treeSelect drag (#1837)

# Description

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

# Snapshots:

Include snapshots for easier review.

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have already rebased the commits and make the commit message
conform to the project standard.
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged and published in downstream
modules
This commit is contained in:
Dreammy23
2024-08-16 17:53:05 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -25,14 +25,14 @@ export const RenderSlider = (params: TextAreaProps) => {
{data?.ui?.show_input ? (
<Row>
<Col span={12}>
<Slider {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
<Slider className="w-full nodrag" {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
</Col>
<Col span={4}>
<InputNumber {...attr} style={{ margin: '0 16px' }} value={inputValue} onChange={onChangeSlider} />
</Col>
</Row>
) : (
<Slider {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
<Slider className="w-full nodrag" {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
)}
</>
);

View File

@@ -15,6 +15,7 @@ export const RenderTreeSelect = (params: TextAreaProps) => {
return (
<div className="p-2 text-sm">
<TreeSelect
className="w-full nodrag"
fieldNames={{ label: 'label', value: 'value', children: 'children' }}
{...attr}
style={{ width: '100%' }}