ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 444 forks source link

DateRangePicker设置style无效 #1061

Open cosmozhang1995 opened 4 years ago

cosmozhang1995 commented 4 years ago

如下代码:

            <Form model={form} style={{marginTop: '20px'}} labelWidth="100px">
                <Form.Item label="查询时段" required>
                    <DateRangePicker
                        className="DateRangePicker"
                        value={form.timeRange}
                        placeholder="选择查询时段"
                        isShowTime={true}
                        style={{width: "100%"}}/>
                </Form.Item>
                <Form.Item label="查询条件">
                    <Input value={form.filter}></Input>
                </Form.Item>
            </Form>

下面的Input能够正常显示,占容器全宽,而DateRangePicker就只能占据固定宽度。

查看DOM树,渲染出的el-date-editor及其子元素均无内连style属性。