plain-design 1.0.0-beta.114 → 1.0.0-beta.116

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.114",
3
+ "version": "1.0.0-beta.116",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@peryl/icon": "0.0.8",
34
- "@peryl/utils": "^0.1.69",
34
+ "@peryl/utils": "^0.1.71",
35
35
  "@types/color": "3.0.6",
36
36
  "@types/react-transition-group": "4.4.10",
37
37
  "color": "4.2.3",
@@ -40,12 +40,12 @@
40
40
  "react-transition-group": "4.4.5"
41
41
  },
42
42
  "devDependencies": {
43
+ "@peryl/react-compose": "0.0.215",
43
44
  "@babel/plugin-proposal-optional-chaining": "7.21.0",
44
45
  "@babel/plugin-transform-class-properties": "7.23.3",
45
46
  "@babel/preset-env": "7.23.7",
46
47
  "@babel/preset-react": "7.23.3",
47
48
  "@babel/preset-typescript": "7.23.3",
48
- "@peryl/react-compose": "0.0.205",
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
  (() => {
@@ -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 },
@@ -119,16 +119,16 @@ export const DialogService = createApplicationServiceComponent<iDialogServiceOpt
119
119
  },
120
120
  render: () => {
121
121
  /*---------------------------------------head-------------------------------------------*/
122
- const head = () => (
122
+ const head = targetOption.value.customOption.renderHead || (() => (
123
123
  <div className="dialog-service-head">
124
124
  {!!targetOption.value.customOption.status && <Icon icon={ThemeStatusIcons[targetOption.value.customOption.status]}/>}
125
125
  <span>{targetOption.value.dialogProps.title || i18n.$it('base.defaultTitle').d('提示')}</span>
126
126
  </div>
127
- );
127
+ ));
128
128
  /*---------------------------------------foot-------------------------------------------*/
129
- const foot = () => !targetOption.value.dialogProps.confirmButton && !targetOption.value.dialogProps.cancelButton && (
129
+ const foot = targetOption.value.customOption.renderFoot || (() => !targetOption.value.dialogProps.confirmButton && !targetOption.value.dialogProps.cancelButton && (
130
130
  <Button mode="fill" label={i18n.$it('base.close').d('关闭')} onClick={hide} status={targetOption.value.customOption.status || undefined}/>
131
- );
131
+ ));
132
132
  /*---------------------------------------default-------------------------------------------*/
133
133
  let defaultSlot = null as any;
134
134
  const dialogProps = { ...targetOption.value.dialogProps };
@@ -213,13 +213,13 @@ export const DialogService = createApplicationServiceComponent<iDialogServiceOpt
213
213
  <Dialog
214
214
  {...dialogProps}
215
215
  v-model={isShow.value}
216
- v-model:open={isOpen.value}>
217
- {{
216
+ v-model:open={isOpen.value}
217
+ v-slots={{
218
218
  head,
219
219
  foot,
220
220
  default: () => defaultSlot,
221
221
  }}
222
- </Dialog>
222
+ />
223
223
  );
224
224
  }
225
225
  };
@@ -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 韦胜健