xph-crud 0.0.1
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 +64 -0
- package/dist/index.js +3246 -0
- package/dist/index.umd.cjs +25 -0
- package/dist/style.css +1 -0
- package/dist/types/common/index.d.ts +3 -0
- package/dist/types/common/src/componnets/actions/actions.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/button.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/dropdown.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/index.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/components/more.d.ts +7 -0
- package/dist/types/common/src/componnets/actions/hooks/index.d.ts +8 -0
- package/dist/types/common/src/componnets/actions/hooks/useActionItems.d.ts +6 -0
- package/dist/types/common/src/componnets/actions/hooks/useActionsProps.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/hooks/useExtendActions.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/hooks/useRenderContent.d.ts +6 -0
- package/dist/types/common/src/componnets/actions/types/actionItem.d.ts +67 -0
- package/dist/types/common/src/componnets/actions/types/actions.d.ts +15 -0
- package/dist/types/common/src/componnets/actions/types/index.d.ts +2 -0
- package/dist/types/common/src/componnets/dialog/dialog.d.ts +2 -0
- package/dist/types/common/src/componnets/dialog/types/dialog.d.ts +9 -0
- package/dist/types/common/src/componnets/index.d.ts +5 -0
- package/dist/types/common/src/hooks/index.d.ts +3 -0
- package/dist/types/common/src/hooks/useExtendCompProps.d.ts +45 -0
- package/dist/types/common/src/utils/index.d.ts +1 -0
- package/dist/types/form/index.d.ts +5 -0
- package/dist/types/form/src/components/ActionGroup/index.d.ts +6 -0
- package/dist/types/form/src/components/ApiAutoComplete/index.d.ts +15 -0
- package/dist/types/form/src/components/ApiSelect/index.d.ts +15 -0
- package/dist/types/form/src/components/ApiTransfer/index.d.ts +13 -0
- package/dist/types/form/src/components/ApiTreeSelect/index.d.ts +15 -0
- package/dist/types/form/src/components/AutoUpload/index.d.ts +28 -0
- package/dist/types/form/src/components/Collapse/index.d.ts +7 -0
- package/dist/types/form/src/components/FormItem/index.d.ts +11 -0
- package/dist/types/form/src/components/index.d.ts +5 -0
- package/dist/types/form/src/form.d.ts +8 -0
- package/dist/types/form/src/helper.d.ts +14 -0
- package/dist/types/form/src/hooks/index.d.ts +16 -0
- package/dist/types/form/src/hooks/useApiComonentCache.d.ts +24 -0
- package/dist/types/form/src/hooks/useExtendForm.d.ts +5 -0
- package/dist/types/form/src/hooks/useForm.d.ts +20 -0
- package/dist/types/form/src/hooks/useFormAction.d.ts +12 -0
- package/dist/types/form/src/hooks/useFormCollapse.d.ts +11 -0
- package/dist/types/form/src/hooks/useFormItem.d.ts +40 -0
- package/dist/types/form/src/hooks/useFormProps.d.ts +6 -0
- package/dist/types/form/src/hooks/useFormValues.d.ts +11 -0
- package/dist/types/form/src/types/component.d.ts +35 -0
- package/dist/types/form/src/types/form.d.ts +86 -0
- package/dist/types/form/src/types/formItem.d.ts +54 -0
- package/dist/types/form/src/types/index.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/table/index.d.ts +4 -0
- package/dist/types/table/src/components/searchForm/components/cacheForm/index.d.ts +6 -0
- package/dist/types/table/src/components/searchForm/index.d.ts +9 -0
- package/dist/types/table/src/components/table/components/cellFunc/cellFunc.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/actions.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/index.d.ts +12 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/link.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/types/cellFunc.d.ts +43 -0
- package/dist/types/table/src/components/table/components/cellFunc/types/index.d.ts +1 -0
- package/dist/types/table/src/components/table/index.d.ts +9 -0
- package/dist/types/table/src/hooks/index.d.ts +18 -0
- package/dist/types/table/src/hooks/useExtendTable.d.ts +7 -0
- package/dist/types/table/src/hooks/usePagination.d.ts +18 -0
- package/dist/types/table/src/hooks/useRowSelection.d.ts +9 -0
- package/dist/types/table/src/hooks/useSearchForm.d.ts +6 -0
- package/dist/types/table/src/hooks/useTable.d.ts +24 -0
- package/dist/types/table/src/hooks/useTableColumns.d.ts +6 -0
- package/dist/types/table/src/hooks/useTableProps.d.ts +6 -0
- package/dist/types/table/src/hooks/useTableScroll.d.ts +10 -0
- package/dist/types/table/src/hooks/useTopToolbar.d.ts +7 -0
- package/dist/types/table/src/table.d.ts +8 -0
- package/dist/types/table/src/types/apiTable.d.ts +35 -0
- package/dist/types/table/src/types/column.d.ts +32 -0
- package/dist/types/table/src/types/crudForm.d.ts +3 -0
- package/dist/types/table/src/types/index.d.ts +5 -0
- package/dist/types/table/src/types/searchForm.d.ts +9 -0
- package/dist/types/table/src/types/table.d.ts +25 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
## 引入
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
npm install xph-crud --save
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add xph-crud
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm install xph-crud --save
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 用法
|
|
16
|
+
|
|
17
|
+
引入 xph-crud 全局样式
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
/** main.tsx */
|
|
21
|
+
|
|
22
|
+
import React from "react";
|
|
23
|
+
import ReactDOM from "react-dom/client";
|
|
24
|
+
import App from "./App.tsx";
|
|
25
|
+
/** 引入 xph-crud 全局样式 */
|
|
26
|
+
import "xph-crud/dist/style.css";
|
|
27
|
+
|
|
28
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
29
|
+
<React.StrictMode>
|
|
30
|
+
<App />
|
|
31
|
+
</React.StrictMode>
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
组件使用
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
/** App.tsx */
|
|
39
|
+
|
|
40
|
+
import { XphForm, IXphFormProps } from "xph-crud";
|
|
41
|
+
|
|
42
|
+
function App() {
|
|
43
|
+
const formProps: IXphFormProps = {
|
|
44
|
+
items: [
|
|
45
|
+
{
|
|
46
|
+
name: "name",
|
|
47
|
+
label: "姓名",
|
|
48
|
+
component: "Input",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<XphForm {...formProps}></XphForm>
|
|
55
|
+
</>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default App;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 注意事项
|
|
63
|
+
|
|
64
|
+
xph-crud 是基于 ant-design、ant-design-icons 开发的组件库,所以使用时需同时引入 [antd](https://github.com/ant-design/ant-design)、[@ant-design/icons](https://github.com/ant-design/ant-design-icons/tree/master)
|