UNPKG

el-plus-crud

Version:

采用Vue3 + TS,封装的element-plus数据驱动表单、列表组件

196 lines (194 loc) 5.09 kB
import { Ref } from 'vue'; import { IFormDesc } from '../../../types'; export interface IFormProps { fid?: string; formDesc?: IFormDesc | null; groupFormDesc?: IFormDesc | null; descOrders?: string[]; modelValue?: { [key: string]: any; }; formAttrs?: { [key: string]: any; }; rules?: { [key: string]: any; } | null; isLoading?: boolean; requestFn?: Function | null; updateFn?: Function | null; showBtns?: boolean; showSubmit?: boolean; submitBtnText?: string; showCancel?: boolean; cancelBtnText?: string; showReset?: boolean; resetBtnText?: string; showLabel?: boolean; labelWidth?: number | string; disabled?: boolean; isDialog?: boolean; size?: string; column?: number; isTable?: boolean; idKey?: string; maxWidth?: string; isGroupForm?: boolean; disabledTab?: boolean; itemMB?: string; maxShowRowIndex?: number; } declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFormProps>, { formDesc: null; modelValue: () => {}; formAttrs: () => {}; rules: null; isLoading: boolean; requestFn: null; updateFn: null; showBtns: boolean; showSubmit: boolean; submitBtnText: string; showCancel: boolean; cancelBtnText: string; showReset: boolean; resetBtnText: string; showLabel: boolean; labelWidth: string; disabled: boolean; isDialog: boolean; size: string; column: number; isTable: boolean; idKey: string; disabledTab: boolean; itemMB: string; maxShowRowIndex: number; }>>, { fid: string | undefined; formRef: Ref<any, any>; submit: () => Promise<void>; getData: () => { [key: string]: any; }; validate: () => Promise<unknown>; reset: () => void; clearValid: () => void; clear: () => void; changeValidImg: () => void; refresh: () => void; init: () => void; totalRows: import('vue').ComputedRef<number>; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { cancel: (...args: any[]) => void; reset: (...args: any[]) => void; request: (...args: any[]) => void; }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFormProps>, { formDesc: null; modelValue: () => {}; formAttrs: () => {}; rules: null; isLoading: boolean; requestFn: null; updateFn: null; showBtns: boolean; showSubmit: boolean; submitBtnText: string; showCancel: boolean; cancelBtnText: string; showReset: boolean; resetBtnText: string; showLabel: boolean; labelWidth: string; disabled: boolean; isDialog: boolean; size: string; column: number; isTable: boolean; idKey: string; disabledTab: boolean; itemMB: string; maxShowRowIndex: number; }>>> & Readonly<{ onCancel?: ((...args: any[]) => any) | undefined; onReset?: ((...args: any[]) => any) | undefined; onRequest?: ((...args: any[]) => any) | undefined; }>, { size: string; disabled: boolean; formDesc: IFormDesc | null; modelValue: { [key: string]: any; }; formAttrs: { [key: string]: any; }; rules: { [key: string]: any; } | null; isLoading: boolean; requestFn: Function | null; updateFn: Function | null; showBtns: boolean; showSubmit: boolean; submitBtnText: string; showCancel: boolean; cancelBtnText: string; showReset: boolean; resetBtnText: string; showLabel: boolean; labelWidth: string | number; isDialog: boolean; column: number; isTable: boolean; idKey: string; disabledTab: boolean; itemMB: string; maxShowRowIndex: number; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, { top?(_: { formData: { [key: string]: any; }; }): any; row?(_: {}): any; default?(_: {}): any; "form-btn"?(_: { data: { [key: string]: any; }; }): any; bottom?(_: { formData: { [key: string]: any; }; }): any; "form-footer"?(_: { formData: { [key: string]: any; }; }): any; }>; export default _default; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };