Commit af60a167 authored by 田翔's avatar 田翔

解决下拉框组件以及时间类组件弹出层不随组件滚动问题

parent ba75dc1a
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.0.7", "version": "2.0.8",
"description": "2.0.7: 对话框统一调整为可拖拽", "description": "2.0.8: 解决下拉框组件以及时间类组件弹出层不随组件滚动问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
"moment": "^2.29.1", "moment": "^2.29.1",
"qrcode.react": "^3.1.0", "qrcode.react": "^3.1.0",
"react": "17.0.2", "react": "17.0.2",
"react-draggable": "^4.4.5",
"react-file-viewer": "^1.2.1", "react-file-viewer": "^1.2.1",
"react-sign2": "^0.0.3", "react-sign2": "^0.0.3",
"react-svg": "15.1.9", "react-svg": "15.1.9",
......
...@@ -2247,15 +2247,15 @@ const dateWidgets = [ ...@@ -2247,15 +2247,15 @@ const dateWidgets = [
type: 'object', type: 'object',
properties: {}, properties: {},
}, },
format: { // format: {
title: '日期格式', // title: '日期格式',
type: 'string', // type: 'string',
enum: ['date', 'dateTime', 'year', 'month', 'week', 'quarter'], // enum: ['date', 'dateTime', 'year', 'month', 'week', 'quarter'],
default: 'date', // default: 'date',
enumNames: ['日期', '日期时间', '日期年份', '日期月份', '日期周', '日期季度'], // enumNames: ['日期', '日期时间', '日期年份', '日期月份', '日期周', '日期季度'],
displayType: 'row', // displayType: 'row',
labelWidth: 80, // labelWidth: 80,
}, // },
options: { options: {
title: '选项', title: '选项',
type: 'string', type: 'string',
......
...@@ -60,6 +60,7 @@ const UserSelect = (props) => { ...@@ -60,6 +60,7 @@ const UserSelect = (props) => {
onFocus={selectFocus} onFocus={selectFocus}
onChange={selectChange} onChange={selectChange}
options={pullDown} options={pullDown}
getPopupContainer={(targterNode) => targterNode.parentElement || document.body}
> >
</Select> </Select>
) )
......
...@@ -44,6 +44,7 @@ const DateTime = (props) => { ...@@ -44,6 +44,7 @@ const DateTime = (props) => {
showTime={format === 'dateTime'} showTime={format === 'dateTime'}
style={{ width: '100%' }} style={{ width: '100%' }}
locale={locale} locale={locale}
getPopupContainer={(targterNode) => targterNode.parentElement || document.body}
/> />
); );
......
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import { TimePicker } from 'antd' import { TimePicker } from 'antd'
import locale from 'antd/lib/date-picker/locale/zh_CN'
import moment from 'moment' import moment from 'moment'
const Time = (props) => { const Time = (props) => {
...@@ -32,6 +33,8 @@ const Time = (props) => { ...@@ -32,6 +33,8 @@ const Time = (props) => {
value={valueShow} value={valueShow}
onChange={timeChange} onChange={timeChange}
disabledDate={disabledDate} disabledDate={disabledDate}
locale={locale}
getPopupContainer={(targterNode) => targterNode.parentElement || document.body}
/> />
) )
......
...@@ -118,6 +118,7 @@ const ComboBox = (props) => { ...@@ -118,6 +118,7 @@ const ComboBox = (props) => {
placeholder={placeholder} placeholder={placeholder}
onChange={handleChange} onChange={handleChange}
allowClear allowClear
getPopupContainer={(targterNode) => targterNode.parentElement || document.body}
> >
{children} {children}
</Select> </Select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment