@4399ywkf/design 1.3.6 → 1.3.8
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/dist/RichText/index.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface PromptInputProps {
|
|
|
72
72
|
readOnly?: boolean;
|
|
73
73
|
bordered?: boolean;
|
|
74
74
|
placeholder?: string;
|
|
75
|
+
onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
76
|
+
onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
75
77
|
}
|
|
76
78
|
declare const PromptInput: React.FC<PromptInputProps>;
|
|
77
79
|
export default PromptInput;
|
package/dist/RichText/index.js
CHANGED
|
@@ -294,7 +294,9 @@ var RichTextEditor = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
294
294
|
readOnly = _ref3.readOnly,
|
|
295
295
|
bordered = _ref3.bordered,
|
|
296
296
|
_ref3$placeholder = _ref3.placeholder,
|
|
297
|
-
placeholder = _ref3$placeholder === void 0 ? '输入文本...' : _ref3$placeholder
|
|
297
|
+
placeholder = _ref3$placeholder === void 0 ? '输入文本...' : _ref3$placeholder,
|
|
298
|
+
onFocus = _ref3.onFocus,
|
|
299
|
+
onBlur = _ref3.onBlur;
|
|
298
300
|
// 创建编辑器实例
|
|
299
301
|
var editor = useMemo(function () {
|
|
300
302
|
return withInlineNodes(withReact(createEditor()));
|
|
@@ -588,6 +590,8 @@ var RichTextEditor = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
588
590
|
onChange: handleValueChange
|
|
589
591
|
}, /*#__PURE__*/React.createElement(Editable, {
|
|
590
592
|
className: "editable-wrapper ".concat(readOnly ? 'editable-wrapper-read-only' : ''),
|
|
593
|
+
onFocus: onFocus,
|
|
594
|
+
onBlur: onBlur,
|
|
591
595
|
renderElement: renderElement,
|
|
592
596
|
placeholder: readOnly ? '' : placeholder,
|
|
593
597
|
onKeyDown: readOnly ? undefined : handleKeyDown,
|
|
@@ -610,7 +614,9 @@ var PromptInput = function PromptInput(_ref4) {
|
|
|
610
614
|
readOnly = _ref4.readOnly,
|
|
611
615
|
_ref4$bordered = _ref4.bordered,
|
|
612
616
|
bordered = _ref4$bordered === void 0 ? true : _ref4$bordered,
|
|
613
|
-
placeholder = _ref4.placeholder
|
|
617
|
+
placeholder = _ref4.placeholder,
|
|
618
|
+
onFocus = _ref4.onFocus,
|
|
619
|
+
onBlur = _ref4.onBlur;
|
|
614
620
|
var internalRef = useRef(null);
|
|
615
621
|
var promptInputRef = externalRef || internalRef;
|
|
616
622
|
var handleChange = useCallback(function (data) {
|
|
@@ -627,7 +633,9 @@ var PromptInput = function PromptInput(_ref4) {
|
|
|
627
633
|
maxLength: maxLength,
|
|
628
634
|
readOnly: readOnly,
|
|
629
635
|
bordered: bordered,
|
|
630
|
-
placeholder: placeholder
|
|
636
|
+
placeholder: placeholder,
|
|
637
|
+
onFocus: onFocus,
|
|
638
|
+
onBlur: onBlur
|
|
631
639
|
});
|
|
632
640
|
};
|
|
633
641
|
export default PromptInput;
|
|
@@ -52,7 +52,8 @@ var WaterfallVirtual = function WaterfallVirtual(props) {
|
|
|
52
52
|
_props$overscan = props.overscan,
|
|
53
53
|
overscan = _props$overscan === void 0 ? 0 : _props$overscan,
|
|
54
54
|
_props$atBottomThresh = props.atBottomThreshold,
|
|
55
|
-
atBottomThreshold = _props$atBottomThresh === void 0 ? 100 : _props$atBottomThresh
|
|
55
|
+
atBottomThreshold = _props$atBottomThresh === void 0 ? 100 : _props$atBottomThresh,
|
|
56
|
+
components = props.components;
|
|
56
57
|
|
|
57
58
|
// 状态管理
|
|
58
59
|
var _useState = useState(column),
|
|
@@ -615,6 +616,6 @@ var WaterfallVirtual = function WaterfallVirtual(props) {
|
|
|
615
616
|
style: listStyle
|
|
616
617
|
}, renderList.map(function (item) {
|
|
617
618
|
return renderItem(item, getItemRenderProps(item), changeQueueDataHeight);
|
|
618
|
-
})));
|
|
619
|
+
})), components === null || components === void 0 ? void 0 : components.Footer);
|
|
619
620
|
};
|
|
620
621
|
export default /*#__PURE__*/React.memo(WaterfallVirtual);
|