fix: Components slider and treeSelect drag

This commit is contained in:
严志勇
2024-08-16 17:43:49 +08:00
parent 77be0e6eac
commit 6ad7199c3b
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%' }}