plain-design 1.0.0-beta.113 → 1.0.0-beta.115

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.113",
3
+ "version": "1.0.0-beta.115",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -45,7 +45,7 @@
45
45
  "@babel/preset-env": "7.23.7",
46
46
  "@babel/preset-react": "7.23.3",
47
47
  "@babel/preset-typescript": "7.23.3",
48
- "@peryl/react-compose": "0.0.205",
48
+ "@peryl/react-compose": "0.0.210",
49
49
  "@types/classnames": "^2.2.11",
50
50
  "@types/react": "18.2.4",
51
51
  "@types/react-dom": "18.2.4",
@@ -47,6 +47,8 @@ export function useTablePlc(
47
47
  getPlcTypeArr: null as null | (() => tPlcType[]),
48
48
  });
49
49
 
50
+ onBeforeUnmount(()=>{state.getTableEl = null})
51
+
50
52
  hooks.onPlcTypes.use(list => {state.getPlcTypeArr = () => list;});
51
53
 
52
54
  (() => {
@@ -113,7 +113,7 @@ export function createTreeNode(
113
113
  return !props.isLeaf ? !childrenData() : props.isLeaf(data);
114
114
  };
115
115
  /*叶子节点的图标*/
116
- const leafIcon = () => {return typeof props.leafIcon === "string" ? props.leafIcon : props.leafIcon(data);};
116
+ const leafIcon = () => {return typeof props.leafIcon === "string" ? props.leafIcon : props.leafIcon(self);};
117
117
  /*是否已经选中*/
118
118
  const checkStatus = (): typeof CheckboxStatus.TYPE => getCheckStatus()[key];
119
119
  /*是否可选中*/
@@ -32,7 +32,7 @@ export const TreePropsOptions = {
32
32
  customDraggier: { type: Boolean as PropType<iTreeProps["customDraggier"]> },
33
33
  isAllowDraggable: { type: Function as PropType<iTreeProps["isAllowDraggable"]> },
34
34
  isAllowDroppable: { type: Function as PropType<iTreeProps["isAllowDroppable"]> },
35
- leafIcon: { type: String as PropType<iTreeProps["leafIcon"]>, default: 'pi-drive-file' as string },
35
+ leafIcon: { type: [String, Function] as PropType<iTreeProps["leafIcon"]>, default: 'pi-drive-file' as string },
36
36
  folderCollapseIcon: { type: String as PropType<iTreeProps["folderCollapseIcon"]>, default: 'pi-caret-right' as string },
37
37
  folderExpandIcon: { type: String as PropType<iTreeProps["folderExpandIcon"]>, default: 'pi-down' as string },
38
38
  expanderCover: { type: Boolean as PropType<iTreeProps["expanderCover"]>, default: true },
@@ -39,7 +39,12 @@ export const PopupItem = designComponent({
39
39
 
40
40
  const manager = PopupManager.inject()!;
41
41
 
42
- const state = reactive({
42
+ const state: {
43
+ option: iPopupOption,
44
+ isShow: boolean,
45
+ isAnimationReady: boolean,
46
+ zIndex: number,
47
+ } = reactive({
43
48
  /**
44
49
  * 当前popup item对应的option对象,不可以通过props.option来更新,必须调用manager.methods.update手动更新
45
50
  * @author 韦胜健