wujingjing
2025-04-09 28706df7da34b8854cdce96ad89c035eaded6ea9
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
import type { ExtractPropTypes } from 'vue';
import { buildProps } from 'element-plus/es/utils/vue/props/runtime';
import { isBoolean } from '/@/utils/types';
 
export type FormItemConfig = {
    /** @description 表单标签名 */
    label: string;
    /** @description 表单内提示词 */
    placeholder?: string;
    /** @description 该表单项需要校验时起作用 */
    prop: string;
    /** @description 表单标签长度 */
    labelWidth?: string;
    /** @description 表单长度 */
    width?: string;
 
    /** @description 是否可手动清空值 */
    clearable?: boolean;
    /** @description 表单类型 */
    type?: 'string' | 'number' | 'date' | 'selectable' | 'selectOption' | 'tree-select';
};
 
export const YWDialogProps = buildProps({
    /** @description 是否展示 */
    modelValue: {
        type: Boolean,
        default: () => {
            return false;
        },
    },
    /** @description 对话框宽度 */
    width: {
        type: String,
        default: '400',
    },
 
    /** @description 对话框标题 icon */
    headerIcon: {
        type: String,
        required: false,
    },
    /** @description 对话框标题 */
    title: {
        type: String,
        required: true,
    },
 
    /** @description 是否展示 footer */
    showFooter: {
        type: Boolean,
        default: true,
    },
 
    /** @description 是否展示对话框头部 icon */
    showHeaderIcon: {
        type: Boolean,
        default: true,
    },
    /** @description 关闭对话框时,是否销毁对话框 */
    destroyOnClose: {
        type: Boolean,
        default: true,
    },
 
    /** @description 点击蒙层是否关闭对话框 */
    closeOnClickModal:{
        type:Boolean,
        default:false
    }
} as const);
export type YWDialogPropsType = ExtractPropTypes<typeof YWDialogProps>;
 
export const YWDialogEmits = {
    close: () => true,
    closed: () => true,
    dlgClosed: () => true,
    submit: () => true,
    'update:modelValue': (value: boolean) => isBoolean(value),
};