fix: 修改schema透出
This commit is contained in:
parent
35497d39ad
commit
c47d4ff80b
@ -1,5 +1,17 @@
|
|||||||
# @zhst/material
|
# @zhst/material
|
||||||
|
|
||||||
|
## 0.7.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 修改 schema 物料透出
|
||||||
|
|
||||||
|
## 0.7.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 修改文件引用出错
|
||||||
|
|
||||||
## 0.7.5
|
## 0.7.5
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import type { ParamsType, ProTableProps } from '@ant-design/pro-components';
|
|
||||||
import { AnyObject } from 'antd/es/_util/type';
|
|
||||||
import { SelectProps } from 'antd/lib';
|
|
||||||
export interface AlgorithmTableProps<DataSource, Params extends ParamsType = ParamsType, ValueType = "text"> extends ProTableProps<DataSource, Params, ValueType> {
|
|
||||||
onAddAlgorithm?: (id?: string, record?: any) => void;
|
|
||||||
onItemSwitch?: (status?: boolean, id?: string, info?: any) => void;
|
|
||||||
onItemEdit?: (values?: any, info?: any) => void;
|
|
||||||
onItemDelete?: (id?: string, info?: any) => void;
|
|
||||||
onSortSelect?: SelectProps['onChange'];
|
|
||||||
onDraw?: (id: any, info?: any) => void;
|
|
||||||
selectedKey?: string;
|
|
||||||
sortList?: {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
}[];
|
|
||||||
tableType?: 'multiple' | 'single';
|
|
||||||
}
|
|
||||||
declare const AlgorithmTable: <DataSource extends AnyObject = AnyObject>(props: AlgorithmTableProps<DataSource, ParamsType, "text">) => React.JSX.Element;
|
|
||||||
export default AlgorithmTable;
|
|
@ -8,7 +8,7 @@ import { DeleteFilled, EditFilled, ImportOutlined, PlusCircleFilled } from '@ant
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Popconfirm, Select, Space, Switch } from 'antd';
|
import { Popconfirm, Select, Space, Switch } from 'antd';
|
||||||
import theme from 'antd/es/theme';
|
import theme from 'antd/es/theme';
|
||||||
import SchemaFormModal from "../schemaFormModal/schemaFormModal";
|
import SchemaFormModal from "../schemaFormModal";
|
||||||
var useToken = theme.useToken;
|
var useToken = theme.useToken;
|
||||||
var AlgorithmTable = function AlgorithmTable(props) {
|
var AlgorithmTable = function AlgorithmTable(props) {
|
||||||
var onAddAlgorithm = props.onAddAlgorithm,
|
var onAddAlgorithm = props.onAddAlgorithm,
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
import SchemaFormModal from './schemaFormModal';
|
|
||||||
export default SchemaFormModal;
|
|
1
packages/material/es/index.d.ts
vendored
1
packages/material/es/index.d.ts
vendored
@ -3,4 +3,5 @@ export { default as AlgorithmConfig } from './algorithmConfig';
|
|||||||
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
||||||
export { default as Login } from './login';
|
export { default as Login } from './login';
|
||||||
export { default as Password } from './password';
|
export { default as Password } from './password';
|
||||||
|
export { default as SchemaFormModal } from './algorithmConfig/components/schemaFormModal';
|
||||||
export * from 'rc-util';
|
export * from 'rc-util';
|
||||||
|
@ -2,4 +2,5 @@ export { default as AlgorithmConfigModal } from "./algorithmConfigModal";
|
|||||||
export { default as AlgorithmConfig } from "./algorithmConfig";
|
export { default as AlgorithmConfig } from "./algorithmConfig";
|
||||||
export { default as Login } from "./login";
|
export { default as Login } from "./login";
|
||||||
export { default as Password } from "./password";
|
export { default as Password } from "./password";
|
||||||
|
export { default as SchemaFormModal } from "./algorithmConfig/components/schemaFormModal";
|
||||||
export * from 'rc-util';
|
export * from 'rc-util';
|
@ -1,20 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import type { ParamsType, ProTableProps } from '@ant-design/pro-components';
|
|
||||||
import { AnyObject } from 'antd/es/_util/type';
|
|
||||||
import { SelectProps } from 'antd/lib';
|
|
||||||
export interface AlgorithmTableProps<DataSource, Params extends ParamsType = ParamsType, ValueType = "text"> extends ProTableProps<DataSource, Params, ValueType> {
|
|
||||||
onAddAlgorithm?: (id?: string, record?: any) => void;
|
|
||||||
onItemSwitch?: (status?: boolean, id?: string, info?: any) => void;
|
|
||||||
onItemEdit?: (values?: any, info?: any) => void;
|
|
||||||
onItemDelete?: (id?: string, info?: any) => void;
|
|
||||||
onSortSelect?: SelectProps['onChange'];
|
|
||||||
onDraw?: (id: any, info?: any) => void;
|
|
||||||
selectedKey?: string;
|
|
||||||
sortList?: {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
}[];
|
|
||||||
tableType?: 'multiple' | 'single';
|
|
||||||
}
|
|
||||||
declare const AlgorithmTable: <DataSource extends AnyObject = AnyObject>(props: AlgorithmTableProps<DataSource, ParamsType, "text">) => React.JSX.Element;
|
|
||||||
export default AlgorithmTable;
|
|
@ -37,7 +37,7 @@ var import_icons = require("@ant-design/icons");
|
|||||||
var import_pro_components = require("@ant-design/pro-components");
|
var import_pro_components = require("@ant-design/pro-components");
|
||||||
var import_antd = require("antd");
|
var import_antd = require("antd");
|
||||||
var import_theme = __toESM(require("antd/es/theme"));
|
var import_theme = __toESM(require("antd/es/theme"));
|
||||||
var import_schemaFormModal = __toESM(require("../schemaFormModal/schemaFormModal"));
|
var import_schemaFormModal = __toESM(require("../schemaFormModal"));
|
||||||
var { useToken } = import_theme.default;
|
var { useToken } = import_theme.default;
|
||||||
var AlgorithmTable = (props) => {
|
var AlgorithmTable = (props) => {
|
||||||
const {
|
const {
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
import SchemaFormModal from './schemaFormModal';
|
|
||||||
export default SchemaFormModal;
|
|
1
packages/material/lib/index.d.ts
vendored
1
packages/material/lib/index.d.ts
vendored
@ -3,4 +3,5 @@ export { default as AlgorithmConfig } from './algorithmConfig';
|
|||||||
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
||||||
export { default as Login } from './login';
|
export { default as Login } from './login';
|
||||||
export { default as Password } from './password';
|
export { default as Password } from './password';
|
||||||
|
export { default as SchemaFormModal } from './algorithmConfig/components/schemaFormModal';
|
||||||
export * from 'rc-util';
|
export * from 'rc-util';
|
||||||
|
@ -33,13 +33,15 @@ __export(src_exports, {
|
|||||||
AlgorithmConfig: () => import_algorithmConfig.default,
|
AlgorithmConfig: () => import_algorithmConfig.default,
|
||||||
AlgorithmConfigModal: () => import_algorithmConfigModal.default,
|
AlgorithmConfigModal: () => import_algorithmConfigModal.default,
|
||||||
Login: () => import_login.default,
|
Login: () => import_login.default,
|
||||||
Password: () => import_password.default
|
Password: () => import_password.default,
|
||||||
|
SchemaFormModal: () => import_schemaFormModal.default
|
||||||
});
|
});
|
||||||
module.exports = __toCommonJS(src_exports);
|
module.exports = __toCommonJS(src_exports);
|
||||||
var import_algorithmConfigModal = __toESM(require("./algorithmConfigModal"));
|
var import_algorithmConfigModal = __toESM(require("./algorithmConfigModal"));
|
||||||
var import_algorithmConfig = __toESM(require("./algorithmConfig"));
|
var import_algorithmConfig = __toESM(require("./algorithmConfig"));
|
||||||
var import_login = __toESM(require("./login"));
|
var import_login = __toESM(require("./login"));
|
||||||
var import_password = __toESM(require("./password"));
|
var import_password = __toESM(require("./password"));
|
||||||
|
var import_schemaFormModal = __toESM(require("./algorithmConfig/components/schemaFormModal"));
|
||||||
__reExport(src_exports, require("rc-util"), module.exports);
|
__reExport(src_exports, require("rc-util"), module.exports);
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
// Annotate the CommonJS export names for ESM import in node:
|
||||||
0 && (module.exports = {
|
0 && (module.exports = {
|
||||||
@ -47,5 +49,6 @@ __reExport(src_exports, require("rc-util"), module.exports);
|
|||||||
AlgorithmConfigModal,
|
AlgorithmConfigModal,
|
||||||
Login,
|
Login,
|
||||||
Password,
|
Password,
|
||||||
|
SchemaFormModal,
|
||||||
...require("rc-util")
|
...require("rc-util")
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zhst/material",
|
"name": "@zhst/material",
|
||||||
"version": "0.7.5",
|
"version": "0.7.7",
|
||||||
"description": "物料库",
|
"description": "物料库",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"business",
|
"business",
|
||||||
|
@ -8,7 +8,7 @@ import { Popconfirm, Select, Space, Switch } from 'antd';
|
|||||||
import theme from 'antd/es/theme';
|
import theme from 'antd/es/theme';
|
||||||
import { AnyObject } from 'antd/es/_util/type';
|
import { AnyObject } from 'antd/es/_util/type';
|
||||||
import { SelectProps } from 'antd/lib';
|
import { SelectProps } from 'antd/lib';
|
||||||
import SchemaFormModal from '../schemaFormModal/schemaFormModal';
|
import SchemaFormModal from '../schemaFormModal';
|
||||||
|
|
||||||
const { useToken } = theme
|
const { useToken } = theme
|
||||||
|
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import { SchemaFormModal } from '@zhst/material'
|
||||||
|
import { Button, Space } from 'antd'
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
<SchemaFormModal
|
||||||
|
type='fire'
|
||||||
|
onFinish={async (values) => console.log('values', values)}
|
||||||
|
trigger={<Button>火焰</Button>}
|
||||||
|
/>
|
||||||
|
<SchemaFormModal
|
||||||
|
type='smoke'
|
||||||
|
onFinish={async (values) => console.log('values', values)}
|
||||||
|
trigger={<Button>烟雾</Button>}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
)
|
||||||
|
}
|
@ -13,6 +13,7 @@ group:
|
|||||||
|
|
||||||
<code src="./demo/basic.tsx">基本用法</code>
|
<code src="./demo/basic.tsx">基本用法</code>
|
||||||
<code src="./demo/empty.tsx">空数据状态</code>
|
<code src="./demo/empty.tsx">空数据状态</code>
|
||||||
|
<code src="./demo/useSchemaFormModal.tsx">单独使用schemaFormModal</code>
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
@ -45,13 +46,14 @@ group:
|
|||||||
| onSortSelect | 筛选下拉框点击事件 | SelectProps['onChange'] | [] | - |
|
| onSortSelect | 筛选下拉框点击事件 | SelectProps['onChange'] | [] | - |
|
||||||
| sortList | 筛选下拉框 | Array[{ label: string; value: string; }] | [] | - |
|
| sortList | 筛选下拉框 | Array[{ label: string; value: string; }] | [] | - |
|
||||||
|
|
||||||
### timeTemplateTableProps
|
### SchemaFormModalProps
|
||||||
|
|
||||||
时间模板组件透传,继承 ProTable
|
时间模板组件透传,继承 pro-Components 的 BetaSchemaForm
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| onItemBlur | 失焦监听事件 | (value?: number | string, id?: any, record?: any) => void | - | - |
|
| type | fire 火焰、smoke:烟雾、traffic: 人流量、face: 面部遮挡、destroy:人员损坏、wander:人员徘徊、cameraBlock:摄像头遮挡、gather:人员聚集 | string | fire | - |
|
||||||
|
| onFinish | 提交事件,可以通过返回布尔值来判定 | async (values) => Promise | - | - |
|
||||||
|
|
||||||
### algorithmConfigRef
|
### algorithmConfigRef
|
||||||
|
|
||||||
@ -59,3 +61,11 @@ group:
|
|||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| onDraw | 绘制 | () => void | - | - |
|
| onDraw | 绘制 | () => void | - | - |
|
||||||
| cancelDraw | 取消绘制 | () => void | - | - |
|
| cancelDraw | 取消绘制 | () => void | - | - |
|
||||||
|
|
||||||
|
### timeTemplateTableProps
|
||||||
|
|
||||||
|
时间模板组件透传,继承 ProTable
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| onItemBlur | 失焦监听事件 | (value?: number | string, id?: any, record?: any) => void | - |
|
||||||
|
@ -3,4 +3,5 @@ export { default as AlgorithmConfig } from './algorithmConfig';
|
|||||||
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig';
|
||||||
export { default as Login } from './login';
|
export { default as Login } from './login';
|
||||||
export { default as Password } from './password';
|
export { default as Password } from './password';
|
||||||
|
export { default as SchemaFormModal } from './algorithmConfig/components/schemaFormModal';
|
||||||
export * from 'rc-util'
|
export * from 'rc-util'
|
||||||
|
Loading…
Reference in New Issue
Block a user