@alifd/chat 0.3.8-beta.0 → 0.3.8-beta.1

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.
@@ -121,8 +121,17 @@ const FloatButton = forwardRef((props, ref) => {
121
121
  onVisibleChange(v, type);
122
122
  };
123
123
  const renderBalloon = () => {
124
+ var _a, _b;
124
125
  const popupClassName = cs(`${cls}-popup`, (balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupClassName) || '');
125
- const popupStyle = Object.assign({ maxHeight: `${currentMaxHeight}px`, overflow: 'auto' }, ((balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) || {}));
126
+ const popupStyle = Object.assign({}, ((balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) || {}));
127
+ //判读下最大高度有没有超过当前高度,超过的话覆盖height
128
+ const currentHeight = parseInt(((_a = balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) === null || _a === void 0 ? void 0 : _a.height) ? ((_b = balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) === null || _b === void 0 ? void 0 : _b.height) + '' : currentMaxHeight + '');
129
+ if (currentMaxHeight < currentHeight) {
130
+ popupStyle.height = `${currentMaxHeight}px`;
131
+ }
132
+ else {
133
+ popupStyle.height = `${currentHeight}px`;
134
+ }
126
135
  return (React.createElement(Balloon, Object.assign({ visible: visible, onVisibleChange: handleVisibleChange, popupProps: {
127
136
  afterOpen() {
128
137
  var _a, _b;
package/es/index.js CHANGED
@@ -20,4 +20,4 @@ export { default as CardLoading } from './card-loading';
20
20
  export { default as Origin } from './origin';
21
21
  export { default as Loading } from './loading';
22
22
  export { default as Drawer } from './drawer';
23
- export const version = '0.3.8-beta.0';
23
+ export const version = '0.3.8-beta.1';
@@ -123,8 +123,17 @@ const FloatButton = (0, react_1.forwardRef)((props, ref) => {
123
123
  onVisibleChange(v, type);
124
124
  };
125
125
  const renderBalloon = () => {
126
+ var _a, _b;
126
127
  const popupClassName = (0, classnames_1.default)(`${cls}-popup`, (balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupClassName) || '');
127
- const popupStyle = Object.assign({ maxHeight: `${currentMaxHeight}px`, overflow: 'auto' }, ((balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) || {}));
128
+ const popupStyle = Object.assign({}, ((balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) || {}));
129
+ //判读下最大高度有没有超过当前高度,超过的话覆盖height
130
+ const currentHeight = parseInt(((_a = balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) === null || _a === void 0 ? void 0 : _a.height) ? ((_b = balloonProps === null || balloonProps === void 0 ? void 0 : balloonProps.popupStyle) === null || _b === void 0 ? void 0 : _b.height) + '' : currentMaxHeight + '');
131
+ if (currentMaxHeight < currentHeight) {
132
+ popupStyle.height = `${currentMaxHeight}px`;
133
+ }
134
+ else {
135
+ popupStyle.height = `${currentHeight}px`;
136
+ }
128
137
  return (react_1.default.createElement(next_1.Balloon, Object.assign({ visible: visible, onVisibleChange: handleVisibleChange, popupProps: {
129
138
  afterOpen() {
130
139
  var _a, _b;
package/lib/index.js CHANGED
@@ -46,4 +46,4 @@ var loading_1 = require("./loading");
46
46
  Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return tslib_1.__importDefault(loading_1).default; } });
47
47
  var drawer_1 = require("./drawer");
48
48
  Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return tslib_1.__importDefault(drawer_1).default; } });
49
- exports.version = '0.3.8-beta.0';
49
+ exports.version = '0.3.8-beta.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.3.8-beta.0",
3
+ "version": "0.3.8-beta.1",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",