ztxkui 4.2.23-597 → 4.2.23-598

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.
@@ -67,8 +67,8 @@ var maxClickTime = 1000;
67
67
  var Button = function (props) {
68
68
  var _a;
69
69
  var children = props.children, type = props.type, size = props.size, disabled = props.disabled, danger = props.danger, className = props.className, onClick = props.onClick, _b = props.agentClick, agentClick = _b === void 0 ? true : _b, showCopy = props.showCopy, copyContainerStyle = props.copyContainerStyle, isAsync = props.isAsync, compact = props.compact, componentUIWeeklyReview = props.isUIWeeklyReview, toolTip = props.toolTip, restProps = __rest(props, ["children", "type", "size", "disabled", "danger", "className", "onClick", "agentClick", "showCopy", "copyContainerStyle", "isAsync", "compact", "isUIWeeklyReview", "toolTip"]);
70
- var contextUIWeeklyReview = useBaseContext().isUIWeeklyReview;
71
- var isUIWeeklyReviewBool = getFinalValue(contextUIWeeklyReview, componentUIWeeklyReview);
70
+ var contextForceDefaultType = useBaseContext().isButtonForceDefaultType;
71
+ var isUIWeeklyReviewBool = getFinalValue(contextForceDefaultType, componentUIWeeklyReview);
72
72
  var finalType = isUIWeeklyReviewBool ? type || 'default' : type;
73
73
  var btnRef = useRef();
74
74
  var _c = useState(false), loading = _c[0], setLoading = _c[1];
@@ -100,6 +100,10 @@ export interface IZtxkConfig {
100
100
  * 是否按UI周查样式调整(Button的type默认改为default)
101
101
  */
102
102
  isUIWeeklyReview?: boolean;
103
+ /**
104
+ * 是否强制按钮使用默认类型(type || 'default')
105
+ */
106
+ isButtonForceDefaultType?: boolean;
103
107
  /**
104
108
  * 表格的展开收起图标是否使用组件自定义图标,或者自己自定义
105
109
  */
@@ -24,6 +24,7 @@ var ztxkConfig = {
24
24
  isSelectFrozenStatus: false,
25
25
  isTableEditShowContextMenu: false,
26
26
  isUIWeeklyReview: false,
27
+ isButtonForceDefaultType: false,
27
28
  enableTableExpandIcon: false,
28
29
  };
29
30
  main();
@@ -34,6 +34,7 @@ export default function useBaseContext(): {
34
34
  isSelectFrozenStatus?: boolean;
35
35
  isTableEditShowContextMenu?: boolean;
36
36
  isUIWeeklyReview?: boolean;
37
+ isButtonForceDefaultType?: boolean;
37
38
  enableTableExpandIcon?: boolean | ((option: any) => import("react").ReactNode);
38
39
  };
39
40
  export declare function useAntdContext(): import("antd/lib/config-provider").ConfigConsumerProps;
package/dist/main.js CHANGED
@@ -385,6 +385,10 @@ var ztxkConfig = {
385
385
  * 是否按UI周查样式调整(Button的type默认改为default)
386
386
  */
387
387
  isUIWeeklyReview: true,
388
+ /**
389
+ * 是否强制Button的type为default
390
+ */
391
+ isButtonForceDefaultType: true,
388
392
  /**
389
393
  * 表格展开收起图标使用自定义图标
390
394
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.2.23-597",
3
+ "version": "4.2.23-598",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",