ax-libs 0.0.4 → 0.0.6

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.
@@ -12,7 +12,7 @@ type UseAxFormModalReturn<T extends Record<string, any>, R = any> = readonly [
12
12
  fieldsApi: ListApi<AxFormItemOptions<T>>;
13
13
  buttonApi: ListApi<AxButtonOptions>;
14
14
  requestApi: FetchApi<T, R>;
15
- close?: () => void;
15
+ close: () => void;
16
16
  open: () => void;
17
17
  } & FormApi
18
18
  ];
@@ -1,9 +1,9 @@
1
1
  import { AxButtonProps } from '../../..';
2
2
  import { ButtonProps } from 'element-plus';
3
- declare const __VLS_export: <T = ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ declare const __VLS_export: <T extends Record<string, any> = ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: import('vue').PublicProps & __VLS_PrettifyLocal<AxButtonProps<T> & {
5
- onClick?: (() => any) | undefined;
6
- onDblclick?: (() => any) | undefined;
5
+ onClick?: ((data?: any) => any) | undefined;
6
+ onDblclick?: ((data?: any) => any) | undefined;
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
@@ -12,7 +12,7 @@ declare const __VLS_export: <T = ButtonProps>(__VLS_props: NonNullable<Awaited<t
12
12
  slots: {
13
13
  default?: (props: {}) => any;
14
14
  };
15
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
15
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
16
16
  }>) => import('vue').VNode & {
17
17
  __ctx?: Awaited<typeof __VLS_setup>;
18
18
  };
@@ -1,7 +1,7 @@
1
1
  export * from './props';
2
- export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
2
+ export declare const AxButton: <T extends Record<string, any> = import('element-plus').ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
3
3
  attrs: any;
4
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
4
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
5
5
  slots: {
6
6
  default?: (props: {}) => any;
7
7
  };
@@ -12,8 +12,10 @@ export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_pr
12
12
  text?: string | undefined;
13
13
  auth?: string | undefined;
14
14
  className?: string | undefined;
15
- onClick?: (() => any) | undefined;
16
- onDblclick?: (() => any) | undefined;
15
+ disabled?: ((data?: any) => boolean) | boolean | undefined;
16
+ hidden?: ((data?: any) => boolean) | boolean | undefined;
17
+ onClick?: ((data?: any) => any) | undefined;
18
+ onDblclick?: ((data?: any) => any) | undefined;
17
19
  } & (typeof globalThis extends {
18
20
  __VLS_PROPS_FALLBACK: infer P;
19
21
  } ? P : {});
@@ -22,7 +24,7 @@ export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_pr
22
24
  slots: {
23
25
  default?: (props: {}) => any;
24
26
  };
25
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
27
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
26
28
  }>) => import('vue').VNode & {
27
29
  __ctx?: Awaited<typeof __VLS_setup>;
28
30
  };
@@ -1,15 +1,17 @@
1
1
  import { ButtonProps } from 'element-plus';
2
2
  import { EmitsToProps } from '../../../../utils';
3
- export interface AxButtonProps<T = ButtonProps> {
3
+ export interface AxButtonProps<T extends Record<string, any> = ButtonProps> {
4
4
  type?: string;
5
5
  componentProps?: T;
6
6
  text?: string;
7
7
  auth?: string;
8
8
  className?: string;
9
+ disabled?: ((data?: any) => boolean) | boolean;
10
+ hidden?: ((data?: any) => boolean) | boolean;
9
11
  }
10
12
  export interface AxButtonEmits {
11
- 'click': [];
12
- 'dblclick': [];
13
+ 'click': [data?: any];
14
+ 'dblclick': [data?: any];
13
15
  }
14
16
  export interface AxButtonOptions extends AxButtonProps, EmitsToProps<AxButtonEmits> {
15
17
  }
@@ -0,0 +1,4 @@
1
+ import { ColumnActions } from './props.ts';
2
+ declare const __VLS_export: import('vue').DefineComponent<ColumnActions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ColumnActions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { AxButtonOptions } from '../../../..';
2
+ import { ListConfig } from '../../../../../hooks';
3
+ export interface ColumnActions extends Omit<ListConfig<AxButtonOptions>, 'key'> {
4
+ type?: 'button' | 'text';
5
+ buttonList?: AxButtonOptions[];
6
+ info?: any;
7
+ disabled?: ((data: any) => boolean) | boolean;
8
+ }
@@ -0,0 +1 @@
1
+ export declare const initTableColumns: () => void;
@@ -1,3 +1,5 @@
1
1
  import { TableColumnCtx } from 'element-plus';
2
2
  export interface AxTableColumnProps extends Partial<TableColumnCtx> {
3
+ type?: string;
4
+ componentProps?: Record<string, any>;
3
5
  }
@@ -1,4 +1,4 @@
1
- import { AxTableColumnProps } from './props';
1
+ import { AxTableColumnProps } from '../../..';
2
2
  declare const __VLS_export: import('vue').DefineComponent<AxTableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxTableColumnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
3
  declare const _default: typeof __VLS_export;
4
4
  export default _default;
@@ -1 +1,3 @@
1
- export {};
1
+ import { Component } from 'vue';
2
+ export declare const columnFields: Record<string, Component>;
3
+ export declare const addColumnField: (type: string, component: Component) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ax-libs",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "module": "./dist/ax-lib.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "private": false,