@jackbo_vip/admin-kit 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1349 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -20,14 +20,9 @@ export { createIconifyIcon };
|
|
|
20
20
|
// ==========================================
|
|
21
21
|
// From @admin-kit/shared
|
|
22
22
|
// ==========================================
|
|
23
|
-
export { StateHandler, VisibleDomRect, arraysEqual, bindMethods, capitalizeFirstLetter, cn, diff, downloadFileFromBase64, downloadFileFromBlob, downloadFileFromBlobPart, downloadFileFromImageUrl, downloadFileFromUrl, filterTree, formatDate, formatDateTime, getCurrentTimezone, getElementVisibleRect, getFirstNonNullOrUndefined, getNestedValue, getScrollbarWidth, getSystemTimezone, isBoolean, isDate, isDayjsObject, isEmpty, isHttpUrl, isMacOs, isNumber, isUndefined, isWindow, isWindowsOs, kebabToCamelCase, loadScript, mapTree, mergeWithArrayOverride, needsScrollbar, openRouteInNewWindow, openWindow, setCurrentTimezone, sortTree, startProgress, stopProgress, to, toCamelCase, toLowerCaseFirstLetter, traverseTreeValues, triggerDownload, triggerWindowResize, uniqueByField, updateCSSVariables, urlToBase64 } from './utils/index.js';
|
|
24
23
|
export { get, isEqual, set } from 'es-toolkit/compat';
|
|
25
24
|
export { default as cloneDeep } from 'lodash.clonedeep';
|
|
26
|
-
export { IGlobalSharedState, globalShareState } from './global-state.js';
|
|
27
|
-
export { StorageManager } from './cache/index.js';
|
|
28
|
-
export { convertToHsl, convertToHslCssVar, convertToRgb, generatorColorVariables, isDarkColor, isLightColor, isValidColor } from './color/index.js';
|
|
29
25
|
export { TinyColor } from '@ctrl/tinycolor';
|
|
30
|
-
export { ADMIN_ANT_PREVIEW_URL, ADMIN_DOC_URL, ADMIN_ELE_PREVIEW_URL, ADMIN_GITHUB_URL, ADMIN_LOGO_URL, ADMIN_NAIVE_PREVIEW_URL, ADMIN_PREVIEW_URL, ADMIN_TD_PREVIEW_URL, CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT, CSS_VARIABLE_LAYOUT_CONTENT_WIDTH, CSS_VARIABLE_LAYOUT_FOOTER_HEIGHT, CSS_VARIABLE_LAYOUT_HEADER_HEIGHT, DEFAULT_NAMESPACE, ELEMENT_ID_MAIN_CONTENT } from './constants/index.js';
|
|
31
26
|
export { isFunction, isObject, isString } from '@vue/shared';
|
|
32
27
|
export { createDefu as createMerge, defu as merge } from 'defu';
|
|
33
28
|
export * from '@tanstack/vue-store';
|
|
@@ -467,6 +462,7 @@ export type { AccessModeType, AnyFunction, AnyNormalFunction, AnyPromiseFunction
|
|
|
467
462
|
// ==========================================
|
|
468
463
|
import * as vue from 'vue';
|
|
469
464
|
import { CSSProperties, Ref, ComputedRef } from 'vue';
|
|
465
|
+
import Sortable, { SortableOptions } from 'sortablejs';
|
|
470
466
|
export { default as Sortable } from 'sortablejs';
|
|
471
467
|
export { useEmitAsProps, useForwardExpose, useForwardProps, useForwardPropsEmits } from 'reka-ui';
|
|
472
468
|
|
|
@@ -548,40 +544,1374 @@ export type { UseNamespaceReturn };
|
|
|
548
544
|
// ==========================================
|
|
549
545
|
// From @admin-kit/form-ui
|
|
550
546
|
// ==========================================
|
|
551
|
-
|
|
552
|
-
export
|
|
553
|
-
export
|
|
547
|
+
import type { Component } from 'vue';
|
|
548
|
+
export declare const DEFAULT_FORM_COMMON_CONFIG: FormCommonConfig;
|
|
549
|
+
export declare const COMPONENT_MAP: Record<BaseFormComponentType, Component>;
|
|
550
|
+
export declare const COMPONENT_BIND_EVENT_MAP: Partial<Record<BaseFormComponentType, string>>;
|
|
551
|
+
export declare function setupAdminForm<T extends BaseFormComponentType = BaseFormComponentType>(options: AdminFormAdapterOptions<T>): void;
|
|
552
|
+
import type { FieldOptions, FormContext, GenericObject } from 'vee-validate';
|
|
553
|
+
import type { ZodTypeAny } from 'zod';
|
|
554
|
+
import type { Component, HtmlHTMLAttributes, Ref } from 'vue';
|
|
555
|
+
export type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
|
556
|
+
export type BaseFormComponentType = 'DefaultButton' | 'PrimaryButton' | 'AdminCheckbox' | 'AdminInput' | 'AdminInputPassword' | 'AdminPinInput' | 'AdminSelect' | (Record<never, never> & string);
|
|
557
|
+
type Breakpoints = '2xl:' | '3xl:' | '' | 'lg:' | 'md:' | 'sm:' | 'xl:';
|
|
558
|
+
type GridCols = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
|
|
559
|
+
export type WrapperClassType = `${Breakpoints}grid-cols-${GridCols}` | (Record<never, never> & string);
|
|
560
|
+
export type FormItemClassType = `${Breakpoints}cols-end-${'auto' | GridCols}` | `${Breakpoints}cols-span-${'auto' | 'full' | GridCols}` | `${Breakpoints}cols-start-${'auto' | GridCols}` | (Record<never, never> & string) | WrapperClassType;
|
|
561
|
+
export type FormFieldOptions = Partial<FieldOptions & {
|
|
562
|
+
validateOnBlur?: boolean;
|
|
563
|
+
validateOnChange?: boolean;
|
|
564
|
+
validateOnInput?: boolean;
|
|
565
|
+
validateOnModelUpdate?: boolean;
|
|
566
|
+
}>;
|
|
567
|
+
export interface FormShape {
|
|
568
|
+
/** 默认值 */
|
|
569
|
+
default?: any;
|
|
570
|
+
/** 字段名 */
|
|
571
|
+
fieldName: string;
|
|
572
|
+
/** 是否必填 */
|
|
573
|
+
required?: boolean;
|
|
574
|
+
rules?: ZodTypeAny;
|
|
575
|
+
}
|
|
576
|
+
export type MaybeComponentPropKey = 'options' | 'placeholder' | 'title' | keyof HtmlHTMLAttributes | (Record<never, never> & string);
|
|
577
|
+
export type MaybeComponentProps = {
|
|
578
|
+
[K in MaybeComponentPropKey]?: any;
|
|
579
|
+
};
|
|
580
|
+
export type FormActions = FormContext<GenericObject>;
|
|
581
|
+
export type CustomRenderType = (() => Component | string) | string;
|
|
582
|
+
export type FormSchemaRuleType = 'required' | 'selectRequired' | null | (Record<never, never> & string) | ZodTypeAny;
|
|
583
|
+
type FormItemDependenciesCondition<T = boolean | PromiseLike<boolean>> = (value: Partial<Record<string, any>>, actions: FormActions) => T;
|
|
584
|
+
type FormItemDependenciesConditionWithRules = (value: Partial<Record<string, any>>, actions: FormActions) => FormSchemaRuleType | PromiseLike<FormSchemaRuleType>;
|
|
585
|
+
type FormItemDependenciesConditionWithProps = (value: Partial<Record<string, any>>, actions: FormActions) => MaybeComponentProps | PromiseLike<MaybeComponentProps>;
|
|
586
|
+
export interface FormItemDependencies {
|
|
587
|
+
/**
|
|
588
|
+
* 组件参数
|
|
589
|
+
* @returns 组件参数
|
|
590
|
+
*/
|
|
591
|
+
componentProps?: FormItemDependenciesConditionWithProps;
|
|
592
|
+
/**
|
|
593
|
+
* 是否禁用
|
|
594
|
+
* @returns 是否禁用
|
|
595
|
+
*/
|
|
596
|
+
disabled?: boolean | FormItemDependenciesCondition;
|
|
597
|
+
/**
|
|
598
|
+
* 是否渲染(删除dom)
|
|
599
|
+
* @returns 是否渲染
|
|
600
|
+
*/
|
|
601
|
+
if?: boolean | FormItemDependenciesCondition;
|
|
602
|
+
/**
|
|
603
|
+
* 是否必填
|
|
604
|
+
* @returns 是否必填
|
|
605
|
+
*/
|
|
606
|
+
required?: FormItemDependenciesCondition;
|
|
607
|
+
/**
|
|
608
|
+
* 字段规则
|
|
609
|
+
*/
|
|
610
|
+
rules?: FormItemDependenciesConditionWithRules;
|
|
611
|
+
/**
|
|
612
|
+
* 是否隐藏(Css)
|
|
613
|
+
* @returns 是否隐藏
|
|
614
|
+
*/
|
|
615
|
+
show?: boolean | FormItemDependenciesCondition;
|
|
616
|
+
/**
|
|
617
|
+
* 任意触发都会执行
|
|
618
|
+
*/
|
|
619
|
+
trigger?: FormItemDependenciesCondition<void>;
|
|
620
|
+
/**
|
|
621
|
+
* 触发字段
|
|
622
|
+
*/
|
|
623
|
+
triggerFields: string[];
|
|
624
|
+
}
|
|
625
|
+
type ComponentProps = ((value: Partial<Record<string, any>>, actions: FormActions) => MaybeComponentProps) | MaybeComponentProps;
|
|
626
|
+
export interface FormCommonConfig {
|
|
627
|
+
/**
|
|
628
|
+
* 在Label后显示一个冒号
|
|
629
|
+
*/
|
|
630
|
+
colon?: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* 所有表单项的props
|
|
633
|
+
*/
|
|
634
|
+
componentProps?: ComponentProps;
|
|
635
|
+
/**
|
|
636
|
+
* 所有表单项的控件样式
|
|
637
|
+
*/
|
|
638
|
+
controlClass?: string;
|
|
639
|
+
/**
|
|
640
|
+
* 所有表单项的禁用状态
|
|
641
|
+
* @default false
|
|
642
|
+
*/
|
|
643
|
+
disabled?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* 是否禁用所有表单项的change事件监听
|
|
646
|
+
* @default true
|
|
647
|
+
*/
|
|
648
|
+
disabledOnChangeListener?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* 是否禁用所有表单项的input事件监听
|
|
651
|
+
* @default true
|
|
652
|
+
*/
|
|
653
|
+
disabledOnInputListener?: boolean;
|
|
654
|
+
/**
|
|
655
|
+
* 所有表单项的空状态值,默认都是undefined,naive-ui的空状态值是null
|
|
656
|
+
*/
|
|
657
|
+
emptyStateValue?: null | undefined;
|
|
658
|
+
/**
|
|
659
|
+
* 所有表单项的控件样式
|
|
660
|
+
* @default {}
|
|
661
|
+
*/
|
|
662
|
+
formFieldProps?: FormFieldOptions;
|
|
663
|
+
/**
|
|
664
|
+
* 所有表单项的栅格布局,支持函数形式
|
|
665
|
+
* @default ""
|
|
666
|
+
*/
|
|
667
|
+
formItemClass?: (() => string) | string;
|
|
668
|
+
/**
|
|
669
|
+
* 隐藏所有表单项label
|
|
670
|
+
* @default false
|
|
671
|
+
*/
|
|
672
|
+
hideLabel?: boolean;
|
|
673
|
+
/**
|
|
674
|
+
* 是否隐藏必填标记
|
|
675
|
+
* @default false
|
|
676
|
+
*/
|
|
677
|
+
hideRequiredMark?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* 所有表单项的label样式
|
|
680
|
+
* @default ""
|
|
681
|
+
*/
|
|
682
|
+
labelClass?: string;
|
|
683
|
+
/**
|
|
684
|
+
* 所有表单项的label宽度
|
|
685
|
+
*/
|
|
686
|
+
labelWidth?: number;
|
|
687
|
+
/**
|
|
688
|
+
* 所有表单项的model属性名
|
|
689
|
+
* @default "modelValue"
|
|
690
|
+
*/
|
|
691
|
+
modelPropName?: string;
|
|
692
|
+
/**
|
|
693
|
+
* 所有表单项的wrapper样式
|
|
694
|
+
*/
|
|
695
|
+
wrapperClass?: string;
|
|
696
|
+
}
|
|
697
|
+
type RenderComponentContentType = (value: Partial<Record<string, any>>, api: FormActions) => Record<string, any>;
|
|
698
|
+
export type HandleSubmitFn = (values: Record<string, any>) => Promise<void> | void;
|
|
699
|
+
export type HandleResetFn = (values: Record<string, any>) => Promise<void> | void;
|
|
700
|
+
export type FieldMappingTime = [
|
|
701
|
+
string,
|
|
702
|
+
[
|
|
703
|
+
string,
|
|
704
|
+
string
|
|
705
|
+
],
|
|
706
|
+
(((value: any, fieldName: string) => any) | [string, string] | null | string)?
|
|
707
|
+
][];
|
|
708
|
+
export type ArrayToStringFields = Array<[string[], string?] | string | string[]>;
|
|
709
|
+
export interface FormSchema<T extends BaseFormComponentType = BaseFormComponentType> extends FormCommonConfig {
|
|
710
|
+
/** 组件 */
|
|
711
|
+
component: Component | T;
|
|
712
|
+
/** 组件参数 */
|
|
713
|
+
componentProps?: ComponentProps;
|
|
714
|
+
/** 默认值 */
|
|
715
|
+
defaultValue?: any;
|
|
716
|
+
/** 依赖 */
|
|
717
|
+
dependencies?: FormItemDependencies;
|
|
718
|
+
/** 描述 */
|
|
719
|
+
description?: CustomRenderType;
|
|
720
|
+
/** 字段名 */
|
|
721
|
+
fieldName: string;
|
|
722
|
+
/** 帮助信息 */
|
|
723
|
+
help?: CustomRenderType;
|
|
724
|
+
/** 是否隐藏表单项 */
|
|
725
|
+
hide?: boolean;
|
|
726
|
+
/** 表单项 */
|
|
727
|
+
label?: CustomRenderType;
|
|
728
|
+
renderComponentContent?: RenderComponentContentType;
|
|
729
|
+
/** 字段规则 */
|
|
730
|
+
rules?: FormSchemaRuleType;
|
|
731
|
+
/** 后缀 */
|
|
732
|
+
suffix?: CustomRenderType;
|
|
733
|
+
}
|
|
734
|
+
export interface FormFieldProps extends FormSchema {
|
|
735
|
+
required?: boolean;
|
|
736
|
+
}
|
|
737
|
+
export interface FormRenderProps<T extends BaseFormComponentType = BaseFormComponentType> {
|
|
738
|
+
/**
|
|
739
|
+
* 表单字段数组映射字符串配置 默认使用","
|
|
740
|
+
*/
|
|
741
|
+
arrayToStringFields?: ArrayToStringFields;
|
|
742
|
+
/**
|
|
743
|
+
* 是否折叠,在showCollapseButton=true下生效
|
|
744
|
+
* true:折叠 false:展开
|
|
745
|
+
*/
|
|
746
|
+
collapsed?: boolean;
|
|
747
|
+
/**
|
|
748
|
+
* 折叠时保持行数
|
|
749
|
+
* @default 1
|
|
750
|
+
*/
|
|
751
|
+
collapsedRows?: number;
|
|
752
|
+
/**
|
|
753
|
+
* 是否触发resize事件
|
|
754
|
+
* @default false
|
|
755
|
+
*/
|
|
756
|
+
collapseTriggerResize?: boolean;
|
|
757
|
+
/**
|
|
758
|
+
* 表单项通用后备配置,当子项目没配置时使用这里的配置,子项目配置优先级高于此配置
|
|
759
|
+
*/
|
|
760
|
+
commonConfig?: FormCommonConfig;
|
|
761
|
+
/**
|
|
762
|
+
* 紧凑模式(移除表单每一项底部为校验信息预留的空间)
|
|
763
|
+
*/
|
|
764
|
+
compact?: boolean;
|
|
765
|
+
/**
|
|
766
|
+
* 组件v-model事件绑定
|
|
767
|
+
*/
|
|
768
|
+
componentBindEventMap?: Partial<Record<BaseFormComponentType, string>>;
|
|
769
|
+
/**
|
|
770
|
+
* 组件集合
|
|
771
|
+
*/
|
|
772
|
+
componentMap: Record<BaseFormComponentType, Component>;
|
|
773
|
+
/**
|
|
774
|
+
* 表单字段映射到时间格式
|
|
775
|
+
*/
|
|
776
|
+
fieldMappingTime?: FieldMappingTime;
|
|
777
|
+
/**
|
|
778
|
+
* 表单实例
|
|
779
|
+
*/
|
|
780
|
+
form?: FormContext<GenericObject>;
|
|
781
|
+
/**
|
|
782
|
+
* 表单项布局
|
|
783
|
+
*/
|
|
784
|
+
layout?: FormLayout;
|
|
785
|
+
/**
|
|
786
|
+
* 表单定义
|
|
787
|
+
*/
|
|
788
|
+
schema?: FormSchema<T>[];
|
|
789
|
+
/**
|
|
790
|
+
* 是否显示展开/折叠
|
|
791
|
+
*/
|
|
792
|
+
showCollapseButton?: boolean;
|
|
793
|
+
/**
|
|
794
|
+
* 格式化日期
|
|
795
|
+
*/
|
|
796
|
+
/**
|
|
797
|
+
* 表单栅格布局
|
|
798
|
+
* @default "grid-cols-1"
|
|
799
|
+
*/
|
|
800
|
+
wrapperClass?: WrapperClassType;
|
|
801
|
+
}
|
|
802
|
+
export interface ActionButtonOptions extends AdminButtonProps {
|
|
803
|
+
[key: string]: any;
|
|
804
|
+
content?: MaybeComputedRef<string>;
|
|
805
|
+
show?: boolean;
|
|
806
|
+
}
|
|
807
|
+
export interface AdminFormProps<T extends BaseFormComponentType = BaseFormComponentType> extends Omit<FormRenderProps<T>, 'componentBindEventMap' | 'componentMap' | 'form'> {
|
|
808
|
+
/**
|
|
809
|
+
* 操作按钮是否反转(提交按钮前置)
|
|
810
|
+
*/
|
|
811
|
+
actionButtonsReverse?: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* 操作按钮组的样式
|
|
814
|
+
* newLine: 在新行显示。rowEnd: 在行内显示,靠右对齐(默认)。inline: 使用grid默认样式
|
|
815
|
+
*/
|
|
816
|
+
actionLayout?: 'inline' | 'newLine' | 'rowEnd';
|
|
817
|
+
/**
|
|
818
|
+
* 操作按钮组显示位置,默认靠右显示
|
|
819
|
+
*/
|
|
820
|
+
actionPosition?: 'center' | 'left' | 'right';
|
|
821
|
+
/**
|
|
822
|
+
* 表单操作区域class
|
|
823
|
+
*/
|
|
824
|
+
actionWrapperClass?: ClassType;
|
|
825
|
+
/**
|
|
826
|
+
* 表单字段数组映射字符串配置 默认使用","
|
|
827
|
+
*/
|
|
828
|
+
arrayToStringFields?: ArrayToStringFields;
|
|
829
|
+
/**
|
|
830
|
+
* 表单字段映射
|
|
831
|
+
*/
|
|
832
|
+
fieldMappingTime?: FieldMappingTime;
|
|
833
|
+
/**
|
|
834
|
+
* 表单收起展开状态变化回调
|
|
835
|
+
*/
|
|
836
|
+
handleCollapsedChange?: (collapsed: boolean) => void;
|
|
837
|
+
/**
|
|
838
|
+
* 表单重置回调
|
|
839
|
+
*/
|
|
840
|
+
handleReset?: HandleResetFn;
|
|
841
|
+
/**
|
|
842
|
+
* 表单提交回调
|
|
843
|
+
*/
|
|
844
|
+
handleSubmit?: HandleSubmitFn;
|
|
845
|
+
/**
|
|
846
|
+
* 表单值变化回调
|
|
847
|
+
*/
|
|
848
|
+
handleValuesChange?: (values: Record<string, any>, fieldsChanged: string[]) => void;
|
|
849
|
+
/**
|
|
850
|
+
* 重置按钮参数
|
|
851
|
+
*/
|
|
852
|
+
resetButtonOptions?: ActionButtonOptions;
|
|
853
|
+
/**
|
|
854
|
+
* 验证失败时是否自动滚动到第一个错误字段
|
|
855
|
+
* @default false
|
|
856
|
+
*/
|
|
857
|
+
scrollToFirstError?: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* 是否显示默认操作按钮
|
|
860
|
+
* @default true
|
|
861
|
+
*/
|
|
862
|
+
showDefaultActions?: boolean;
|
|
863
|
+
/**
|
|
864
|
+
* 提交按钮参数
|
|
865
|
+
*/
|
|
866
|
+
submitButtonOptions?: ActionButtonOptions;
|
|
867
|
+
/**
|
|
868
|
+
* 是否在字段值改变时提交表单
|
|
869
|
+
* @default false
|
|
870
|
+
*/
|
|
871
|
+
submitOnChange?: boolean;
|
|
872
|
+
/**
|
|
873
|
+
* 是否在回车时提交表单
|
|
874
|
+
* @default false
|
|
875
|
+
*/
|
|
876
|
+
submitOnEnter?: boolean;
|
|
877
|
+
}
|
|
878
|
+
export type ExtendedFormApi = FormApi & {
|
|
879
|
+
useStore: <T = NoInfer<AdminFormProps>>(selector?: (state: NoInfer<AdminFormProps>) => T) => Readonly<Ref<T>>;
|
|
880
|
+
};
|
|
881
|
+
export interface AdminFormAdapterOptions<T extends BaseFormComponentType = BaseFormComponentType> {
|
|
882
|
+
config?: {
|
|
883
|
+
baseModelPropName?: string;
|
|
884
|
+
disabledOnChangeListener?: boolean;
|
|
885
|
+
disabledOnInputListener?: boolean;
|
|
886
|
+
emptyStateValue?: null | undefined;
|
|
887
|
+
modelPropNameMap?: Partial<Record<T, string>>;
|
|
888
|
+
};
|
|
889
|
+
defineRules?: {
|
|
890
|
+
required?: (value: any, params: any, ctx: Record<string, any>) => boolean | string;
|
|
891
|
+
selectRequired?: (value: any, params: any, ctx: Record<string, any>) => boolean | string;
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
export {};
|
|
895
|
+
export declare function useAdminForm<T extends BaseFormComponentType = BaseFormComponentType>(options: AdminFormProps<T>): readonly [import("vue").DefineSetupFnComponent<AdminFormProps<BaseFormComponentType>, {}, {}, AdminFormProps<BaseFormComponentType> & {}, import("vue").PublicProps>, ExtendedFormApi];
|
|
554
896
|
export * as z from 'zod';
|
|
555
897
|
|
|
556
898
|
|
|
557
899
|
// ==========================================
|
|
558
900
|
// From @admin-kit/layout-ui
|
|
559
901
|
// ==========================================
|
|
560
|
-
|
|
561
|
-
|
|
902
|
+
interface AdminLayoutProps {
|
|
903
|
+
/**
|
|
904
|
+
* 内容区域定宽
|
|
905
|
+
* @default 'wide'
|
|
906
|
+
*/
|
|
907
|
+
contentCompact?: ContentCompactType;
|
|
908
|
+
/**
|
|
909
|
+
* 定宽布局宽度
|
|
910
|
+
* @default 1200
|
|
911
|
+
*/
|
|
912
|
+
contentCompactWidth?: number;
|
|
913
|
+
/**
|
|
914
|
+
* padding
|
|
915
|
+
* @default 16
|
|
916
|
+
*/
|
|
917
|
+
contentPadding?: number;
|
|
918
|
+
/**
|
|
919
|
+
* paddingBottom
|
|
920
|
+
* @default 16
|
|
921
|
+
*/
|
|
922
|
+
contentPaddingBottom?: number;
|
|
923
|
+
/**
|
|
924
|
+
* paddingLeft
|
|
925
|
+
* @default 16
|
|
926
|
+
*/
|
|
927
|
+
contentPaddingLeft?: number;
|
|
928
|
+
/**
|
|
929
|
+
* paddingRight
|
|
930
|
+
* @default 16
|
|
931
|
+
*/
|
|
932
|
+
contentPaddingRight?: number;
|
|
933
|
+
/**
|
|
934
|
+
* paddingTop
|
|
935
|
+
* @default 16
|
|
936
|
+
*/
|
|
937
|
+
contentPaddingTop?: number;
|
|
938
|
+
/**
|
|
939
|
+
* footer 是否可见
|
|
940
|
+
* @default false
|
|
941
|
+
*/
|
|
942
|
+
footerEnable?: boolean;
|
|
943
|
+
/**
|
|
944
|
+
* footer 是否固定
|
|
945
|
+
* @default true
|
|
946
|
+
*/
|
|
947
|
+
footerFixed?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* footer 高度
|
|
950
|
+
* @default 32
|
|
951
|
+
*/
|
|
952
|
+
footerHeight?: number;
|
|
953
|
+
/**
|
|
954
|
+
* header高度
|
|
955
|
+
* @default 48
|
|
956
|
+
*/
|
|
957
|
+
headerHeight?: number;
|
|
958
|
+
/**
|
|
959
|
+
* 顶栏是否隐藏
|
|
960
|
+
* @default false
|
|
961
|
+
*/
|
|
962
|
+
headerHidden?: boolean;
|
|
963
|
+
/**
|
|
964
|
+
* header 显示模式
|
|
965
|
+
* @default 'fixed'
|
|
966
|
+
*/
|
|
967
|
+
headerMode?: LayoutHeaderModeType;
|
|
968
|
+
/**
|
|
969
|
+
* header 顶栏主题
|
|
970
|
+
*/
|
|
971
|
+
headerTheme?: ThemeModeType;
|
|
972
|
+
/**
|
|
973
|
+
* 是否显示header切换侧边栏按钮
|
|
974
|
+
* @default
|
|
975
|
+
*/
|
|
976
|
+
headerToggleSidebarButton?: boolean;
|
|
977
|
+
/**
|
|
978
|
+
* header是否显示
|
|
979
|
+
* @default true
|
|
980
|
+
*/
|
|
981
|
+
headerVisible?: boolean;
|
|
982
|
+
/**
|
|
983
|
+
* 是否移动端显示
|
|
984
|
+
* @default false
|
|
985
|
+
*/
|
|
986
|
+
isMobile?: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* 布局方式
|
|
989
|
+
* sidebar-nav 侧边菜单布局
|
|
990
|
+
* header-nav 顶部菜单布局
|
|
991
|
+
* mixed-nav 侧边&顶部菜单布局
|
|
992
|
+
* sidebar-mixed-nav 侧边混合菜单布局
|
|
993
|
+
* full-content 全屏内容布局
|
|
994
|
+
* @default sidebar-nav
|
|
995
|
+
*/
|
|
996
|
+
layout?: LayoutType;
|
|
997
|
+
/**
|
|
998
|
+
* 侧边菜单折叠状态
|
|
999
|
+
* @default false
|
|
1000
|
+
*/
|
|
1001
|
+
sidebarCollapse?: boolean;
|
|
1002
|
+
/**
|
|
1003
|
+
* 侧边菜单折叠按钮
|
|
1004
|
+
* @default true
|
|
1005
|
+
*/
|
|
1006
|
+
sidebarCollapsedButton?: boolean;
|
|
1007
|
+
/**
|
|
1008
|
+
* 侧边菜单是否折叠时,是否显示title
|
|
1009
|
+
* @default true
|
|
1010
|
+
*/
|
|
1011
|
+
sidebarCollapseShowTitle?: boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* 侧边栏是否可见
|
|
1014
|
+
* @default true
|
|
1015
|
+
*/
|
|
1016
|
+
sidebarEnable?: boolean;
|
|
1017
|
+
/**
|
|
1018
|
+
* 侧边菜单折叠额外宽度
|
|
1019
|
+
* @default 48
|
|
1020
|
+
*/
|
|
1021
|
+
sidebarExtraCollapsedWidth?: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* 侧边菜单折叠按钮是否固定
|
|
1024
|
+
* @default true
|
|
1025
|
+
*/
|
|
1026
|
+
sidebarFixedButton?: boolean;
|
|
1027
|
+
/**
|
|
1028
|
+
* 侧边栏是否隐藏
|
|
1029
|
+
* @default false
|
|
1030
|
+
*/
|
|
1031
|
+
sidebarHidden?: boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
* 混合侧边栏宽度
|
|
1034
|
+
* @default 80
|
|
1035
|
+
*/
|
|
1036
|
+
sidebarMixedWidth?: number;
|
|
1037
|
+
/**
|
|
1038
|
+
* 侧边栏
|
|
1039
|
+
* @default dark
|
|
1040
|
+
*/
|
|
1041
|
+
sidebarTheme?: ThemeModeType;
|
|
1042
|
+
/**
|
|
1043
|
+
* 侧边栏宽度
|
|
1044
|
+
* @default 210
|
|
1045
|
+
*/
|
|
1046
|
+
sidebarWidth?: number;
|
|
1047
|
+
/**
|
|
1048
|
+
* 侧边菜单折叠宽度
|
|
1049
|
+
* @default 48
|
|
1050
|
+
*/
|
|
1051
|
+
sideCollapseWidth?: number;
|
|
1052
|
+
/**
|
|
1053
|
+
* tab是否可见
|
|
1054
|
+
* @default true
|
|
1055
|
+
*/
|
|
1056
|
+
tabbarEnable?: boolean;
|
|
1057
|
+
/**
|
|
1058
|
+
* tab高度
|
|
1059
|
+
* @default 30
|
|
1060
|
+
*/
|
|
1061
|
+
tabbarHeight?: number;
|
|
1062
|
+
/**
|
|
1063
|
+
* zIndex
|
|
1064
|
+
* @default 100
|
|
1065
|
+
*/
|
|
1066
|
+
zIndex?: number;
|
|
1067
|
+
}
|
|
1068
|
+
export type { AdminLayoutProps };
|
|
1069
|
+
interface Props extends AdminLayoutProps {
|
|
1070
|
+
}
|
|
1071
|
+
type __VLS_Props = Props;
|
|
1072
|
+
type __VLS_ModelProps = {
|
|
1073
|
+
'sidebarCollapse'?: boolean;
|
|
1074
|
+
'sidebarExtraVisible'?: boolean;
|
|
1075
|
+
'sidebarExtraCollapse'?: boolean;
|
|
1076
|
+
'sidebarExpandOnHover'?: boolean;
|
|
1077
|
+
'sidebarEnable'?: boolean;
|
|
1078
|
+
};
|
|
1079
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
1080
|
+
declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_29: {}, __VLS_50: {}, __VLS_58: {}, __VLS_66: {}, __VLS_69: {}, __VLS_77: {}, __VLS_79: {};
|
|
1081
|
+
type __VLS_Slots = {} & {
|
|
1082
|
+
logo?: (props: typeof __VLS_10) => any;
|
|
1083
|
+
} & {
|
|
1084
|
+
'mixed-menu'?: (props: typeof __VLS_12) => any;
|
|
1085
|
+
} & {
|
|
1086
|
+
menu?: (props: typeof __VLS_14) => any;
|
|
1087
|
+
} & {
|
|
1088
|
+
'side-extra'?: (props: typeof __VLS_17) => any;
|
|
1089
|
+
} & {
|
|
1090
|
+
'side-extra-title'?: (props: typeof __VLS_20) => any;
|
|
1091
|
+
} & {
|
|
1092
|
+
logo?: (props: typeof __VLS_29) => any;
|
|
1093
|
+
} & {
|
|
1094
|
+
header?: (props: typeof __VLS_50) => any;
|
|
1095
|
+
} & {
|
|
1096
|
+
tabbar?: (props: typeof __VLS_58) => any;
|
|
1097
|
+
} & {
|
|
1098
|
+
content?: (props: typeof __VLS_66) => any;
|
|
1099
|
+
} & {
|
|
1100
|
+
'content-overlay'?: (props: typeof __VLS_69) => any;
|
|
1101
|
+
} & {
|
|
1102
|
+
footer?: (props: typeof __VLS_77) => any;
|
|
1103
|
+
} & {
|
|
1104
|
+
extra?: (props: typeof __VLS_79) => any;
|
|
1105
|
+
};
|
|
1106
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1107
|
+
sideMouseLeave: () => any;
|
|
1108
|
+
toggleSidebar: () => any;
|
|
1109
|
+
"update:sidebarCollapse": (value: boolean) => any;
|
|
1110
|
+
"update:sidebarExtraVisible": (value: boolean | undefined) => any;
|
|
1111
|
+
"update:sidebarExtraCollapse": (value: boolean) => any;
|
|
1112
|
+
"update:sidebarExpandOnHover": (value: boolean) => any;
|
|
1113
|
+
"update:sidebarEnable": (value: boolean) => any;
|
|
1114
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
1115
|
+
onSideMouseLeave?: (() => any) | undefined;
|
|
1116
|
+
onToggleSidebar?: (() => any) | undefined;
|
|
1117
|
+
"onUpdate:sidebarCollapse"?: ((value: boolean) => any) | undefined;
|
|
1118
|
+
"onUpdate:sidebarExtraVisible"?: ((value: boolean | undefined) => any) | undefined;
|
|
1119
|
+
"onUpdate:sidebarExtraCollapse"?: ((value: boolean) => any) | undefined;
|
|
1120
|
+
"onUpdate:sidebarExpandOnHover"?: ((value: boolean) => any) | undefined;
|
|
1121
|
+
"onUpdate:sidebarEnable"?: ((value: boolean) => any) | undefined;
|
|
1122
|
+
}>, {
|
|
1123
|
+
zIndex: number;
|
|
1124
|
+
layout: import("@admin-kit/typings").LayoutType;
|
|
1125
|
+
contentCompact: import("@admin-kit/typings").ContentCompactType;
|
|
1126
|
+
contentCompactWidth: number;
|
|
1127
|
+
isMobile: boolean;
|
|
1128
|
+
sidebarWidth: number;
|
|
1129
|
+
headerHeight: number;
|
|
1130
|
+
contentPadding: number;
|
|
1131
|
+
contentPaddingBottom: number;
|
|
1132
|
+
contentPaddingLeft: number;
|
|
1133
|
+
contentPaddingRight: number;
|
|
1134
|
+
contentPaddingTop: number;
|
|
1135
|
+
footerEnable: boolean;
|
|
1136
|
+
footerFixed: boolean;
|
|
1137
|
+
footerHeight: number;
|
|
1138
|
+
headerHidden: boolean;
|
|
1139
|
+
headerMode: import("@admin-kit/typings").LayoutHeaderModeType;
|
|
1140
|
+
headerToggleSidebarButton: boolean;
|
|
1141
|
+
headerVisible: boolean;
|
|
1142
|
+
sidebarCollapsedButton: boolean;
|
|
1143
|
+
sidebarCollapseShowTitle: boolean;
|
|
1144
|
+
sidebarExtraCollapsedWidth: number;
|
|
1145
|
+
sidebarFixedButton: boolean;
|
|
1146
|
+
sidebarHidden: boolean;
|
|
1147
|
+
sidebarMixedWidth: number;
|
|
1148
|
+
sidebarTheme: import("@admin-kit/typings").ThemeModeType;
|
|
1149
|
+
sideCollapseWidth: number;
|
|
1150
|
+
tabbarEnable: boolean;
|
|
1151
|
+
tabbarHeight: number;
|
|
1152
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1153
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1154
|
+
declare const _default: typeof __VLS_export;
|
|
1155
|
+
export default _default;
|
|
1156
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
1157
|
+
new (): {
|
|
1158
|
+
$slots: S;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
562
1161
|
|
|
563
1162
|
|
|
564
1163
|
// ==========================================
|
|
565
1164
|
// From @admin-kit/menu-ui
|
|
566
1165
|
// ==========================================
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
1166
|
+
interface Props extends MenuRecordBadgeRaw {
|
|
1167
|
+
hasChildren?: boolean;
|
|
1168
|
+
}
|
|
1169
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1170
|
+
declare const _default: typeof __VLS_export;
|
|
1171
|
+
export default _default;
|
|
1172
|
+
interface NormalMenuProps {
|
|
1173
|
+
/**
|
|
1174
|
+
* 菜单数据
|
|
1175
|
+
*/
|
|
1176
|
+
activePath?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* 是否折叠
|
|
1179
|
+
*/
|
|
1180
|
+
collapse?: boolean;
|
|
1181
|
+
/**
|
|
1182
|
+
* 菜单项
|
|
1183
|
+
*/
|
|
1184
|
+
menus?: MenuRecordRaw[];
|
|
1185
|
+
/**
|
|
1186
|
+
* @zh_CN 是否圆润风格
|
|
1187
|
+
* @default true
|
|
1188
|
+
*/
|
|
1189
|
+
rounded?: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* 主题
|
|
1192
|
+
*/
|
|
1193
|
+
theme?: 'dark' | 'light';
|
|
1194
|
+
}
|
|
1195
|
+
export type { NormalMenuProps };
|
|
1196
|
+
interface Props extends NormalMenuProps {
|
|
1197
|
+
}
|
|
1198
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1199
|
+
select: (args_0: MenuRecordRaw) => any;
|
|
1200
|
+
enter: (args_0: MenuRecordRaw) => any;
|
|
1201
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
1202
|
+
onSelect?: ((args_0: MenuRecordRaw) => any) | undefined;
|
|
1203
|
+
onEnter?: ((args_0: MenuRecordRaw) => any) | undefined;
|
|
1204
|
+
}>, {
|
|
1205
|
+
menus: MenuRecordRaw[];
|
|
1206
|
+
theme: "dark" | "light";
|
|
1207
|
+
collapse: boolean;
|
|
1208
|
+
activePath: string;
|
|
1209
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1210
|
+
declare const _default: typeof __VLS_export;
|
|
1211
|
+
export default _default;
|
|
1212
|
+
interface Props extends MenuProps {
|
|
1213
|
+
menus: MenuRecordRaw[];
|
|
1214
|
+
}
|
|
1215
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
1216
|
+
collapse: boolean;
|
|
1217
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1218
|
+
declare const _default: typeof __VLS_export;
|
|
1219
|
+
export default _default;
|
|
1220
|
+
import type { Component, Ref } from 'vue';
|
|
1221
|
+
interface MenuProps {
|
|
1222
|
+
/**
|
|
1223
|
+
* @zh_CN 是否开启手风琴模式
|
|
1224
|
+
* @default true
|
|
1225
|
+
*/
|
|
1226
|
+
accordion?: boolean;
|
|
1227
|
+
/**
|
|
1228
|
+
* @zh_CN 菜单是否折叠
|
|
1229
|
+
* @default false
|
|
1230
|
+
*/
|
|
1231
|
+
collapse?: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* @zh_CN 菜单折叠时是否显示菜单名称
|
|
1234
|
+
* @default false
|
|
1235
|
+
*/
|
|
1236
|
+
collapseShowTitle?: boolean;
|
|
1237
|
+
/**
|
|
1238
|
+
* @zh_CN 默认激活的菜单
|
|
1239
|
+
*/
|
|
1240
|
+
defaultActive?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* @zh_CN 默认展开的菜单
|
|
1243
|
+
*/
|
|
1244
|
+
defaultOpeneds?: string[];
|
|
1245
|
+
/**
|
|
1246
|
+
* @zh_CN 菜单模式
|
|
1247
|
+
* @default vertical
|
|
1248
|
+
*/
|
|
1249
|
+
mode?: 'horizontal' | 'vertical';
|
|
1250
|
+
/**
|
|
1251
|
+
* @zh_CN 是否圆润风格
|
|
1252
|
+
* @default true
|
|
1253
|
+
*/
|
|
1254
|
+
rounded?: boolean;
|
|
1255
|
+
/**
|
|
1256
|
+
* @zh_CN 是否自动滚动到激活的菜单项
|
|
1257
|
+
* @default false
|
|
1258
|
+
*/
|
|
1259
|
+
scrollToActive?: boolean;
|
|
1260
|
+
/**
|
|
1261
|
+
* @zh_CN 菜单主题
|
|
1262
|
+
* @default dark
|
|
1263
|
+
*/
|
|
1264
|
+
theme?: ThemeModeType;
|
|
1265
|
+
}
|
|
1266
|
+
interface SubMenuProps extends MenuRecordBadgeRaw {
|
|
1267
|
+
/**
|
|
1268
|
+
* @zh_CN 激活图标
|
|
1269
|
+
*/
|
|
1270
|
+
activeIcon?: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* @zh_CN 是否禁用
|
|
1273
|
+
*/
|
|
1274
|
+
disabled?: boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* @zh_CN 图标
|
|
1277
|
+
*/
|
|
1278
|
+
icon?: Component | string;
|
|
1279
|
+
/**
|
|
1280
|
+
* @zh_CN submenu 名称
|
|
1281
|
+
*/
|
|
1282
|
+
path: string;
|
|
1283
|
+
}
|
|
1284
|
+
interface MenuItemProps extends MenuRecordBadgeRaw {
|
|
1285
|
+
/**
|
|
1286
|
+
* @zh_CN 图标
|
|
1287
|
+
*/
|
|
1288
|
+
activeIcon?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* @zh_CN 是否禁用
|
|
1291
|
+
*/
|
|
1292
|
+
disabled?: boolean;
|
|
1293
|
+
/**
|
|
1294
|
+
* @zh_CN 图标
|
|
1295
|
+
*/
|
|
1296
|
+
icon?: Component | string;
|
|
1297
|
+
/**
|
|
1298
|
+
* @zh_CN menuitem 名称
|
|
1299
|
+
*/
|
|
1300
|
+
path: string;
|
|
1301
|
+
}
|
|
1302
|
+
interface MenuItemRegistered {
|
|
1303
|
+
active: boolean;
|
|
1304
|
+
parentPaths: string[];
|
|
1305
|
+
path: string;
|
|
1306
|
+
}
|
|
1307
|
+
interface MenuItemClicked {
|
|
1308
|
+
parentPaths: string[];
|
|
1309
|
+
path: string;
|
|
1310
|
+
}
|
|
1311
|
+
interface MenuProvider {
|
|
1312
|
+
activePath?: string;
|
|
1313
|
+
addMenuItem: (item: MenuItemRegistered) => void;
|
|
1314
|
+
addSubMenu: (item: MenuItemRegistered) => void;
|
|
1315
|
+
closeMenu: (path: string, parentLinks: string[]) => void;
|
|
1316
|
+
handleMenuItemClick: (item: MenuItemClicked) => void;
|
|
1317
|
+
handleSubMenuClick: (subMenu: MenuItemRegistered) => void;
|
|
1318
|
+
isMenuPopup: boolean;
|
|
1319
|
+
items: Record<string, MenuItemRegistered>;
|
|
1320
|
+
openedMenus: string[];
|
|
1321
|
+
openMenu: (path: string, parentLinks: string[]) => void;
|
|
1322
|
+
props: MenuProps;
|
|
1323
|
+
removeMenuItem: (item: MenuItemRegistered) => void;
|
|
1324
|
+
removeSubMenu: (item: MenuItemRegistered) => void;
|
|
1325
|
+
subMenus: Record<string, MenuItemRegistered>;
|
|
1326
|
+
theme: string;
|
|
1327
|
+
}
|
|
1328
|
+
interface SubMenuProvider {
|
|
1329
|
+
addSubMenu: (item: MenuItemRegistered) => void;
|
|
1330
|
+
handleMouseleave?: (deepDispatch: boolean) => void;
|
|
1331
|
+
level: number;
|
|
1332
|
+
mouseInChild: Ref<boolean>;
|
|
1333
|
+
removeSubMenu: (item: MenuItemRegistered) => void;
|
|
1334
|
+
}
|
|
1335
|
+
export type { MenuItemClicked, MenuItemProps, MenuItemRegistered, MenuProps, MenuProvider, SubMenuProps, SubMenuProvider, };
|
|
571
1336
|
|
|
572
1337
|
|
|
573
1338
|
// ==========================================
|
|
574
1339
|
// From @admin-kit/popup-ui
|
|
575
1340
|
// ==========================================
|
|
576
|
-
|
|
577
|
-
export
|
|
578
|
-
export
|
|
1341
|
+
import type { Component, VNode, VNodeArrayChildren } from 'vue';
|
|
1342
|
+
export type IconType = 'error' | 'info' | 'question' | 'success' | 'warning';
|
|
1343
|
+
export type BeforeCloseScope = {
|
|
1344
|
+
isConfirm: boolean;
|
|
1345
|
+
};
|
|
1346
|
+
export type AlertProps = {
|
|
1347
|
+
/** 关闭前的回调,如果返回false,则终止关闭 */
|
|
1348
|
+
beforeClose?: (scope: BeforeCloseScope) => boolean | Promise<boolean | undefined> | undefined;
|
|
1349
|
+
/** 边框 */
|
|
1350
|
+
bordered?: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* 按钮对齐方式
|
|
1353
|
+
* @default 'end'
|
|
1354
|
+
*/
|
|
1355
|
+
buttonAlign?: 'center' | 'end' | 'start';
|
|
1356
|
+
/** 取消按钮的标题 */
|
|
1357
|
+
cancelText?: string;
|
|
1358
|
+
/** 是否居中显示 */
|
|
1359
|
+
centered?: boolean;
|
|
1360
|
+
/** 确认按钮的标题 */
|
|
1361
|
+
confirmText?: string;
|
|
1362
|
+
/** 弹窗容器的额外样式 */
|
|
1363
|
+
containerClass?: string;
|
|
1364
|
+
/** 弹窗提示内容 */
|
|
1365
|
+
content: Component | string;
|
|
1366
|
+
/** 弹窗内容的额外样式 */
|
|
1367
|
+
contentClass?: string;
|
|
1368
|
+
/** 执行beforeClose回调期间,在内容区域显示一个loading遮罩*/
|
|
1369
|
+
contentMasking?: boolean;
|
|
1370
|
+
/** 弹窗底部内容(与按钮在同一个容器中) */
|
|
1371
|
+
footer?: Component | string;
|
|
1372
|
+
/** 弹窗的图标(在标题的前面) */
|
|
1373
|
+
icon?: Component | IconType;
|
|
1374
|
+
/**
|
|
1375
|
+
* 弹窗遮罩模糊效果
|
|
1376
|
+
*/
|
|
1377
|
+
overlayBlur?: number;
|
|
1378
|
+
/** 是否显示取消按钮 */
|
|
1379
|
+
showCancel?: boolean;
|
|
1380
|
+
/** 弹窗标题 */
|
|
1381
|
+
title?: string;
|
|
1382
|
+
};
|
|
1383
|
+
/** Prompt属性 */
|
|
1384
|
+
export type PromptProps<T = any> = {
|
|
1385
|
+
/** 关闭前的回调,如果返回false,则终止关闭 */
|
|
1386
|
+
beforeClose?: (scope: {
|
|
1387
|
+
isConfirm: boolean;
|
|
1388
|
+
value: T | undefined;
|
|
1389
|
+
}) => boolean | Promise<boolean | undefined> | undefined;
|
|
1390
|
+
/** 用于接受用户输入的组件 */
|
|
1391
|
+
component?: Component;
|
|
1392
|
+
/** 输入组件的属性 */
|
|
1393
|
+
componentProps?: Recordable<any>;
|
|
1394
|
+
/** 输入组件的插槽 */
|
|
1395
|
+
componentSlots?: (() => any) | Recordable<unknown> | VNode | VNodeArrayChildren;
|
|
1396
|
+
/** 默认值 */
|
|
1397
|
+
defaultValue?: T;
|
|
1398
|
+
/** 输入组件的值属性名 */
|
|
1399
|
+
modelPropName?: string;
|
|
1400
|
+
} & Omit<AlertProps, 'beforeClose'>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Alert上下文
|
|
1403
|
+
*/
|
|
1404
|
+
export type AlertContext = {
|
|
1405
|
+
/** 执行取消操作 */
|
|
1406
|
+
doCancel: () => void;
|
|
1407
|
+
/** 执行确认操作 */
|
|
1408
|
+
doConfirm: () => void;
|
|
1409
|
+
};
|
|
1410
|
+
export declare const injectAlertContext: <T extends AlertContext | null | undefined = AlertContext>(fallback?: T | undefined) => T extends null ? AlertContext | null : AlertContext, provideAlertContext: (contextValue: AlertContext) => AlertContext;
|
|
1411
|
+
/**
|
|
1412
|
+
* 获取Alert上下文
|
|
1413
|
+
* @returns AlertContext
|
|
1414
|
+
*/
|
|
1415
|
+
export declare function useAlertContext(): AlertContext;
|
|
1416
|
+
type __VLS_Props = AlertProps;
|
|
1417
|
+
type __VLS_ModelProps = {
|
|
1418
|
+
'open'?: boolean;
|
|
1419
|
+
};
|
|
1420
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
1421
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1422
|
+
closed: (...args: any[]) => void;
|
|
1423
|
+
opened: (...args: any[]) => void;
|
|
1424
|
+
confirm: (...args: any[]) => void;
|
|
1425
|
+
"update:open": (value: boolean) => void;
|
|
1426
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
1427
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
1428
|
+
onClosed?: ((...args: any[]) => any) | undefined;
|
|
1429
|
+
onOpened?: ((...args: any[]) => any) | undefined;
|
|
1430
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
1431
|
+
}>, {
|
|
1432
|
+
centered: boolean;
|
|
1433
|
+
bordered: boolean;
|
|
1434
|
+
buttonAlign: "center" | "end" | "start";
|
|
1435
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1436
|
+
declare const _default: typeof __VLS_export;
|
|
1437
|
+
export default _default;
|
|
1438
|
+
export declare function adminAlert(options: AlertProps): Promise<void>;
|
|
1439
|
+
export declare function adminAlert(message: string, options?: Partial<AlertProps>): Promise<void>;
|
|
1440
|
+
export declare function adminAlert(message: string, title?: string, options?: Partial<AlertProps>): Promise<void>;
|
|
1441
|
+
export declare function adminConfirm(options: AlertProps): Promise<void>;
|
|
1442
|
+
export declare function adminConfirm(message: string, options?: Partial<AlertProps>): Promise<void>;
|
|
1443
|
+
export declare function adminConfirm(message: string, title?: string, options?: Partial<AlertProps>): Promise<void>;
|
|
1444
|
+
export declare function adminPrompt<T = any>(options: PromptProps<T>): Promise<T | undefined>;
|
|
1445
|
+
export declare function clearAllAlerts(): void;
|
|
1446
|
+
import type { Component, Ref } from 'vue';
|
|
1447
|
+
export type DrawerPlacement = 'bottom' | 'left' | 'right' | 'top';
|
|
1448
|
+
export type CloseIconPlacement = 'left' | 'right';
|
|
1449
|
+
export interface DrawerProps {
|
|
1450
|
+
/**
|
|
1451
|
+
* 是否挂载到内容区域
|
|
1452
|
+
* @default false
|
|
1453
|
+
*/
|
|
1454
|
+
appendToMain?: boolean;
|
|
1455
|
+
/**
|
|
1456
|
+
* 取消按钮文字
|
|
1457
|
+
*/
|
|
1458
|
+
cancelText?: string;
|
|
1459
|
+
class?: ClassType;
|
|
1460
|
+
/**
|
|
1461
|
+
* 是否显示关闭按钮
|
|
1462
|
+
* @default true
|
|
1463
|
+
*/
|
|
1464
|
+
closable?: boolean;
|
|
1465
|
+
/**
|
|
1466
|
+
* 关闭按钮的位置
|
|
1467
|
+
*/
|
|
1468
|
+
closeIconPlacement?: CloseIconPlacement;
|
|
1469
|
+
/**
|
|
1470
|
+
* 点击弹窗遮罩是否关闭弹窗
|
|
1471
|
+
* @default true
|
|
1472
|
+
*/
|
|
1473
|
+
closeOnClickModal?: boolean;
|
|
1474
|
+
/**
|
|
1475
|
+
* 按下 ESC 键是否关闭弹窗
|
|
1476
|
+
* @default true
|
|
1477
|
+
*/
|
|
1478
|
+
closeOnPressEscape?: boolean;
|
|
1479
|
+
/**
|
|
1480
|
+
* 确定按钮 loading
|
|
1481
|
+
* @default false
|
|
1482
|
+
*/
|
|
1483
|
+
confirmLoading?: boolean;
|
|
1484
|
+
/**
|
|
1485
|
+
* 确定按钮文字
|
|
1486
|
+
*/
|
|
1487
|
+
confirmText?: string;
|
|
1488
|
+
contentClass?: string;
|
|
1489
|
+
/**
|
|
1490
|
+
* 弹窗描述
|
|
1491
|
+
*/
|
|
1492
|
+
description?: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* 在关闭时销毁抽屉
|
|
1495
|
+
*/
|
|
1496
|
+
destroyOnClose?: boolean;
|
|
1497
|
+
/**
|
|
1498
|
+
* 是否显示底部
|
|
1499
|
+
* @default true
|
|
1500
|
+
*/
|
|
1501
|
+
footer?: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* 弹窗底部样式
|
|
1504
|
+
*/
|
|
1505
|
+
footerClass?: ClassType;
|
|
1506
|
+
/**
|
|
1507
|
+
* 是否显示顶栏
|
|
1508
|
+
* @default true
|
|
1509
|
+
*/
|
|
1510
|
+
header?: boolean;
|
|
1511
|
+
/**
|
|
1512
|
+
* 弹窗头部样式
|
|
1513
|
+
*/
|
|
1514
|
+
headerClass?: ClassType;
|
|
1515
|
+
/**
|
|
1516
|
+
* 弹窗是否显示
|
|
1517
|
+
* @default false
|
|
1518
|
+
*/
|
|
1519
|
+
loading?: boolean;
|
|
1520
|
+
/**
|
|
1521
|
+
* 是否显示遮罩
|
|
1522
|
+
* @default true
|
|
1523
|
+
*/
|
|
1524
|
+
modal?: boolean;
|
|
1525
|
+
/**
|
|
1526
|
+
* 是否自动聚焦
|
|
1527
|
+
*/
|
|
1528
|
+
openAutoFocus?: boolean;
|
|
1529
|
+
/**
|
|
1530
|
+
* 弹窗遮罩模糊效果
|
|
1531
|
+
*/
|
|
1532
|
+
overlayBlur?: number;
|
|
1533
|
+
/**
|
|
1534
|
+
* 抽屉位置
|
|
1535
|
+
* @default right
|
|
1536
|
+
*/
|
|
1537
|
+
placement?: DrawerPlacement;
|
|
1538
|
+
/**
|
|
1539
|
+
* 是否显示取消按钮
|
|
1540
|
+
* @default true
|
|
1541
|
+
*/
|
|
1542
|
+
showCancelButton?: boolean;
|
|
1543
|
+
/**
|
|
1544
|
+
* 是否显示确认按钮
|
|
1545
|
+
* @default true
|
|
1546
|
+
*/
|
|
1547
|
+
showConfirmButton?: boolean;
|
|
1548
|
+
/**
|
|
1549
|
+
* 提交中(锁定抽屉状态)
|
|
1550
|
+
*/
|
|
1551
|
+
submitting?: boolean;
|
|
1552
|
+
/**
|
|
1553
|
+
* 弹窗标题
|
|
1554
|
+
*/
|
|
1555
|
+
title?: string;
|
|
1556
|
+
/**
|
|
1557
|
+
* 弹窗标题提示
|
|
1558
|
+
*/
|
|
1559
|
+
titleTooltip?: string;
|
|
1560
|
+
/**
|
|
1561
|
+
* 抽屉层级
|
|
1562
|
+
*/
|
|
1563
|
+
zIndex?: number;
|
|
1564
|
+
}
|
|
1565
|
+
export interface DrawerState extends DrawerProps {
|
|
1566
|
+
/** 弹窗打开状态 */
|
|
1567
|
+
isOpen?: boolean;
|
|
1568
|
+
/**
|
|
1569
|
+
* 共享数据
|
|
1570
|
+
*/
|
|
1571
|
+
sharedData?: Record<string, any>;
|
|
1572
|
+
}
|
|
1573
|
+
export type ExtendedDrawerApi = DrawerApi & {
|
|
1574
|
+
useStore: <T = NoInfer<DrawerState>>(selector?: (state: NoInfer<DrawerState>) => T) => Readonly<Ref<T>>;
|
|
1575
|
+
};
|
|
1576
|
+
export interface DrawerApiOptions extends DrawerState {
|
|
1577
|
+
/**
|
|
1578
|
+
* 独立的抽屉组件
|
|
1579
|
+
*/
|
|
1580
|
+
connectedComponent?: Component;
|
|
1581
|
+
/**
|
|
1582
|
+
* 关闭前的回调,返回 false 可以阻止关闭
|
|
1583
|
+
* @returns
|
|
1584
|
+
*/
|
|
1585
|
+
onBeforeClose?: () => MaybePromise<boolean | undefined>;
|
|
1586
|
+
/**
|
|
1587
|
+
* 点击取消按钮的回调
|
|
1588
|
+
*/
|
|
1589
|
+
onCancel?: () => void;
|
|
1590
|
+
/**
|
|
1591
|
+
* 弹窗关闭动画结束的回调
|
|
1592
|
+
* @returns
|
|
1593
|
+
*/
|
|
1594
|
+
onClosed?: () => void;
|
|
1595
|
+
/**
|
|
1596
|
+
* 点击确定按钮的回调
|
|
1597
|
+
*/
|
|
1598
|
+
onConfirm?: () => void;
|
|
1599
|
+
/**
|
|
1600
|
+
* 弹窗状态变化回调
|
|
1601
|
+
* @param isOpen
|
|
1602
|
+
* @returns
|
|
1603
|
+
*/
|
|
1604
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
1605
|
+
/**
|
|
1606
|
+
* 弹窗打开动画结束的回调
|
|
1607
|
+
* @returns
|
|
1608
|
+
*/
|
|
1609
|
+
onOpened?: () => void;
|
|
1610
|
+
}
|
|
1611
|
+
interface Props extends DrawerProps {
|
|
1612
|
+
drawerApi?: ExtendedDrawerApi;
|
|
1613
|
+
}
|
|
1614
|
+
declare var __VLS_37: {}, __VLS_61: {}, __VLS_75: {}, __VLS_93: {}, __VLS_101: {}, __VLS_130: {}, __VLS_143: {}, __VLS_145: {}, __VLS_155: {}, __VLS_157: {}, __VLS_167: {}, __VLS_169: {};
|
|
1615
|
+
type __VLS_Slots = {} & {
|
|
1616
|
+
'close-icon'?: (props: typeof __VLS_37) => any;
|
|
1617
|
+
} & {
|
|
1618
|
+
title?: (props: typeof __VLS_61) => any;
|
|
1619
|
+
} & {
|
|
1620
|
+
description?: (props: typeof __VLS_75) => any;
|
|
1621
|
+
} & {
|
|
1622
|
+
extra?: (props: typeof __VLS_93) => any;
|
|
1623
|
+
} & {
|
|
1624
|
+
'close-icon'?: (props: typeof __VLS_101) => any;
|
|
1625
|
+
} & {
|
|
1626
|
+
default?: (props: typeof __VLS_130) => any;
|
|
1627
|
+
} & {
|
|
1628
|
+
'prepend-footer'?: (props: typeof __VLS_143) => any;
|
|
1629
|
+
} & {
|
|
1630
|
+
footer?: (props: typeof __VLS_145) => any;
|
|
1631
|
+
} & {
|
|
1632
|
+
cancelText?: (props: typeof __VLS_155) => any;
|
|
1633
|
+
} & {
|
|
1634
|
+
'center-footer'?: (props: typeof __VLS_157) => any;
|
|
1635
|
+
} & {
|
|
1636
|
+
confirmText?: (props: typeof __VLS_167) => any;
|
|
1637
|
+
} & {
|
|
1638
|
+
'append-footer'?: (props: typeof __VLS_169) => any;
|
|
1639
|
+
};
|
|
1640
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
1641
|
+
zIndex: number;
|
|
1642
|
+
appendToMain: boolean;
|
|
1643
|
+
closeIconPlacement: import("./drawer").CloseIconPlacement;
|
|
1644
|
+
destroyOnClose: boolean;
|
|
1645
|
+
submitting: boolean;
|
|
1646
|
+
drawerApi: ExtendedDrawerApi;
|
|
1647
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1648
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1649
|
+
declare const _default: typeof __VLS_export;
|
|
1650
|
+
export default _default;
|
|
1651
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
1652
|
+
new (): {
|
|
1653
|
+
$slots: S;
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1656
|
+
export declare function setDefaultDrawerProps(props: Partial<DrawerProps>): void;
|
|
1657
|
+
export declare function useAdminDrawer<TParentDrawerProps extends DrawerProps = DrawerProps>(options?: DrawerApiOptions): readonly [import("vue").DefineSetupFnComponent<DrawerProps, {}, {}, DrawerProps & {}, import("vue").PublicProps>, ExtendedDrawerApi];
|
|
1658
|
+
import type { Component, Ref } from 'vue';
|
|
1659
|
+
export interface ModalProps {
|
|
1660
|
+
/**
|
|
1661
|
+
* 动画类型
|
|
1662
|
+
* @default 'slide'
|
|
1663
|
+
*/
|
|
1664
|
+
animationType?: 'scale' | 'slide';
|
|
1665
|
+
/**
|
|
1666
|
+
* 是否要挂载到内容区域
|
|
1667
|
+
* @default false
|
|
1668
|
+
*/
|
|
1669
|
+
appendToMain?: boolean;
|
|
1670
|
+
/**
|
|
1671
|
+
* 是否显示边框
|
|
1672
|
+
* @default false
|
|
1673
|
+
*/
|
|
1674
|
+
bordered?: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* 取消按钮文字
|
|
1677
|
+
*/
|
|
1678
|
+
cancelText?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* 是否居中
|
|
1681
|
+
* @default false
|
|
1682
|
+
*/
|
|
1683
|
+
centered?: boolean;
|
|
1684
|
+
class?: string;
|
|
1685
|
+
/**
|
|
1686
|
+
* 是否显示右上角的关闭按钮
|
|
1687
|
+
* @default true
|
|
1688
|
+
*/
|
|
1689
|
+
closable?: boolean;
|
|
1690
|
+
/**
|
|
1691
|
+
* 点击弹窗遮罩是否关闭弹窗
|
|
1692
|
+
* @default true
|
|
1693
|
+
*/
|
|
1694
|
+
closeOnClickModal?: boolean;
|
|
1695
|
+
/**
|
|
1696
|
+
* 按下 ESC 键是否关闭弹窗
|
|
1697
|
+
* @default true
|
|
1698
|
+
*/
|
|
1699
|
+
closeOnPressEscape?: boolean;
|
|
1700
|
+
/**
|
|
1701
|
+
* 禁用确认按钮
|
|
1702
|
+
*/
|
|
1703
|
+
confirmDisabled?: boolean;
|
|
1704
|
+
/**
|
|
1705
|
+
* 确定按钮 loading
|
|
1706
|
+
* @default false
|
|
1707
|
+
*/
|
|
1708
|
+
confirmLoading?: boolean;
|
|
1709
|
+
/**
|
|
1710
|
+
* 确定按钮文字
|
|
1711
|
+
*/
|
|
1712
|
+
confirmText?: string;
|
|
1713
|
+
contentClass?: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* 弹窗描述
|
|
1716
|
+
*/
|
|
1717
|
+
description?: string;
|
|
1718
|
+
/**
|
|
1719
|
+
* 在关闭时销毁弹窗
|
|
1720
|
+
*/
|
|
1721
|
+
destroyOnClose?: boolean;
|
|
1722
|
+
/**
|
|
1723
|
+
* 是否可拖拽
|
|
1724
|
+
* @default false
|
|
1725
|
+
*/
|
|
1726
|
+
draggable?: boolean;
|
|
1727
|
+
/**
|
|
1728
|
+
* 是否显示底部
|
|
1729
|
+
* @default true
|
|
1730
|
+
*/
|
|
1731
|
+
footer?: boolean;
|
|
1732
|
+
footerClass?: string;
|
|
1733
|
+
/**
|
|
1734
|
+
* 是否全屏
|
|
1735
|
+
* @default false
|
|
1736
|
+
*/
|
|
1737
|
+
fullscreen?: boolean;
|
|
1738
|
+
/**
|
|
1739
|
+
* 是否显示全屏按钮
|
|
1740
|
+
* @default true
|
|
1741
|
+
*/
|
|
1742
|
+
fullscreenButton?: boolean;
|
|
1743
|
+
/**
|
|
1744
|
+
* 是否显示顶栏
|
|
1745
|
+
* @default true
|
|
1746
|
+
*/
|
|
1747
|
+
header?: boolean;
|
|
1748
|
+
headerClass?: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* 弹窗是否显示
|
|
1751
|
+
* @default false
|
|
1752
|
+
*/
|
|
1753
|
+
loading?: boolean;
|
|
1754
|
+
/**
|
|
1755
|
+
* 是否显示遮罩
|
|
1756
|
+
* @default true
|
|
1757
|
+
*/
|
|
1758
|
+
modal?: boolean;
|
|
1759
|
+
/**
|
|
1760
|
+
* 是否自动聚焦
|
|
1761
|
+
*/
|
|
1762
|
+
openAutoFocus?: boolean;
|
|
1763
|
+
/**
|
|
1764
|
+
* 弹窗遮罩模糊效果
|
|
1765
|
+
*/
|
|
1766
|
+
overlayBlur?: number;
|
|
1767
|
+
/**
|
|
1768
|
+
* 是否显示取消按钮
|
|
1769
|
+
* @default true
|
|
1770
|
+
*/
|
|
1771
|
+
showCancelButton?: boolean;
|
|
1772
|
+
/**
|
|
1773
|
+
* 是否显示确认按钮
|
|
1774
|
+
* @default true
|
|
1775
|
+
*/
|
|
1776
|
+
showConfirmButton?: boolean;
|
|
1777
|
+
/**
|
|
1778
|
+
* 提交中(锁定弹窗状态)
|
|
1779
|
+
*/
|
|
1780
|
+
submitting?: boolean;
|
|
1781
|
+
/**
|
|
1782
|
+
* 弹窗标题
|
|
1783
|
+
*/
|
|
1784
|
+
title?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* 弹窗标题提示
|
|
1787
|
+
*/
|
|
1788
|
+
titleTooltip?: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* 弹窗层级
|
|
1791
|
+
*/
|
|
1792
|
+
zIndex?: number;
|
|
1793
|
+
}
|
|
1794
|
+
export interface ModalState extends ModalProps {
|
|
1795
|
+
/** 弹窗打开状态 */
|
|
1796
|
+
isOpen?: boolean;
|
|
1797
|
+
/**
|
|
1798
|
+
* 共享数据
|
|
1799
|
+
*/
|
|
1800
|
+
sharedData?: Record<string, any>;
|
|
1801
|
+
}
|
|
1802
|
+
export type ExtendedModalApi = ModalApi & {
|
|
1803
|
+
useStore: <T = NoInfer<ModalState>>(selector?: (state: NoInfer<ModalState>) => T) => Readonly<Ref<T>>;
|
|
1804
|
+
};
|
|
1805
|
+
export interface ModalApiOptions extends ModalState {
|
|
1806
|
+
/**
|
|
1807
|
+
* 独立的弹窗组件
|
|
1808
|
+
*/
|
|
1809
|
+
connectedComponent?: Component;
|
|
1810
|
+
/**
|
|
1811
|
+
* 关闭前的回调,返回 false 可以阻止关闭
|
|
1812
|
+
* @returns
|
|
1813
|
+
*/
|
|
1814
|
+
onBeforeClose?: () => MaybePromise<boolean | undefined>;
|
|
1815
|
+
/**
|
|
1816
|
+
* 点击取消按钮的回调
|
|
1817
|
+
*/
|
|
1818
|
+
onCancel?: () => void;
|
|
1819
|
+
/**
|
|
1820
|
+
* 弹窗关闭动画结束的回调
|
|
1821
|
+
* @returns
|
|
1822
|
+
*/
|
|
1823
|
+
onClosed?: () => void;
|
|
1824
|
+
/**
|
|
1825
|
+
* 点击确定按钮的回调
|
|
1826
|
+
*/
|
|
1827
|
+
onConfirm?: () => void;
|
|
1828
|
+
/**
|
|
1829
|
+
* 弹窗状态变化回调
|
|
1830
|
+
* @param isOpen
|
|
1831
|
+
* @returns
|
|
1832
|
+
*/
|
|
1833
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
1834
|
+
/**
|
|
1835
|
+
* 弹窗打开动画结束的回调
|
|
1836
|
+
* @returns
|
|
1837
|
+
*/
|
|
1838
|
+
onOpened?: () => void;
|
|
1839
|
+
}
|
|
1840
|
+
interface Props extends ModalProps {
|
|
1841
|
+
modalApi?: ExtendedModalApi;
|
|
1842
|
+
}
|
|
1843
|
+
declare var __VLS_41: {}, __VLS_43: {}, __VLS_57: {}, __VLS_75: {}, __VLS_108: {}, __VLS_110: {}, __VLS_120: {}, __VLS_122: {}, __VLS_132: {}, __VLS_134: {};
|
|
1844
|
+
type __VLS_Slots = {} & {
|
|
1845
|
+
title?: (props: typeof __VLS_41) => any;
|
|
1846
|
+
} & {
|
|
1847
|
+
titleTooltip?: (props: typeof __VLS_43) => any;
|
|
1848
|
+
} & {
|
|
1849
|
+
description?: (props: typeof __VLS_57) => any;
|
|
1850
|
+
} & {
|
|
1851
|
+
default?: (props: typeof __VLS_75) => any;
|
|
1852
|
+
} & {
|
|
1853
|
+
'prepend-footer'?: (props: typeof __VLS_108) => any;
|
|
1854
|
+
} & {
|
|
1855
|
+
footer?: (props: typeof __VLS_110) => any;
|
|
1856
|
+
} & {
|
|
1857
|
+
cancelText?: (props: typeof __VLS_120) => any;
|
|
1858
|
+
} & {
|
|
1859
|
+
'center-footer'?: (props: typeof __VLS_122) => any;
|
|
1860
|
+
} & {
|
|
1861
|
+
confirmText?: (props: typeof __VLS_132) => any;
|
|
1862
|
+
} & {
|
|
1863
|
+
'append-footer'?: (props: typeof __VLS_134) => any;
|
|
1864
|
+
};
|
|
1865
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
1866
|
+
appendToMain: boolean;
|
|
1867
|
+
destroyOnClose: boolean;
|
|
1868
|
+
modalApi: ExtendedModalApi;
|
|
1869
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1870
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1871
|
+
declare const _default: typeof __VLS_export;
|
|
1872
|
+
export default _default;
|
|
1873
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
1874
|
+
new (): {
|
|
1875
|
+
$slots: S;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
export declare function setDefaultModalProps(props: Partial<ModalProps>): void;
|
|
1879
|
+
export declare function useAdminModal<TParentModalProps extends ModalProps = ModalProps>(options?: ModalApiOptions): readonly [import("vue").DefineSetupFnComponent<ModalProps, {}, {}, ModalProps & {}, import("vue").PublicProps>, ExtendedModalApi];
|
|
579
1880
|
|
|
580
1881
|
|
|
581
1882
|
// ==========================================
|
|
582
1883
|
// From @admin-kit/tabs-ui
|
|
583
1884
|
// ==========================================
|
|
584
|
-
|
|
585
|
-
|
|
1885
|
+
declare const __VLS_export: import("vue").DefineComponent<DropdownMenuProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DropdownMenuProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1886
|
+
declare const _default: typeof __VLS_export;
|
|
1887
|
+
export default _default;
|
|
1888
|
+
type __VLS_ModelProps = {
|
|
1889
|
+
'screen'?: boolean;
|
|
1890
|
+
};
|
|
1891
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1892
|
+
"update:screen": (value: boolean | undefined) => any;
|
|
1893
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
1894
|
+
"onUpdate:screen"?: ((value: boolean | undefined) => any) | undefined;
|
|
1895
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1896
|
+
declare const _default: typeof __VLS_export;
|
|
1897
|
+
export default _default;
|
|
1898
|
+
interface Props extends TabsProps {
|
|
1899
|
+
}
|
|
1900
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1901
|
+
close: (args_0: string) => any;
|
|
1902
|
+
unpin: (args_0: import("@admin-kit/typings").TabDefinition) => any;
|
|
1903
|
+
sortTabs: (args_0: number, args_1: number) => any;
|
|
1904
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
1905
|
+
onClose?: ((args_0: string) => any) | undefined;
|
|
1906
|
+
onUnpin?: ((args_0: import("@admin-kit/typings").TabDefinition) => any) | undefined;
|
|
1907
|
+
onSortTabs?: ((args_0: number, args_1: number) => any) | undefined;
|
|
1908
|
+
}>, {
|
|
1909
|
+
contentClass: string;
|
|
1910
|
+
styleType: import("@admin-kit/typings").TabsStyleType;
|
|
1911
|
+
draggable: boolean;
|
|
1912
|
+
wheelable: boolean;
|
|
1913
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1914
|
+
declare const _default: typeof __VLS_export;
|
|
1915
|
+
export default _default;
|
|
586
1916
|
export type { IContextMenuItem } from '@admin-kit/shadcn-ui';
|
|
587
1917
|
|