plain-design 1.0.0-beta.29 → 1.0.0-beta.30
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/plain-design.commonjs.min.js +1 -1
- package/dist/plain-design.min.js +1 -1
- package/dist/report.html +2 -2
- package/package.json +1 -1
- package/src/packages/components/Popup/index.tsx +3 -1
- package/src/packages/components/usePopup/PopupItem.tsx +1 -1
- package/src/packages/components/usePopup/usePopupManager.tsx +1 -0
- package/src/packages/components/usePopup/utils/popup.utils.ts +1 -0
package/package.json
CHANGED
@@ -34,7 +34,8 @@ export const Popup = designComponent({
|
|
34
34
|
beforeHide: { type: Function as PropType<iPopupCustomOption['beforeHide']> }, // 隐藏之前处理动作,返回false则阻止隐藏
|
35
35
|
destroyOnClose: { type: Boolean, default: true, }, // 是否在关闭的时候销毁内容
|
36
36
|
type: { type: String as PropType<iPopupDefaultOption['type']> }, // 类型,在打开一个popup的时候,会将同类型的popup自动关闭
|
37
|
-
appendToBody: { type: Boolean as PropType<iPopupDefaultOption['appendToBody']>, default: true },
|
37
|
+
appendToBody: { type: Boolean as PropType<iPopupDefaultOption['appendToBody']>, default: true }, // 挂载到某个dom节点下
|
38
|
+
transformRefreshOnScroll: { type: Boolean as PropType<iPopupDefaultOption['transformRefreshOnScroll']>, default: true },// scroll的时候refresh使用transform来优化
|
38
39
|
offset: { type: Number as PropType<iPopupDefaultOption['offset']> }, // 在direction方向上的距离
|
39
40
|
autoSwitchDirection: { type: Boolean as PropType<iPopupDefaultOption['autoSwitchDirection']>, default: true },// 当空间不够时,是否自动切换direction
|
40
41
|
size: { type: String as PropType<iPopupDefaultOption['size']> }, // popup内容尺寸
|
@@ -231,6 +232,7 @@ export const Popup = designComponent({
|
|
231
232
|
destroyOnClose: props.destroyOnClose,
|
232
233
|
type: props.type,
|
233
234
|
appendToBody: props.appendToBody,
|
235
|
+
transformRefreshOnScroll: props.transformRefreshOnScroll,
|
234
236
|
offset: props.offset,
|
235
237
|
autoSwitchDirection: props.autoSwitchDirection,
|
236
238
|
refreshOnScroll: props.refreshOnScroll,
|
@@ -63,6 +63,7 @@ export function usePopupManager({ getSize }: { getSize: () => typeof ThemeSize.T
|
|
63
63
|
animation: ePopupAnimation.fade,
|
64
64
|
destroyOnClose: true,
|
65
65
|
appendToBody: true,
|
66
|
+
transformRefreshOnScroll: true,
|
66
67
|
offset: 0,
|
67
68
|
offsetAlign: 0,
|
68
69
|
autoSwitchDirection: true,
|
@@ -63,6 +63,7 @@ export interface iPopupDefaultOption {
|
|
63
63
|
animation: iPopupAnimation, // 动画类型
|
64
64
|
destroyOnClose: boolean, // 关闭的时候销毁popup
|
65
65
|
appendToBody: boolean, // 挂载到某个dom节点下
|
66
|
+
transformRefreshOnScroll: boolean, // scroll的时候refresh使用transform来优化
|
66
67
|
offset: number, // 在direction方向上的距离
|
67
68
|
offsetAlign: number, // 在align方向上的偏移距离
|
68
69
|
autoSwitchDirection: boolean, // 当空间不够时,是否自动切换direction
|