@alifd/chat 0.3.5 → 0.3.6
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.
|
@@ -26,10 +26,11 @@ trigger, // 触发器dom
|
|
|
26
26
|
const { left, top, width, height } = trigger.getBoundingClientRect();
|
|
27
27
|
let newAlign = align;
|
|
28
28
|
let newMaxHeight = maxHeight;
|
|
29
|
+
// 去除bl/br/tl/tr的支持,因为会导致弹层面板高度变矮,所以目前只用了'rt'|'lt'|'rb'|'lb'4种布局
|
|
29
30
|
switch (edge) {
|
|
30
31
|
case 'top': {
|
|
31
|
-
newAlign = subEdge === 'left' ? '
|
|
32
|
-
newMaxHeight = screenHeight - top -
|
|
32
|
+
newAlign = subEdge === 'left' ? 'rt' : 'lt';
|
|
33
|
+
newMaxHeight = screenHeight - top - DEFAULT_EDGE_OFFSET;
|
|
33
34
|
break;
|
|
34
35
|
}
|
|
35
36
|
case 'right': {
|
|
@@ -38,8 +39,8 @@ trigger, // 触发器dom
|
|
|
38
39
|
break;
|
|
39
40
|
}
|
|
40
41
|
case 'bottom': {
|
|
41
|
-
newAlign = subEdge === 'left' ? '
|
|
42
|
-
newMaxHeight = top
|
|
42
|
+
newAlign = subEdge === 'left' ? 'rb' : 'lb';
|
|
43
|
+
newMaxHeight = top + height - DEFAULT_EDGE_OFFSET;
|
|
43
44
|
break;
|
|
44
45
|
}
|
|
45
46
|
case 'left': {
|
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.
|
|
23
|
+
export const version = '0.3.6';
|
|
@@ -29,10 +29,11 @@ trigger, // 触发器dom
|
|
|
29
29
|
const { left, top, width, height } = trigger.getBoundingClientRect();
|
|
30
30
|
let newAlign = align;
|
|
31
31
|
let newMaxHeight = maxHeight;
|
|
32
|
+
// 去除bl/br/tl/tr的支持,因为会导致弹层面板高度变矮,所以目前只用了'rt'|'lt'|'rb'|'lb'4种布局
|
|
32
33
|
switch (edge) {
|
|
33
34
|
case 'top': {
|
|
34
|
-
newAlign = subEdge === 'left' ? '
|
|
35
|
-
newMaxHeight = screenHeight - top -
|
|
35
|
+
newAlign = subEdge === 'left' ? 'rt' : 'lt';
|
|
36
|
+
newMaxHeight = screenHeight - top - DEFAULT_EDGE_OFFSET;
|
|
36
37
|
break;
|
|
37
38
|
}
|
|
38
39
|
case 'right': {
|
|
@@ -41,8 +42,8 @@ trigger, // 触发器dom
|
|
|
41
42
|
break;
|
|
42
43
|
}
|
|
43
44
|
case 'bottom': {
|
|
44
|
-
newAlign = subEdge === 'left' ? '
|
|
45
|
-
newMaxHeight = top
|
|
45
|
+
newAlign = subEdge === 'left' ? 'rb' : 'lb';
|
|
46
|
+
newMaxHeight = top + height - DEFAULT_EDGE_OFFSET;
|
|
46
47
|
break;
|
|
47
48
|
}
|
|
48
49
|
case 'left': {
|
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.
|
|
49
|
+
exports.version = '0.3.6';
|