提交 | 用户 | age
|
2f6253
|
1 |
import type { PropType } from 'vue'; |
dc09de
|
2 |
|
V |
3 |
import { useI18n } from '/@/hooks/web/useI18n'; |
81baf1
|
4 |
import { propTypes } from '/@/utils/propTypes'; |
962f90
|
5 |
const { t } = useI18n(); |
dc09de
|
6 |
|
2f6253
|
7 |
export const footerProps = { |
81baf1
|
8 |
confirmLoading: propTypes.bool, |
2f6253
|
9 |
/** |
46e087
|
10 |
* @description: Show close button |
2f6253
|
11 |
*/ |
81baf1
|
12 |
showCancelBtn: propTypes.bool.def(true), |
2f6253
|
13 |
cancelButtonProps: Object as PropType<any>, |
962f90
|
14 |
cancelText: propTypes.string.def(t('component.drawer.cancelText')), |
2f6253
|
15 |
/** |
46e087
|
16 |
* @description: Show confirmation button |
2f6253
|
17 |
*/ |
81baf1
|
18 |
showOkBtn: propTypes.bool.def(true), |
V |
19 |
okButtonProps: propTypes.any, |
962f90
|
20 |
okText: propTypes.string.def(t('component.drawer.okText')), |
81baf1
|
21 |
okType: propTypes.string.def('primary'), |
V |
22 |
showFooter: propTypes.bool, |
2f6253
|
23 |
footerHeight: { |
陈 |
24 |
type: [String, Number] as PropType<string | number>, |
|
25 |
default: 60, |
|
26 |
}, |
|
27 |
}; |
|
28 |
export const basicProps = { |
81baf1
|
29 |
isDetail: propTypes.bool, |
V |
30 |
title: propTypes.string.def(''), |
|
31 |
showDetailBack: propTypes.bool.def(true), |
|
32 |
visible: propTypes.bool, |
|
33 |
loading: propTypes.bool, |
|
34 |
maskClosable: propTypes.bool.def(true), |
2f6253
|
35 |
getContainer: { |
陈 |
36 |
type: [Object, String] as PropType<any>, |
|
37 |
}, |
|
38 |
scrollOptions: { |
|
39 |
type: Object as PropType<any>, |
|
40 |
default: null, |
|
41 |
}, |
|
42 |
closeFunc: { |
|
43 |
type: [Function, Object] as PropType<any>, |
|
44 |
default: null, |
|
45 |
}, |
81baf1
|
46 |
triggerWindowResize: propTypes.bool, |
V |
47 |
destroyOnClose: propTypes.bool, |
2f6253
|
48 |
...footerProps, |
陈 |
49 |
}; |