yuand 1.0.7 → 1.0.8
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,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TableProps,
|
|
3
|
-
import type { FormInstance, FormProps } from "../../../node_modules/antd";
|
|
2
|
+
import type { TableProps, TableColumnType, FormInstance, FormProps, PaginationProps } from "../../../node_modules/antd";
|
|
4
3
|
import type { HttpMethod } from "../../fetch";
|
|
5
4
|
import type { UseBoundStore, StoreApi } from "../../../node_modules/zustand";
|
|
6
5
|
import type { GetQueryProps } from "../../utils/table";
|
|
@@ -41,7 +40,7 @@ interface FormOptions extends Omit<FormProps, "form" | "title" | "children"> {
|
|
|
41
40
|
onResetBefore?: () => void | boolean;
|
|
42
41
|
dataForm?: FormProps;
|
|
43
42
|
}
|
|
44
|
-
export interface ProTableProps<Tdata = any> extends Omit<TableProps
|
|
43
|
+
export interface ProTableProps<Tdata = any> extends Omit<TableProps<Tdata>, "columns"> {
|
|
45
44
|
classNames?: {
|
|
46
45
|
root?: string;
|
|
47
46
|
form?: string;
|
|
@@ -70,11 +69,11 @@ export interface ProTableProps<Tdata = any> extends Omit<TableProps, "columns">
|
|
|
70
69
|
dataKey?: string;
|
|
71
70
|
totalKey?: string;
|
|
72
71
|
nostyle?: boolean;
|
|
73
|
-
columns: ((data: Tdata) =>
|
|
72
|
+
columns: ((data: Tdata) => TableColumnType<Tdata>[]) | TableColumnType<Tdata>[];
|
|
74
73
|
form?: FormOptions;
|
|
75
74
|
alert?: React.ReactNode | ((data: Tdata) => React.ReactNode);
|
|
76
75
|
toolbar?: React.ReactNode;
|
|
77
|
-
pagination?:
|
|
76
|
+
pagination?: PaginationProps;
|
|
78
77
|
useData?: boolean;
|
|
79
78
|
}
|
|
80
79
|
export interface UseTableProps {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TableProps,
|
|
3
|
-
import type { FormInstance, FormProps } from "../../../node_modules/antd";
|
|
2
|
+
import type { TableProps, TableColumnType, FormInstance, FormProps, PaginationProps } from "../../../node_modules/antd";
|
|
4
3
|
import type { HttpMethod } from "../../fetch";
|
|
5
4
|
import type { UseBoundStore, StoreApi } from "../../../node_modules/zustand";
|
|
6
5
|
import type { GetQueryProps } from "../../utils/table";
|
|
@@ -67,11 +66,11 @@ export interface ProTableProps<Tdata = any> extends Omit<TableProps<Tdata>, "col
|
|
|
67
66
|
dataKey?: string;
|
|
68
67
|
totalKey?: string;
|
|
69
68
|
nostyle?: boolean;
|
|
70
|
-
columns: ((data: Tdata) =>
|
|
69
|
+
columns: ((data: Tdata) => TableColumnType<Tdata>[]) | TableColumnType<Tdata>[];
|
|
71
70
|
form?: FormOptions;
|
|
72
71
|
alert?: React.ReactNode | ((data: Tdata) => React.ReactNode);
|
|
73
72
|
toolbar?: React.ReactNode;
|
|
74
|
-
pagination?:
|
|
73
|
+
pagination?: PaginationProps;
|
|
75
74
|
loadingDelay?: number;
|
|
76
75
|
}
|
|
77
76
|
export interface UseTableProps {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import Table from "../components/Table";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default function TestPage() {
|
|
5
|
+
var _Table$useTable = Table.useTable(),
|
|
6
|
+
_Table$useTable2 = _slicedToArray(_Table$useTable, 1),
|
|
7
|
+
table = _Table$useTable2[0];
|
|
8
|
+
return /*#__PURE__*/_jsx(Table, {
|
|
9
|
+
request: {
|
|
10
|
+
url: "./sss"
|
|
11
|
+
},
|
|
12
|
+
table: table,
|
|
13
|
+
columns: [{
|
|
14
|
+
width: 200,
|
|
15
|
+
title: "Name",
|
|
16
|
+
dataIndex: "name",
|
|
17
|
+
key: "name",
|
|
18
|
+
colSpan: 2
|
|
19
|
+
}]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TableProps,
|
|
3
|
-
import type { FormInstance, FormProps } from "../../../node_modules/antd";
|
|
2
|
+
import type { TableProps, TableColumnType, FormInstance, FormProps, PaginationProps } from "../../../node_modules/antd";
|
|
4
3
|
import type { HttpMethod } from "../../fetch";
|
|
5
4
|
import type { UseBoundStore, StoreApi } from "../../../node_modules/zustand";
|
|
6
5
|
import type { GetQueryProps } from "../../utils/table";
|
|
@@ -41,7 +40,7 @@ interface FormOptions extends Omit<FormProps, "form" | "title" | "children"> {
|
|
|
41
40
|
onResetBefore?: () => void | boolean;
|
|
42
41
|
dataForm?: FormProps;
|
|
43
42
|
}
|
|
44
|
-
export interface ProTableProps<Tdata = any> extends Omit<TableProps
|
|
43
|
+
export interface ProTableProps<Tdata = any> extends Omit<TableProps<Tdata>, "columns"> {
|
|
45
44
|
classNames?: {
|
|
46
45
|
root?: string;
|
|
47
46
|
form?: string;
|
|
@@ -70,11 +69,11 @@ export interface ProTableProps<Tdata = any> extends Omit<TableProps, "columns">
|
|
|
70
69
|
dataKey?: string;
|
|
71
70
|
totalKey?: string;
|
|
72
71
|
nostyle?: boolean;
|
|
73
|
-
columns: ((data: Tdata) =>
|
|
72
|
+
columns: ((data: Tdata) => TableColumnType<Tdata>[]) | TableColumnType<Tdata>[];
|
|
74
73
|
form?: FormOptions;
|
|
75
74
|
alert?: React.ReactNode | ((data: Tdata) => React.ReactNode);
|
|
76
75
|
toolbar?: React.ReactNode;
|
|
77
|
-
pagination?:
|
|
76
|
+
pagination?: PaginationProps;
|
|
78
77
|
useData?: boolean;
|
|
79
78
|
}
|
|
80
79
|
export interface UseTableProps {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TableProps,
|
|
3
|
-
import type { FormInstance, FormProps } from "../../../node_modules/antd";
|
|
2
|
+
import type { TableProps, TableColumnType, FormInstance, FormProps, PaginationProps } from "../../../node_modules/antd";
|
|
4
3
|
import type { HttpMethod } from "../../fetch";
|
|
5
4
|
import type { UseBoundStore, StoreApi } from "../../../node_modules/zustand";
|
|
6
5
|
import type { GetQueryProps } from "../../utils/table";
|
|
@@ -67,11 +66,11 @@ export interface ProTableProps<Tdata = any> extends Omit<TableProps<Tdata>, "col
|
|
|
67
66
|
dataKey?: string;
|
|
68
67
|
totalKey?: string;
|
|
69
68
|
nostyle?: boolean;
|
|
70
|
-
columns: ((data: Tdata) =>
|
|
69
|
+
columns: ((data: Tdata) => TableColumnType<Tdata>[]) | TableColumnType<Tdata>[];
|
|
71
70
|
form?: FormOptions;
|
|
72
71
|
alert?: React.ReactNode | ((data: Tdata) => React.ReactNode);
|
|
73
72
|
toolbar?: React.ReactNode;
|
|
74
|
-
pagination?:
|
|
73
|
+
pagination?: PaginationProps;
|
|
75
74
|
loadingDelay?: number;
|
|
76
75
|
}
|
|
77
76
|
export interface UseTableProps {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/test/test-page.tsx
|
|
30
|
+
var test_page_exports = {};
|
|
31
|
+
__export(test_page_exports, {
|
|
32
|
+
default: () => TestPage
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(test_page_exports);
|
|
35
|
+
var import_Table = __toESM(require("../components/Table"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
function TestPage() {
|
|
38
|
+
const [table] = import_Table.default.useTable();
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_Table.default,
|
|
41
|
+
{
|
|
42
|
+
request: { url: "./sss" },
|
|
43
|
+
table,
|
|
44
|
+
columns: [
|
|
45
|
+
{
|
|
46
|
+
width: 200,
|
|
47
|
+
title: "Name",
|
|
48
|
+
dataIndex: "name",
|
|
49
|
+
key: "name",
|
|
50
|
+
colSpan: 2
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|