@para-ui/core 3.0.62 → 3.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ComboSelect/index.js +12 -3
- package/ComboSelect/interface.d.ts +2 -0
- package/DynamicMultiBox/index.js +5 -4
- package/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/README.md +6 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/ComboSelect.js +1 -1
- package/umd/DynamicMultiBox.js +2 -2
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- /package/_verture/{index-57b579fb.js → index-6b591f41.js} +0 -0
package/ComboSelect/index.js
CHANGED
|
@@ -233,7 +233,8 @@ var ComboSelect = function ComboSelect(props) {
|
|
|
233
233
|
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
|
|
234
234
|
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
|
|
235
235
|
getPopupContainer = props.getPopupContainer,
|
|
236
|
-
maxTagTextLength = props.maxTagTextLength
|
|
236
|
+
maxTagTextLength = props.maxTagTextLength,
|
|
237
|
+
renderInputContent = props.renderInputContent;
|
|
237
238
|
var _React$useContext = React__default.useContext(GlobalContext),
|
|
238
239
|
language = _React$useContext.language,
|
|
239
240
|
locale = _React$useContext.locale;
|
|
@@ -664,12 +665,20 @@ var ComboSelect = function ComboSelect(props) {
|
|
|
664
665
|
var tagMemo = useMemo(function () {
|
|
665
666
|
var _a;
|
|
666
667
|
if (!(checkList === null || checkList === void 0 ? void 0 : checkList.length)) return null;
|
|
668
|
+
// 自定义渲染输入框内容
|
|
669
|
+
if (renderInputContent) {
|
|
670
|
+
if (!checkable)
|
|
671
|
+
//单选
|
|
672
|
+
return renderInputContent(checkList[0]);else return renderInputContent(checkList);
|
|
673
|
+
}
|
|
667
674
|
if (!checkable) {
|
|
668
675
|
//单选
|
|
669
676
|
return jsx("span", Object.assign({
|
|
670
677
|
className: 'comboselect-single-content'
|
|
671
678
|
}, {
|
|
672
|
-
children: (
|
|
679
|
+
children: jsx(AutoTips, {
|
|
680
|
+
children: (_a = checkList[0]) === null || _a === void 0 ? void 0 : _a[outputTitle]
|
|
681
|
+
})
|
|
673
682
|
}));
|
|
674
683
|
}
|
|
675
684
|
var realShowList = _toConsumableArray(checkList); //实际显示
|
|
@@ -770,7 +779,7 @@ var ComboSelect = function ComboSelect(props) {
|
|
|
770
779
|
}), idx);
|
|
771
780
|
}), renderOverTag()]
|
|
772
781
|
});
|
|
773
|
-
}, [checkList, onChange]);
|
|
782
|
+
}, [checkList, onChange, checkable]);
|
|
774
783
|
//处理参数
|
|
775
784
|
var getParams = useMemo(function () {
|
|
776
785
|
var P = params || emptyParamsRef.current;
|
|
@@ -143,4 +143,6 @@ export interface ComboSelectProps extends HelperTextDetailProps {
|
|
|
143
143
|
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
144
144
|
/** 最大显示的 tag 文本长度 */
|
|
145
145
|
maxTagTextLength?: number;
|
|
146
|
+
/** 自定义渲染输入框内容 */
|
|
147
|
+
renderInputContent?: (options: SelectOpt | SelectOpt[]) => React.ReactNode;
|
|
146
148
|
}
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -189,16 +189,17 @@ var FormItem = function FormItem(props) {
|
|
|
189
189
|
*/
|
|
190
190
|
var getSelection = function getSelection() {
|
|
191
191
|
var selectList = typeof list === 'function' ? list && list(rowIndex, id, name, valueList) : list || [];
|
|
192
|
-
return jsx(Select, Object.assign({
|
|
192
|
+
return jsx(Select, Object.assign({
|
|
193
|
+
getPopupContainer: function getPopupContainer() {
|
|
194
|
+
return document.body;
|
|
195
|
+
}
|
|
196
|
+
}, rest, {
|
|
193
197
|
list: selectList,
|
|
194
198
|
required: false,
|
|
195
199
|
label: '',
|
|
196
200
|
disabled: disabled,
|
|
197
201
|
onChange: function onChange(value) {
|
|
198
202
|
return inputChange(value);
|
|
199
|
-
},
|
|
200
|
-
getPopupContainer: function getPopupContainer() {
|
|
201
|
-
return document.body;
|
|
202
203
|
}
|
|
203
204
|
}));
|
|
204
205
|
};
|
package/Form/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-6b591f41.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
import '../TextField/index.js';
|
package/FormItem/index.js
CHANGED
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { D as Dropdown } from './_verture/index-77f9e0fb.js';
|
|
|
22
22
|
export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
|
|
23
23
|
export { default as Empty } from './Empty/index.js';
|
|
24
24
|
export { default as Form } from './Form/index.js';
|
|
25
|
-
export { F as FormItem } from './_verture/index-
|
|
25
|
+
export { F as FormItem } from './_verture/index-6b591f41.js';
|
|
26
26
|
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-92bb0e16.js';
|
|
27
27
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
28
28
|
export { default as Help } from './Help/index.js';
|