@aoao-y33/ui 0.0.2
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/README.md +811 -0
- package/dist/button/components/button/button.vue.d.ts +22 -0
- package/dist/button/components/button/button.vue.d.ts.map +1 -0
- package/dist/button/components/button/index.d.ts +3 -0
- package/dist/button/components/button/index.d.ts.map +1 -0
- package/dist/button/components/button/props.d.ts +21 -0
- package/dist/button/components/button/props.d.ts.map +1 -0
- package/dist/button/components/fields/index.d.ts +2 -0
- package/dist/button/components/fields/index.d.ts.map +1 -0
- package/dist/button/hoc/index.d.ts +2 -0
- package/dist/button/hoc/index.d.ts.map +1 -0
- package/dist/button/hoc/useButton.d.ts +19 -0
- package/dist/button/hoc/useButton.d.ts.map +1 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/utils/index.d.ts +4 -0
- package/dist/button/utils/index.d.ts.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/utils/iconUtils.d.ts +2 -0
- package/dist/common/utils/iconUtils.d.ts.map +1 -0
- package/dist/common/utils/index.d.ts +2 -0
- package/dist/common/utils/index.d.ts.map +1 -0
- package/dist/form/components/fields/index.d.ts +2 -0
- package/dist/form/components/fields/index.d.ts.map +1 -0
- package/dist/form/components/form/form.vue.d.ts +42 -0
- package/dist/form/components/form/form.vue.d.ts.map +1 -0
- package/dist/form/components/form/index.d.ts +90 -0
- package/dist/form/components/form/index.d.ts.map +1 -0
- package/dist/form/components/form/props.d.ts +21 -0
- package/dist/form/components/form/props.d.ts.map +1 -0
- package/dist/form/components/form-item/form-item.vue.d.ts +19 -0
- package/dist/form/components/form-item/form-item.vue.d.ts.map +1 -0
- package/dist/form/components/form-item/index.d.ts +31 -0
- package/dist/form/components/form-item/index.d.ts.map +1 -0
- package/dist/form/components/form-item/props.d.ts +14 -0
- package/dist/form/components/form-item/props.d.ts.map +1 -0
- package/dist/form/hoc/index.d.ts +4 -0
- package/dist/form/hoc/index.d.ts.map +1 -0
- package/dist/form/hoc/useForm.d.ts +13 -0
- package/dist/form/hoc/useForm.d.ts.map +1 -0
- package/dist/form/hoc/useFormExpose.d.ts +24 -0
- package/dist/form/hoc/useFormExpose.d.ts.map +1 -0
- package/dist/form/hoc/useFormFetch.d.ts +25 -0
- package/dist/form/hoc/useFormFetch.d.ts.map +1 -0
- package/dist/form/index.d.ts +6 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/utils/index.d.ts +9 -0
- package/dist/form/utils/index.d.ts.map +1 -0
- package/dist/global.d.ts +33 -0
- package/dist/global.d.ts.map +1 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38948 -0
- package/dist/layout/components/fields/basic/basic.vue.d.ts +20 -0
- package/dist/layout/components/fields/basic/basic.vue.d.ts.map +1 -0
- package/dist/layout/components/fields/index.d.ts +2 -0
- package/dist/layout/components/fields/index.d.ts.map +1 -0
- package/dist/layout/components/fields/side/side.vue.d.ts +20 -0
- package/dist/layout/components/fields/side/side.vue.d.ts.map +1 -0
- package/dist/layout/components/fields/top/top.vue.d.ts +18 -0
- package/dist/layout/components/fields/top/top.vue.d.ts.map +1 -0
- package/dist/layout/components/layout/index.d.ts +22 -0
- package/dist/layout/components/layout/index.d.ts.map +1 -0
- package/dist/layout/components/layout/layout.vue.d.ts +15 -0
- package/dist/layout/components/layout/layout.vue.d.ts.map +1 -0
- package/dist/layout/components/layout/props.d.ts +4 -0
- package/dist/layout/components/layout/props.d.ts.map +1 -0
- package/dist/layout/hoc/index.d.ts +2 -0
- package/dist/layout/hoc/index.d.ts.map +1 -0
- package/dist/layout/hoc/useLayout.d.ts +12 -0
- package/dist/layout/hoc/useLayout.d.ts.map +1 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/utils/index.d.ts +4 -0
- package/dist/layout/utils/index.d.ts.map +1 -0
- package/dist/modal/components/form-modal/form-modal.vue.d.ts +46 -0
- package/dist/modal/components/form-modal/form-modal.vue.d.ts.map +1 -0
- package/dist/modal/components/form-modal/index.d.ts +101 -0
- package/dist/modal/components/form-modal/index.d.ts.map +1 -0
- package/dist/modal/components/form-modal/props.d.ts +19 -0
- package/dist/modal/components/form-modal/props.d.ts.map +1 -0
- package/dist/modal/components/modal/index.d.ts +53 -0
- package/dist/modal/components/modal/index.d.ts.map +1 -0
- package/dist/modal/components/modal/modal.vue.d.ts +29 -0
- package/dist/modal/components/modal/modal.vue.d.ts.map +1 -0
- package/dist/modal/components/modal/props.d.ts +24 -0
- package/dist/modal/components/modal/props.d.ts.map +1 -0
- package/dist/modal/hoc/index.d.ts +4 -0
- package/dist/modal/hoc/index.d.ts.map +1 -0
- package/dist/modal/hoc/useFormModal.d.ts +13 -0
- package/dist/modal/hoc/useFormModal.d.ts.map +1 -0
- package/dist/modal/hoc/useModal.d.ts +12 -0
- package/dist/modal/hoc/useModal.d.ts.map +1 -0
- package/dist/modal/hoc/useModalExpose.d.ts +8 -0
- package/dist/modal/hoc/useModalExpose.d.ts.map +1 -0
- package/dist/modal/index.d.ts +4 -0
- package/dist/modal/index.d.ts.map +1 -0
- package/dist/table/components/fields/action-column/action-column.vue.d.ts +6 -0
- package/dist/table/components/fields/action-column/action-column.vue.d.ts.map +1 -0
- package/dist/table/components/fields/action-column/props.d.ts +8 -0
- package/dist/table/components/fields/action-column/props.d.ts.map +1 -0
- package/dist/table/components/fields/index.d.ts +2 -0
- package/dist/table/components/fields/index.d.ts.map +1 -0
- package/dist/table/components/table/index.d.ts +58 -0
- package/dist/table/components/table/index.d.ts.map +1 -0
- package/dist/table/components/table/props.d.ts +43 -0
- package/dist/table/components/table/props.d.ts.map +1 -0
- package/dist/table/components/table/table.vue.d.ts +33 -0
- package/dist/table/components/table/table.vue.d.ts.map +1 -0
- package/dist/table/components/table-column/index.d.ts +6 -0
- package/dist/table/components/table-column/index.d.ts.map +1 -0
- package/dist/table/components/table-column/props.d.ts +6 -0
- package/dist/table/components/table-column/props.d.ts.map +1 -0
- package/dist/table/components/table-column/table-column.vue.d.ts +6 -0
- package/dist/table/components/table-column/table-column.vue.d.ts.map +1 -0
- package/dist/table/components/table-page/index.d.ts +12 -0
- package/dist/table/components/table-page/index.d.ts.map +1 -0
- package/dist/table/components/table-page/props.d.ts +13 -0
- package/dist/table/components/table-page/props.d.ts.map +1 -0
- package/dist/table/components/table-page/table-page.vue.d.ts +11 -0
- package/dist/table/components/table-page/table-page.vue.d.ts.map +1 -0
- package/dist/table/components/table-select/index.d.ts +73 -0
- package/dist/table/components/table-select/index.d.ts.map +1 -0
- package/dist/table/components/table-select/props.d.ts +21 -0
- package/dist/table/components/table-select/props.d.ts.map +1 -0
- package/dist/table/components/table-select/table-select.vue.d.ts +36 -0
- package/dist/table/components/table-select/table-select.vue.d.ts.map +1 -0
- package/dist/table/hoc/index.d.ts +3 -0
- package/dist/table/hoc/index.d.ts.map +1 -0
- package/dist/table/hoc/useTable.d.ts +33 -0
- package/dist/table/hoc/useTable.d.ts.map +1 -0
- package/dist/table/hoc/useTableExpose.d.ts +7 -0
- package/dist/table/hoc/useTableExpose.d.ts.map +1 -0
- package/dist/table/index.d.ts +8 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/utils/index.d.ts +4 -0
- package/dist/table/utils/index.d.ts.map +1 -0
- package/package.json +42 -0
- package/src/button/components/button/button.vue +64 -0
- package/src/button/components/button/index.ts +2 -0
- package/src/button/components/button/props.ts +75 -0
- package/src/button/components/fields/index.ts +6 -0
- package/src/button/hoc/index.ts +1 -0
- package/src/button/hoc/useButton.ts +27 -0
- package/src/button/index.ts +4 -0
- package/src/button/utils/index.ts +32 -0
- package/src/common/index.ts +1 -0
- package/src/common/utils/iconUtils.ts +21 -0
- package/src/common/utils/index.ts +1 -0
- package/src/form/components/fields/index.ts +35 -0
- package/src/form/components/form/form.vue +130 -0
- package/src/form/components/form/index.ts +6 -0
- package/src/form/components/form/props.ts +73 -0
- package/src/form/components/form-item/form-item.vue +90 -0
- package/src/form/components/form-item/index.ts +6 -0
- package/src/form/components/form-item/props.ts +50 -0
- package/src/form/hoc/index.ts +3 -0
- package/src/form/hoc/useForm.ts +106 -0
- package/src/form/hoc/useFormExpose.ts +97 -0
- package/src/form/hoc/useFormFetch.ts +103 -0
- package/src/form/index.ts +5 -0
- package/src/form/utils/index.ts +149 -0
- package/src/global.ts +40 -0
- package/src/index.ts +37 -0
- package/src/layout/components/fields/basic/basic.vue +18 -0
- package/src/layout/components/fields/index.ts +10 -0
- package/src/layout/components/fields/side/side.vue +26 -0
- package/src/layout/components/fields/top/top.vue +13 -0
- package/src/layout/components/layout/index.ts +6 -0
- package/src/layout/components/layout/layout.vue +19 -0
- package/src/layout/components/layout/props.ts +3 -0
- package/src/layout/hoc/index.ts +1 -0
- package/src/layout/hoc/useLayout.ts +32 -0
- package/src/layout/index.ts +4 -0
- package/src/layout/utils/index.ts +31 -0
- package/src/modal/components/form-modal/form-modal.vue +158 -0
- package/src/modal/components/form-modal/index.ts +5 -0
- package/src/modal/components/form-modal/props.ts +61 -0
- package/src/modal/components/modal/index.ts +6 -0
- package/src/modal/components/modal/modal.vue +127 -0
- package/src/modal/components/modal/props.ts +78 -0
- package/src/modal/hoc/index.ts +3 -0
- package/src/modal/hoc/useFormModal.ts +140 -0
- package/src/modal/hoc/useModal.ts +151 -0
- package/src/modal/hoc/useModalExpose.ts +52 -0
- package/src/modal/index.ts +3 -0
- package/src/style/index.css +21 -0
- package/src/table/components/fields/action-column/action-column.vue +34 -0
- package/src/table/components/fields/action-column/props.ts +8 -0
- package/src/table/components/fields/index.ts +6 -0
- package/src/table/components/table/index.ts +6 -0
- package/src/table/components/table/props.ts +148 -0
- package/src/table/components/table/table.vue +77 -0
- package/src/table/components/table-column/index.ts +6 -0
- package/src/table/components/table-column/props.ts +26 -0
- package/src/table/components/table-column/table-column.vue +31 -0
- package/src/table/components/table-page/index.ts +6 -0
- package/src/table/components/table-page/props.ts +48 -0
- package/src/table/components/table-page/table-page.vue +51 -0
- package/src/table/components/table-select/index.ts +6 -0
- package/src/table/components/table-select/props.ts +79 -0
- package/src/table/components/table-select/table-select.vue +70 -0
- package/src/table/hoc/index.ts +2 -0
- package/src/table/hoc/useTable.ts +206 -0
- package/src/table/hoc/useTableExpose.ts +46 -0
- package/src/table/index.ts +7 -0
- package/src/table/utils/index.ts +37 -0
- package/tsconfig.json +30 -0
- package/vite.config.ts +49 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AxButtonProps } from './props';
|
|
2
|
+
type __VLS_Props = AxButtonProps;
|
|
3
|
+
declare var __VLS_11: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
default?: (props: typeof __VLS_11) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
click: (data: any) => any;
|
|
9
|
+
dblClick: (data: any) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClick?: ((data: any) => any) | undefined;
|
|
12
|
+
onDblClick?: ((data: any) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=button.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.vue.d.ts","sourceRoot":"","sources":["../../../../src/button/components/button/button.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAC,aAAa,EAAgB,MAAM,SAAS,CAAC;AAI1D,KAAK,WAAW,GAAG,aAAa,CAAC;AAmHjC,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAC,MAAM,cAAc,CAAA;AACjD,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { buttonFields } from '../..';
|
|
2
|
+
import { ButtonProps } from 'element-plus';
|
|
3
|
+
import { EmitsToEventProps } from '@aoao-y33/utils';
|
|
4
|
+
import { Component } from 'vue';
|
|
5
|
+
export interface AxButtonProps<E = any, T = ButtonProps> {
|
|
6
|
+
text?: string;
|
|
7
|
+
type?: keyof typeof buttonFields;
|
|
8
|
+
componentProps?: T;
|
|
9
|
+
className?: string;
|
|
10
|
+
icon?: string | Component;
|
|
11
|
+
disabled?: ((data: E) => boolean) | (boolean);
|
|
12
|
+
hidden?: ((data: E) => boolean) | (boolean);
|
|
13
|
+
isMl?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AxButtonEmits<T = any> {
|
|
16
|
+
"click": [data: T];
|
|
17
|
+
"dblClick": [data: T];
|
|
18
|
+
}
|
|
19
|
+
export interface AxButtonOptions<E = any, T = ButtonProps> extends AxButtonProps<E, T>, Partial<EmitsToEventProps<AxButtonEmits<E>>> {
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/button/components/button/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AAEnC,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,WAAW;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,OAAO,YAAY,CAAA;IAChC,cAAc,CAAC,EAAE,CAAC,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAC,MAAM,GAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,CAAC,EAAC,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG;IAClC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;CACxB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,WAAW,CACrD,SAAQ,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACvB,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/components/fields/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,YAE5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/hoc/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxButtonOptions } from '..';
|
|
2
|
+
import { ButtonProps } from 'element-plus';
|
|
3
|
+
/**
|
|
4
|
+
* 按钮高阶函数 - 用于创建可动态配置的按钮组件
|
|
5
|
+
*
|
|
6
|
+
* @template E - 事件类型,默认为 any
|
|
7
|
+
* @template T - 按钮属性类型,默认为 ButtonProps
|
|
8
|
+
* @param options - 按钮初始配置选项
|
|
9
|
+
* @returns 返回一个元组 [Button组件, setButton更新函数]
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const [MyButton, setButton] = useButton({ text: '点击' });
|
|
13
|
+
* // 后续可以通过 setButton 动态更新按钮属性
|
|
14
|
+
* setButton({ text: '新文本', disabled: true });
|
|
15
|
+
*/
|
|
16
|
+
export declare function useButton<E = any, T = ButtonProps>(options?: AxButtonOptions<E, T>): readonly [import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, import('@aoao-y33/hooks').StateApi<AxButtonOptions<E, T>>];
|
|
19
|
+
//# sourceMappingURL=useButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useButton.d.ts","sourceRoot":"","sources":["../../../src/button/hoc/useButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,eAAe,EAAC,MAAM,UAAU,CAAC;AAGxD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAC,GAAG,EAAC,CAAC,GAAC,WAAW,EAAE,OAAO,GAAC,eAAe,CAAC,CAAC,EAAC,CAAC,CAAI;;wSAQ7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AACnC,eAAO,MAAM,YAAY,EAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAK,CAAC;AACxD,eAAO,MAAM,cAAc,GAAG,MAAK,MAAM,EAAC,WAAU,SAAS,SAK5D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconUtils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/iconUtils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,QAEpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/components/fields/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,YAM1B,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FormInstance } from 'element-plus';
|
|
2
|
+
import { AxFormProps } from './props';
|
|
3
|
+
type __VLS_Props = AxFormProps;
|
|
4
|
+
declare var __VLS_11: {}, __VLS_26: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_11) => any;
|
|
7
|
+
} & {
|
|
8
|
+
button?: (props: typeof __VLS_26) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
11
|
+
setConfig: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').FetchOptions<any, any>>;
|
|
12
|
+
setApi: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').RequestFetch<any, any>>;
|
|
13
|
+
load: (params?: any) => Promise<any>;
|
|
14
|
+
getConfig: () => import('@aoao-y33/hooks').FetchOptions<any, any>;
|
|
15
|
+
get: () => any;
|
|
16
|
+
getReady: () => boolean;
|
|
17
|
+
setParams: (data: any, load?: boolean) => void;
|
|
18
|
+
reload: () => void;
|
|
19
|
+
getElForm: () => FormInstance;
|
|
20
|
+
getValues: () => {};
|
|
21
|
+
getValue: (fieldName: string) => any;
|
|
22
|
+
getFields: () => string[];
|
|
23
|
+
getDefaultValues: () => {};
|
|
24
|
+
setValues: (values: Record<string, any>) => void;
|
|
25
|
+
resetValues: () => void;
|
|
26
|
+
clearValues: () => void;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
change: (data: Record<string, any>) => any;
|
|
29
|
+
submit: (data: Record<string, any>) => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onChange?: ((data: Record<string, any>) => any) | undefined;
|
|
32
|
+
onSubmit?: ((data: Record<string, any>) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=form.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.vue.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form/form.vue"],"names":[],"mappings":"AAmIA,OAAO,EAA+B,KAAK,YAAY,EAAC,MAAM,cAAc,CAAC;AAE7E,OAAO,KAAK,EAAc,WAAW,EAAC,MAAM,SAAS,CAAC;AAKtD,KAAK,WAAW,GAAG,WAAW,CAAC;AA2M/B,QAAA,IAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;;0BAjJa,MAAM;;;wBAWR,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;;kFA0I5C,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { default as form } from './form.vue';
|
|
2
|
+
export * from './props';
|
|
3
|
+
export declare const AxForm: {
|
|
4
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./props').AxFormProps<any>> & Readonly<{
|
|
5
|
+
onChange?: ((data: Record<string, any>) => any) | undefined;
|
|
6
|
+
onSubmit?: ((data: Record<string, any>) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
setConfig: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').FetchOptions<any, any>>;
|
|
9
|
+
setApi: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').RequestFetch<any, any>>;
|
|
10
|
+
load: (params?: any) => Promise<any>;
|
|
11
|
+
getConfig: () => import('@aoao-y33/hooks').FetchOptions<any, any>;
|
|
12
|
+
get: () => any;
|
|
13
|
+
getReady: () => boolean;
|
|
14
|
+
setParams: (data: any, load?: boolean) => void;
|
|
15
|
+
reload: () => void;
|
|
16
|
+
getElForm: () => import('element-plus').FormInstance;
|
|
17
|
+
getValues: () => {};
|
|
18
|
+
getValue: (fieldName: string) => any;
|
|
19
|
+
getFields: () => string[];
|
|
20
|
+
getDefaultValues: () => {};
|
|
21
|
+
setValues: (values: Record<string, any>) => void;
|
|
22
|
+
resetValues: () => void;
|
|
23
|
+
clearValues: () => void;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
change: (data: Record<string, any>) => any;
|
|
26
|
+
submit: (data: Record<string, any>) => any;
|
|
27
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
28
|
+
P: {};
|
|
29
|
+
B: {};
|
|
30
|
+
D: {};
|
|
31
|
+
C: {};
|
|
32
|
+
M: {};
|
|
33
|
+
Defaults: {};
|
|
34
|
+
}, Readonly<import('./props').AxFormProps<any>> & Readonly<{
|
|
35
|
+
onChange?: ((data: Record<string, any>) => any) | undefined;
|
|
36
|
+
onSubmit?: ((data: Record<string, any>) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
setConfig: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').FetchOptions<any, any>>;
|
|
39
|
+
setApi: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').RequestFetch<any, any>>;
|
|
40
|
+
load: (params?: any) => Promise<any>;
|
|
41
|
+
getConfig: () => import('@aoao-y33/hooks').FetchOptions<any, any>;
|
|
42
|
+
get: () => any;
|
|
43
|
+
getReady: () => boolean;
|
|
44
|
+
setParams: (data: any, load?: boolean) => void;
|
|
45
|
+
reload: () => void;
|
|
46
|
+
getElForm: () => import('element-plus').FormInstance;
|
|
47
|
+
getValues: () => {};
|
|
48
|
+
getValue: (fieldName: string) => any;
|
|
49
|
+
getFields: () => string[];
|
|
50
|
+
getDefaultValues: () => {};
|
|
51
|
+
setValues: (values: Record<string, any>) => void;
|
|
52
|
+
resetValues: () => void;
|
|
53
|
+
clearValues: () => void;
|
|
54
|
+
}, {}, {}, {}, {}>;
|
|
55
|
+
__isFragment?: never;
|
|
56
|
+
__isTeleport?: never;
|
|
57
|
+
__isSuspense?: never;
|
|
58
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./props').AxFormProps<any>> & Readonly<{
|
|
59
|
+
onChange?: ((data: Record<string, any>) => any) | undefined;
|
|
60
|
+
onSubmit?: ((data: Record<string, any>) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
setConfig: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').FetchOptions<any, any>>;
|
|
63
|
+
setApi: import('@aoao-y33/hooks').StateApi<import('@aoao-y33/hooks').RequestFetch<any, any>>;
|
|
64
|
+
load: (params?: any) => Promise<any>;
|
|
65
|
+
getConfig: () => import('@aoao-y33/hooks').FetchOptions<any, any>;
|
|
66
|
+
get: () => any;
|
|
67
|
+
getReady: () => boolean;
|
|
68
|
+
setParams: (data: any, load?: boolean) => void;
|
|
69
|
+
reload: () => void;
|
|
70
|
+
getElForm: () => import('element-plus').FormInstance;
|
|
71
|
+
getValues: () => {};
|
|
72
|
+
getValue: (fieldName: string) => any;
|
|
73
|
+
getFields: () => string[];
|
|
74
|
+
getDefaultValues: () => {};
|
|
75
|
+
setValues: (values: Record<string, any>) => void;
|
|
76
|
+
resetValues: () => void;
|
|
77
|
+
clearValues: () => void;
|
|
78
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
79
|
+
change: (data: Record<string, any>) => any;
|
|
80
|
+
submit: (data: Record<string, any>) => any;
|
|
81
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
82
|
+
$slots: {
|
|
83
|
+
default?: (props: {}) => any;
|
|
84
|
+
} & {
|
|
85
|
+
button?: (props: {}) => any;
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
export type AxFormInstance = InstanceType<typeof form>;
|
|
89
|
+
export default AxForm;
|
|
90
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,cAAc,SAAS,CAAC;AACxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAO,CAAC;AAC3B,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AACvD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormProps } from 'element-plus';
|
|
2
|
+
import { AxButtonOptions, AxButtonProps } from '../../../button';
|
|
3
|
+
import { FetchOptions, FieldsConfig, RequestFetch } from '@aoao-y33/hooks';
|
|
4
|
+
import { EmitsToEventProps } from '@aoao-y33/utils';
|
|
5
|
+
import { AxFormItemOptions } from '../..';
|
|
6
|
+
export interface AxFormProps<T extends Record<string, any> = any> extends Omit<FormProps, 'model'> {
|
|
7
|
+
isDefault?: boolean;
|
|
8
|
+
submitButton?: AxButtonProps;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
api?: RequestFetch<T, any>;
|
|
11
|
+
apiConfig?: FetchOptions<T, any>;
|
|
12
|
+
}
|
|
13
|
+
export interface AxFormEmits<T extends Record<string, any> = Record<string, any>> {
|
|
14
|
+
'submit': [data: T];
|
|
15
|
+
'change': [data: T];
|
|
16
|
+
}
|
|
17
|
+
export interface AxFormOptions<T extends Record<string, any> = any> extends AxFormProps<T>, Partial<EmitsToEventProps<AxFormEmits<T>>> {
|
|
18
|
+
buttonConfig?: FieldsConfig<AxButtonOptions>;
|
|
19
|
+
fieldConfig?: FieldsConfig<AxFormItemOptions>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAG9C,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAE,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9F,SAAS,CAAC,EAAC,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAC,OAAO,CAAC;IACjB,GAAG,CAAC,EAAC,YAAY,CAAC,CAAC,EAAC,GAAG,CAAC,CAAC;IACzB,SAAS,CAAC,EAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC5E,QAAQ,EAAC,CAAC,IAAI,EAAC,CAAC,CAAC,CAAC;IAClB,QAAQ,EAAC,CAAC,IAAI,EAAC,CAAC,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAClE,SAAQ,WAAW,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAC,YAAY,CAAC,eAAe,CAAC,CAAA;IAC3C,WAAW,CAAC,EAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAC/C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormItemInstance } from 'element-plus';
|
|
2
|
+
import { AxFormItemProps } from './props';
|
|
3
|
+
declare var __VLS_19: string, __VLS_20: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
[K in NonNullable<typeof __VLS_19>]?: (props: typeof __VLS_20) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import('vue').DefineComponent<AxFormItemProps, {
|
|
8
|
+
getElFormItem: () => FormItemInstance;
|
|
9
|
+
getFormField: () => any;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxFormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=form-item.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-item.vue.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form-item/form-item.vue"],"names":[],"mappings":"AA6FA,OAAO,EAAa,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAyJ7C,QAAA,IAA4C,QAAQ,QAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,CAAC;AAQ5E,QAAA,MAAM,UAAU;yBAzGc,gBAAgB;wBAGhB,GAAG;wPAyG/B,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as FormItem } from './form-item.vue';
|
|
2
|
+
export * from './props';
|
|
3
|
+
export declare const AxFormItem: {
|
|
4
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./props').AxFormItemProps> & Readonly<{}>, {
|
|
5
|
+
getElFormItem: () => import('element-plus').FormItemInstance;
|
|
6
|
+
getFormField: () => any;
|
|
7
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
8
|
+
P: {};
|
|
9
|
+
B: {};
|
|
10
|
+
D: {};
|
|
11
|
+
C: {};
|
|
12
|
+
M: {};
|
|
13
|
+
Defaults: {};
|
|
14
|
+
}, Readonly<import('./props').AxFormItemProps> & Readonly<{}>, {
|
|
15
|
+
getElFormItem: () => import('element-plus').FormItemInstance;
|
|
16
|
+
getFormField: () => any;
|
|
17
|
+
}, {}, {}, {}, {}>;
|
|
18
|
+
__isFragment?: never;
|
|
19
|
+
__isTeleport?: never;
|
|
20
|
+
__isSuspense?: never;
|
|
21
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./props').AxFormItemProps> & Readonly<{}>, {
|
|
22
|
+
getElFormItem: () => import('element-plus').FormItemInstance;
|
|
23
|
+
getFormField: () => any;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
25
|
+
$slots: {
|
|
26
|
+
[x: string]: ((props: {}) => any) | undefined;
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
export type AxFormItemInstance = InstanceType<typeof FormItem>;
|
|
30
|
+
export default AxFormItem;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,cAAc,SAAS,CAAC;AACxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAAW,CAAC;AACnC,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC/D,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormItemProps } from 'element-plus';
|
|
2
|
+
export interface AxFormItemProps extends FormItemProps {
|
|
3
|
+
fieldName: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
vtypes?: string[];
|
|
7
|
+
defaultValue?: any;
|
|
8
|
+
componentProps?: Record<string, any>;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AxFormItemOptions extends AxFormItemProps {
|
|
12
|
+
slots?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/form/components/form-item/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,eAAgB,SAAQ,aAAa;IAClD,SAAS,EAAC,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,cAAc,CAAC,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,WAAW,CAAC,EAAC,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACtD,KAAK,CAAC,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/hoc/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxFormItemOptions, AxFormOptions, FormApi, FormFetchApi } from '..';
|
|
2
|
+
import { AxButtonOptions } from '../../button';
|
|
3
|
+
import { FieldsApi, StateApi } from '@aoao-y33/hooks';
|
|
4
|
+
import { Component } from 'vue';
|
|
5
|
+
export interface UseFormApi<T extends Record<string, any>> extends FormApi<T> {
|
|
6
|
+
setForm: StateApi<Omit<AxFormOptions, 'buttonConfig' | 'fieldConfig'>>;
|
|
7
|
+
requestApi: FormFetchApi<T>;
|
|
8
|
+
buttonsApi: FieldsApi<AxButtonOptions>;
|
|
9
|
+
fieldsApi: FieldsApi<AxFormItemOptions>;
|
|
10
|
+
}
|
|
11
|
+
export type UseFormReturn<T extends Record<string, any>> = [Component, UseFormApi<T>];
|
|
12
|
+
export declare function useForm<T extends Record<string, any>>(options?: AxFormOptions<T>): UseFormReturn<T>;
|
|
13
|
+
//# sourceMappingURL=useForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/form/hoc/useForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,iBAAiB,EAA8B,MAAM,QAAQ,CAAC;AAE/F,OAAO,EAAE,KAAK,eAAe,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,KAAK,SAAS,EAA6B,MAAM,iBAAiB,CAAC;AAE3E,OAAO,KAAK,EAAiB,aAAa,EAAE,OAAO,EAAE,YAAY,EAAC,MAAM,QAAQ,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,KAAK,SAAS,EAAoC,MAAM,KAAK,CAAC;AAGtE,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACzE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,GAAC,aAAa,CAAC,CAAC,CAAA;IACpE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC3B,UAAU,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IACtC,SAAS,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAA;CAC1C;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtF,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAE,aAAa,CAAC,CAAC,CAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAyBvG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AxFormInstance } from '..';
|
|
3
|
+
/**
|
|
4
|
+
* 表单暴露钩子函数,提供统一的表单操作接口
|
|
5
|
+
*
|
|
6
|
+
* 该函数封装了表单的各种操作方法,包括获取值、设置值、重置等,
|
|
7
|
+
* 并通过泛型提供类型安全的访问方式
|
|
8
|
+
*
|
|
9
|
+
* @template T - 表单数据类型,必须是一个记录类型的对象
|
|
10
|
+
* @param form - 表单实例的Ref引用,指向AxFormInstance类型
|
|
11
|
+
* @returns 返回包含各种表单操作方法的对象
|
|
12
|
+
*/
|
|
13
|
+
export type FormApi<T extends Record<string, any>> = ReturnType<typeof useFormExpose<T>>;
|
|
14
|
+
export declare function useFormExpose<T extends Record<string, any>>(form: Ref<AxFormInstance>): {
|
|
15
|
+
getElForm: () => import('element-plus').FormInstance;
|
|
16
|
+
getValues: () => T;
|
|
17
|
+
getValue: (field: keyof T) => T[keyof T];
|
|
18
|
+
getFields: () => (keyof T)[];
|
|
19
|
+
getDefaultValues: () => Partial<T>;
|
|
20
|
+
setValues: (values: Partial<T>) => void;
|
|
21
|
+
resetValues: () => void;
|
|
22
|
+
clearValues: () => void;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=useFormExpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormExpose.d.ts","sourceRoot":"","sources":["../../../src/form/hoc/useFormExpose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,QAAQ,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzF,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAC,GAAG,CAAC,cAAc,CAAC;;qBAgB5D,CAAC;sBAUE,MAAM,CAAC,KAAE,CAAC,CAAC,MAAM,CAAC,CAAC;qBAStB,CAAC,MAAM,CAAC,CAAC,EAAE;4BASJ,OAAO,CAAC,CAAC,CAAC;wBAUZ,OAAO,CAAC,CAAC,CAAC;;;EA2BvC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AxFormInstance } from '..';
|
|
3
|
+
import { FetchOptions, RequestFetch } from '@aoao-y33/hooks';
|
|
4
|
+
export type FormFetchApi<T extends Record<string, any>> = ReturnType<typeof useFormFetch<T>>;
|
|
5
|
+
/**
|
|
6
|
+
* 表单数据获取钩子函数,提供表单相关的API请求和数据加载功能
|
|
7
|
+
*
|
|
8
|
+
* 该函数封装了表单的配置设置、API绑定、数据加载等操作,
|
|
9
|
+
* 用于处理表单与服务端的数据交互
|
|
10
|
+
*
|
|
11
|
+
* @template T - 表单数据类型,必须是一个记录类型的对象
|
|
12
|
+
* @param formRef - 表单实例的Ref引用,指向AxFormInstance类型
|
|
13
|
+
* @returns 返回包含各种表单数据操作方法的对象
|
|
14
|
+
*/
|
|
15
|
+
export declare function useFormFetch<T extends Record<string, any>, R = any>(formRef: Ref<AxFormInstance>): {
|
|
16
|
+
setConfig: (config: FetchOptions<T, R>) => void;
|
|
17
|
+
setApi: (api: RequestFetch<T, R>) => void;
|
|
18
|
+
load: (params?: T) => Promise<any>;
|
|
19
|
+
getConfig: () => FetchOptions<any, any>;
|
|
20
|
+
get: () => any;
|
|
21
|
+
getReady: () => boolean;
|
|
22
|
+
setParams: (data: T, load?: boolean) => void;
|
|
23
|
+
reload: () => void;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useFormFetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormFetch.d.ts","sourceRoot":"","sources":["../../../src/form/hoc/useFormFetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAEhE,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5F;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAC,CAAC,GAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC;wBAO/D,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;kBASxB,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;oBAUhB,CAAC;;;;sBAsCC,CAAC,SAAS,OAAO;;EAuB7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { FormItemRule } from 'element-plus';
|
|
3
|
+
export type VFormItemRule = FormItemRule | (() => FormItemRule) | ((type: string, label?: string) => FormItemRule);
|
|
4
|
+
export declare const formFields: Record<string, Component>;
|
|
5
|
+
export declare const formRules: Record<string, VFormItemRule>;
|
|
6
|
+
export declare const addFormField: (type: string, component: Component) => void;
|
|
7
|
+
export declare const addFormRules: (type: string, rule: any) => void;
|
|
8
|
+
export declare const isTip: (type: string) => "请选择" | "请输入";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,aAAa,GACrB,YAAY,GACV,CAAC,MAAM,YAAY,CAAC,GACpB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAC,KAAK,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC,CAAA;AAGrD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAM,CAAC;AAExD,eAAO,MAAM,SAAS,EAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAmBlD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,WAAW,SAAS,SAM9D,CAAA;AAGD,eAAO,MAAM,YAAY,GAAE,MAAK,MAAM,EAAC,MAAK,GAAG,SAK9C,CAAA;AAED,eAAO,MAAM,KAAK,GAAE,MAAK,MAAM,kBAK9B,CAAA"}
|
package/dist/global.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AxButton } from './button';
|
|
2
|
+
import { AxForm, AxFormItem } from './form';
|
|
3
|
+
import { AxLayout } from './layout';
|
|
4
|
+
import { AxModal } from './modal';
|
|
5
|
+
import { AxTable, AxTablePage, AxTableSelect, AxTableColumn } from './table';
|
|
6
|
+
declare module 'vue' {
|
|
7
|
+
interface GlobalComponents {
|
|
8
|
+
AxButton: typeof AxButton;
|
|
9
|
+
AxForm: typeof AxForm;
|
|
10
|
+
AxFormItem: typeof AxFormItem;
|
|
11
|
+
AxLayout: typeof AxLayout;
|
|
12
|
+
AxModal: typeof AxModal;
|
|
13
|
+
AxTable: typeof AxTable;
|
|
14
|
+
AxTablePage: typeof AxTablePage;
|
|
15
|
+
AxTableSelect: typeof AxTableSelect;
|
|
16
|
+
AxTableColumn: typeof AxTableColumn;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
declare module 'vue' {
|
|
20
|
+
interface GlobalComponents {
|
|
21
|
+
'ax-button': typeof AxButton;
|
|
22
|
+
'ax-form': typeof AxForm;
|
|
23
|
+
'ax-form-item': typeof AxFormItem;
|
|
24
|
+
'ax-layout': typeof AxLayout;
|
|
25
|
+
'ax-modal': typeof AxModal;
|
|
26
|
+
'ax-table': typeof AxTable;
|
|
27
|
+
'ax-table-page': typeof AxTablePage;
|
|
28
|
+
'ax-table-select': typeof AxTableSelect;
|
|
29
|
+
'ax-table-column': typeof AxTableColumn;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEjF,OAAO,QAAQ,KAAK,CAAC;IACjB,UAAiB,gBAAgB;QAC7B,QAAQ,EAAE,OAAO,QAAQ,CAAA;QACzB,MAAM,EAAE,OAAO,MAAM,CAAA;QACrB,UAAU,EAAE,OAAO,UAAU,CAAA;QAC7B,QAAQ,EAAE,OAAO,QAAQ,CAAA;QACzB,OAAO,EAAE,OAAO,OAAO,CAAA;QACvB,OAAO,EAAE,OAAO,OAAO,CAAA;QACvB,WAAW,EAAE,OAAO,WAAW,CAAA;QAC/B,aAAa,EAAE,OAAO,aAAa,CAAA;QACnC,aAAa,EAAE,OAAO,aAAa,CAAA;KACtC;CACJ;AAGD,OAAO,QAAQ,KAAK,CAAC;IACjB,UAAiB,gBAAgB;QAC7B,WAAW,EAAE,OAAO,QAAQ,CAAA;QAC5B,SAAS,EAAE,OAAO,MAAM,CAAA;QACxB,cAAc,EAAE,OAAO,UAAU,CAAA;QACjC,WAAW,EAAE,OAAO,QAAQ,CAAA;QAC5B,UAAU,EAAE,OAAO,OAAO,CAAA;QAC1B,UAAU,EAAE,OAAO,OAAO,CAAA;QAC1B,eAAe,EAAE,OAAO,WAAW,CAAA;QACnC,iBAAiB,EAAE,OAAO,aAAa,CAAA;QACvC,iBAAiB,EAAE,OAAO,aAAa,CAAA;KAC1C;CACJ;AAED,OAAO,EAAE,CAAA"}
|