ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
 
import type { CSSProperties, PropType } from 'vue';
 
import type { ModalWrapperProps } from './typing';
 
import { $t } from '@vben/locales';
 
export const modalProps = {
  cancelText: { default: () => $t('common.cancelText'), type: String },
  centered: { default: true, type: Boolean },
  closeFunc: Function as PropType<() => Promise<boolean>>,
  continueText: { default: () => $t('common.continueText'), type: String },
  // open drag
  draggable: { default: false, type: Boolean },
  height: { type: Number },
  minHeight: { type: Number },
  okText: { default: () => $t('common.okText'), type: String },
  open: { type: Boolean },
 
  scrollTop: { default: true, type: Boolean },
};
 
export const basicProps = Object.assign({}, modalProps, {
  afterClose: Function as PropType<() => Promise<VueNode>>,
  bodyStyle: Object as PropType<CSSProperties>,
  cancelButtonProps: Object as PropType<ButtonProps>,
  // Can it be full screen
  canFullscreen: { default: false, type: Boolean },
  closable: { default: true, type: Boolean },
  closeIcon: Object as PropType<VueNode>,
  confirmLoading: { type: Boolean },
  continueButtonProps: Object as PropType<ButtonProps>,
  continueLoading: { type: Boolean },
 
  continueType: { default: 'default', type: String },
 
  defaultFullscreen: { type: Boolean },
 
  destroyOnClose: { type: Boolean },
 
  footer: Object as PropType<VueNode>,
 
  getContainer: Function as PropType<() => any>,
 
  // Warm reminder message
  helpMessage: [String, Array] as PropType<string | string[]>,
 
  keyboard: { default: false, type: Boolean },
 
  loading: { type: Boolean },
 
  loadingTip: { type: String },
 
  mask: { default: true, type: Boolean },
 
  maskClosable: { default: false, type: Boolean },
 
  maskStyle: Object as PropType<CSSProperties>,
 
  okButtonProps: Object as PropType<ButtonProps>,
 
  okType: { default: 'primary', type: String },
 
  open: { type: Boolean },
 
  /**
   * @description: Show close button
   */
  showCancelBtn: { default: true, type: Boolean },
 
  showContinueBtn: { default: false, type: Boolean },
 
  /**
   * @description: Show confirmation button
   */
  showOkBtn: { default: true, type: Boolean },
 
  title: { type: String },
 
  // Whether to setting wrapper
  useWrapper: { default: true, type: Boolean },
 
  width: {
    default: 600,
    type: [String, Number] as PropType<number | string>,
  },
 
  wrapClassName: { type: String },
 
  // After enabling the wrapper, the bottom can be increased in height
  wrapperFooterOffset: { default: -160, type: Number },
 
  wrapperProps: Object as PropType<Partial<ModalWrapperProps>>,
 
  zIndex: { type: Number },
});