@mi-avalon/libs 0.0.32 → 1.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 CHANGED
@@ -1,5 +1,5 @@
1
- # @mi-avalon/libs 组件库
1
+ # @mi-avalon/libs 组件库 v1
2
2
 
3
- 基于 react 18, antd 5 封装的组件/工具类库
3
+ 基于 react 19, antd 6 封装的组件/工具类库
4
4
 
5
5
  [组件使用地址](https://mi-avalon.github.io/mi-avalon-libraries/2.%E7%BB%84%E4%BB%B6%E5%B7%A5%E5%85%B7%E7%B1%BB%E5%BA%93/1.%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8/)
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from 'antd';
2
- import { FormInstance } from 'antd/lib';
2
+ import { FormInstance } from 'antd';
3
3
  import React from 'react';
4
4
  import { IMFormItem } from '../MForm';
5
5
  import './index.scss';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /**
3
3
  * 表格
4
4
  */
@@ -6,5 +6,5 @@ import { Table } from 'antd';
6
6
  import { CompThemeProvider } from '../ThemeContext';
7
7
  export function MTable(props) {
8
8
  const columns = props.columns?.map(e => ({ ...e, dataIndex: e.key })) ?? [];
9
- return (_jsxs(CompThemeProvider, { children: [_jsx(Table, { rowKey: e => e.id, ...props, columns: columns }), ";"] }));
9
+ return (_jsx(CompThemeProvider, { children: _jsx(Table, { rowKey: e => e.id, ...props, columns: columns }) }));
10
10
  }
@@ -65,6 +65,6 @@ export class MiModal extends Component {
65
65
  this.props.onClosed?.({ ok: true });
66
66
  };
67
67
  render() {
68
- return (_jsx(ConfigProvider, { theme: this.getTheme(), componentSize: 'middle', componentDisabled: false, children: _jsx(AntModal, { maskClosable: false, open: this.props.open, onCancel: this.handleCancel, onOk: this.handleOk, okText: '\u786E\u5B9A', cancelText: '\u53D6\u6D88', ...this.props, children: this.props.children }) }));
68
+ return (_jsx(ConfigProvider, { theme: this.getTheme(), componentSize: 'middle', children: _jsx(AntModal, { maskClosable: false, open: this.props.open, onCancel: this.handleCancel, onOk: this.handleOk, okText: '\u786E\u5B9A', cancelText: '\u53D6\u6D88', ...this.props, children: this.props.children }) }));
69
69
  }
70
70
  }
@@ -3,7 +3,9 @@ import { ConfigProvider, theme } from 'antd';
3
3
  import { createContext, useContext } from 'react';
4
4
  const ThemeContext = createContext({
5
5
  theme: {
6
- cssVar: true,
6
+ cssVar: {
7
+ prefix: 'mi',
8
+ },
7
9
  algorithm: [theme.defaultAlgorithm],
8
10
  },
9
11
  });