@jname/vue-mobile-components
Version:
基于 Vue 3 + Vant 4 的移动端组件库
56 lines (55 loc) • 1.21 kB
TypeScript
export interface Personnel {
id: string;
xgh: string;
xm: string;
[key: string]: any;
}
/**
* 组织架构数据类型
*/
export interface Organization {
id: number;
dwh?: string;
name: string;
isParent?: boolean;
children?: Organization[];
checked?: boolean;
}
/**
* 扩展人员类型
*/
export interface PersonnelItem extends Personnel {
checked?: boolean;
dwh?: string;
isParent?: boolean;
name?: string;
[key: string]: any;
}
/**
* 组织架构和人员混合类型
*/
export type OrganizationPickerItem = Organization | PersonnelItem;
export interface ApiConfig {
baseUrl: string;
getToken: () => string;
}
export interface Props {
/** 是否支持多选 */
multiple?: boolean;
/** 最大选择数量 */
maxSelected?: number;
/** API配置 */
apiConfig: ApiConfig;
/** 弹窗显示状态 */
modelValue?: boolean;
/** 弹窗标题 */
popupTitle?: string;
/** 弹窗高度 */
popupHeight?: string;
}
export interface Emits {
(e: 'update:modelValue', value: boolean): void;
(e: 'confirm', personnel: PersonnelItem[]): void;
(e: 'cancel'): void;
(e: 'close'): void;
}