plain-design 1.0.0-beta.29 → 1.0.0-beta.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plain-design",
3
- "version": "1.0.0-beta.29",
3
+ "version": "1.0.0-beta.30",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -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 }, // 挂载到某个dom节点下
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,
@@ -194,7 +194,7 @@ export const PopupItem = designComponent({
194
194
  clearTimeout(timer);
195
195
  timer = null;
196
196
  }
197
- methods.refresh(true);
197
+ methods.refresh(state.option.transformRefreshOnScroll);
198
198
  timer = setTimeout(() => {
199
199
  methods.refresh();
200
200
  }, 100);
@@ -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