@ftjs/antd 0.4.3 → 0.4.5

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.
@@ -1,15 +1,12 @@
1
- import { ValueOf, FtBaseTableProps, FtTableColumn } from '@ftjs/core';
1
+ import { ValueOf, ExtractColumnType, FtBaseTableProps, FtTableColumn } from '@ftjs/core';
2
2
  import { TableColumnType, TableProps as AntTableProps } from 'ant-design-vue';
3
- import { FtAntdFormSearchProps } from '../form/define-form';
3
+ import { FtAntdFormSearchProps } from '../form';
4
4
  import { FtAntdFormColumn } from '../form/register';
5
5
  import { EditMap } from './column-edit';
6
- type ExtractType<T> = T extends {
7
- type: infer U;
8
- } ? U : never;
9
6
  /**
10
7
  * 列定义
11
8
  */
12
- export interface FtAntdTableColumn<T extends Record<string, any>, S extends Record<string, any>> extends FtTableColumn<T, FtAntdFormColumn<S> | ExtractType<FtAntdFormColumn<S>>>, Omit<TableColumnType<T>, "title" | "dataIndex"> {
9
+ export interface FtAntdTableColumn<T extends Record<string, any>, S extends Record<string, any>> extends FtTableColumn<T, FtAntdFormColumn<S> | ExtractColumnType<FtAntdFormColumn<S>>>, Omit<TableColumnType<T>, "title" | "dataIndex"> {
13
10
  /**
14
11
  * 行内编辑
15
12
  */
@@ -1,4 +1,4 @@
1
- import { FtAntdFormSearchProps } from './define-form';
1
+ import { FtAntdFormSearchProps } from './index';
2
2
  import { FormInstance } from 'ant-design-vue';
3
3
  declare const _default: <F extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & FtAntdFormSearchProps<F> & Partial<{}>> & import('vue').PublicProps;
@@ -1,4 +1,4 @@
1
- import { FtAntdFormProps } from './define-form';
1
+ import { FtAntdFormProps } from './index';
2
2
  import { FormInstance } from 'ant-design-vue';
3
3
  declare const _default: <F extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & FtAntdFormProps<F> & Partial<{}>> & import('vue').PublicProps;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './form/define-form';
1
+ export * from './form';
2
2
  export { registerForm, defineFormItem } from './form/register';
3
3
  export type { FtAntdFormColumn, AntdColumnBase, RegisterColumnMap, } from './form/register';
4
4
  export * from './vxe-table';
package/dist/index.js CHANGED
@@ -1543,9 +1543,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1543
1543
  ..._ctx.$attrs,
1544
1544
  ...internalTableProps.value
1545
1545
  }), createSlots({
1546
- pager: withCtx(() => [_ctx.$slots.pager ? renderSlot(_ctx.$slots, "pager", {
1546
+ pager: withCtx((slotData) => [_ctx.$slots.pager ? renderSlot(_ctx.$slots, "pager", normalizeProps(mergeProps({
1547
1547
  key: 0
1548
- }) : !_ctx.hidePagination ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(Pagination), {
1548
+ }, slotData))) : !_ctx.hidePagination ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(Pagination), {
1549
1549
  current: current.value,
1550
1550
  "onUpdate:current": _cache[0] || (_cache[0] = ($event) => current.value = $event),
1551
1551
  pageSize: pageSize.value,
@@ -1560,9 +1560,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1560
1560
  return (_a = _ctx.onSearch) == null ? void 0 : _a.call(_ctx);
1561
1561
  })
1562
1562
  }, null, 8, ["current", "pageSize", "total", "defaultPageSize"])])) : createCommentVNode("", true)]),
1563
- loading: withCtx(() => [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", {
1563
+ loading: withCtx((slotData) => [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", normalizeProps(mergeProps({
1564
1564
  key: 0
1565
- }) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(Spin))]))]),
1565
+ }, slotData))) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(Spin))]))]),
1566
1566
  _: 2
1567
1567
  }, [renderList(_ctx.$slots, (_, name) => {
1568
1568
  return {
@@ -1,5 +1,5 @@
1
1
  import { FtVxeTableProps } from './types';
2
- import { VxeGridInstance } from 'vxe-table';
2
+ import { VxeGridInstance, VxeGridSlots } from 'vxe-table';
3
3
  declare const _default: <T extends Record<string, any>, S extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & FtVxeTableProps<T, S> & Partial<{}>> & import('vue').PublicProps;
5
5
  expose(exposed: import('vue').ShallowUnwrapRef<{
@@ -34,60 +34,7 @@ declare const _default: <T extends Record<string, any>, S extends Record<string,
34
34
  refresh: () => Promise<void>;
35
35
  }>): void;
36
36
  attrs: any;
37
- slots: {
38
- [x: string]: ((props: {
39
- [key: string]: any;
40
- $table: import('vxe-table').VxeTableConstructor<any>;
41
- $grid: import('vxe-table').VxeGridConstructor<any> | null | undefined;
42
- rowid: string;
43
- row: any;
44
- rowIndex: number;
45
- $rowIndex: number;
46
- _rowIndex: number;
47
- column: import("vxe-table").VxeTableDefines.ColumnInfo<any>;
48
- columnIndex: number;
49
- $columnIndex: number;
50
- _columnIndex: number;
51
- type: string;
52
- fixed: import("vxe-table").VxeColumnPropTypes.Fixed;
53
- checked?: boolean;
54
- indeterminate?: boolean;
55
- seq: string | number;
56
- level: number;
57
- isEdit: boolean;
58
- isHidden: boolean;
59
- visibleData: any[];
60
- data: any[];
61
- items: any[];
62
- }) => any) | undefined;
63
- [x: number]: ((props: {
64
- [key: string]: any;
65
- $table: import('vxe-table').VxeTableConstructor<any>;
66
- $grid: import('vxe-table').VxeGridConstructor<any> | null | undefined;
67
- rowid: string;
68
- row: any;
69
- rowIndex: number;
70
- $rowIndex: number;
71
- _rowIndex: number;
72
- column: import("vxe-table").VxeTableDefines.ColumnInfo<any>;
73
- columnIndex: number;
74
- $columnIndex: number;
75
- _columnIndex: number;
76
- type: string;
77
- fixed: import("vxe-table").VxeColumnPropTypes.Fixed;
78
- checked?: boolean;
79
- indeterminate?: boolean;
80
- seq: string | number;
81
- level: number;
82
- isEdit: boolean;
83
- isHidden: boolean;
84
- visibleData: any[];
85
- data: any[];
86
- items: any[];
87
- }) => any) | undefined;
88
- pager?: ((props: {}) => any) | undefined;
89
- loading?: ((props: {}) => any) | undefined;
90
- };
37
+ slots: VxeGridSlots<any>;
91
38
  emit: {};
92
39
  }>) => import('vue').VNode & {
93
40
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1,15 +1,12 @@
1
- import { FtBaseTableProps, FtTableColumn, ValueOf } from '@ftjs/core';
1
+ import { ExtractColumnType, FtBaseTableProps, FtTableColumn, ValueOf } from '@ftjs/core';
2
2
  import { VxeGridProps, VxeGridPropTypes } from 'vxe-table';
3
- import { FtAntdFormSearchProps } from '../form/define-form';
3
+ import { FtAntdFormSearchProps } from '../form';
4
4
  import { FtAntdFormColumn } from '../form/register';
5
5
  import { EditMap } from '../antd-table/column-edit';
6
- type ExtractType<T> = T extends {
7
- type: infer U;
8
- } ? U : never;
9
6
  /**
10
7
  * 列定义
11
8
  */
12
- type VxeTableColumn<T extends Record<string, any>, S extends Record<string, any>> = FtTableColumn<T, FtAntdFormColumn<S> | ExtractType<FtAntdFormColumn<S>>> & Omit<VxeGridPropTypes.Column<T>, "title" | "editRender"> & {
9
+ type VxeTableColumn<T extends Record<string, any>, S extends Record<string, any>> = FtTableColumn<T, FtAntdFormColumn<S> | ExtractColumnType<FtAntdFormColumn<S>>> & Omit<VxeGridPropTypes.Column<T>, "title" | "editRender"> & {
13
10
  /**
14
11
  * 行内编辑
15
12
  */
@@ -46,6 +43,6 @@ export interface FtVxeTableProps<T extends Record<string, any>, S extends Record
46
43
  hidePagination?: boolean;
47
44
  internalTableProps?: InternalVxeTableProps<T>;
48
45
  internalFormProps?: FtAntdFormSearchProps<S>;
49
- onSearch: () => Promise<void> | void;
46
+ onSearch?: () => Promise<void> | void;
50
47
  }
51
48
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftjs/antd",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "vite": "^6.1.0",
31
31
  "vite-plugin-dts": "^4.5.0",
32
32
  "vue-tsc": "2.2.0",
33
- "@ftjs/core": "0.4.3"
33
+ "@ftjs/core": "0.4.5"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@ant-design/icons-vue": ">=7.0.0",
File without changes