tntd 2.8.0-beta.7 → 2.8.0-beta.9

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.
Files changed (50) hide show
  1. package/es/drawer/drawer.js +108 -13
  2. package/es/drawer/drawer.js.map +1 -1
  3. package/es/drawer/index.js +1 -1
  4. package/es/drawer/index.js.map +1 -1
  5. package/es/drawer/index.less +154 -0
  6. package/es/drawer/style/drawer.less +2 -4
  7. package/es/input/style/mixin.less +1 -2
  8. package/es/locale/en_US.js +5 -1
  9. package/es/locale/en_US.js.map +1 -1
  10. package/es/locale/zh_CN.js +5 -1
  11. package/es/locale/zh_CN.js.map +1 -1
  12. package/es/page-loading/index.js +8 -4
  13. package/es/page-loading/index.js.map +1 -1
  14. package/es/page-loading/index.less +33 -17
  15. package/es/table-container/index.less +1 -1
  16. package/es/tabs-container/index.js +1 -0
  17. package/es/tabs-container/index.js.map +1 -1
  18. package/es/tabs-container/index.less +3 -3
  19. package/lib/drawer/drawer.d.ts +25 -2
  20. package/lib/drawer/drawer.d.ts.map +1 -1
  21. package/lib/drawer/drawer.js +115 -13
  22. package/lib/drawer/drawer.js.map +1 -1
  23. package/lib/drawer/index.d.ts +1 -1
  24. package/lib/drawer/index.d.ts.map +1 -1
  25. package/lib/drawer/index.js +5 -5
  26. package/lib/drawer/index.js.map +1 -1
  27. package/lib/drawer/index.less +154 -0
  28. package/lib/drawer/style/drawer.less +2 -4
  29. package/lib/input/style/mixin.less +1 -2
  30. package/lib/locale/default.d.ts +4 -0
  31. package/lib/locale/default.d.ts.map +1 -1
  32. package/lib/locale/en_US.d.ts +4 -0
  33. package/lib/locale/en_US.d.ts.map +1 -1
  34. package/lib/locale/en_US.js +5 -1
  35. package/lib/locale/en_US.js.map +1 -1
  36. package/lib/locale/zh_CN.d.ts +4 -0
  37. package/lib/locale/zh_CN.d.ts.map +1 -1
  38. package/lib/locale/zh_CN.js +5 -1
  39. package/lib/locale/zh_CN.js.map +1 -1
  40. package/lib/page-loading/index.d.ts.map +1 -1
  41. package/lib/page-loading/index.js +7 -3
  42. package/lib/page-loading/index.js.map +1 -1
  43. package/lib/page-loading/index.less +33 -17
  44. package/lib/table-container/index.less +1 -1
  45. package/lib/tabs-container/index.d.ts +2 -1
  46. package/lib/tabs-container/index.d.ts.map +1 -1
  47. package/lib/tabs-container/index.js +3 -2
  48. package/lib/tabs-container/index.js.map +1 -1
  49. package/lib/tabs-container/index.less +3 -3
  50. package/package.json +2 -2
@@ -6,28 +6,123 @@ var __rest = this && this.__rest || function (s, e) {
6
6
  }
7
7
  return t;
8
8
  };
9
- import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
10
- import classNames from 'classnames';
11
- import React from 'react';
12
9
  import { ConfigConsumer } from 'antd/es/config-provider';
13
10
  import { default as AntdDrawer } from 'antd/es/drawer';
11
+ import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
12
+ import classNames from 'classnames';
13
+ import React, { useEffect } from 'react';
14
+ import { Button } from '../button';
15
+ import Icon from '../icon';
16
+ const DefaultFooter = ({
17
+ locale,
18
+ onClose,
19
+ onSubmit,
20
+ onCancel,
21
+ onOk,
22
+ okText,
23
+ okType,
24
+ cancelText,
25
+ confirmLoading,
26
+ okButtonProps,
27
+ cancelButtonProps,
28
+ cancelType
29
+ }) => {
30
+ return React.createElement(React.Fragment, null, React.createElement(Button, Object.assign({
31
+ onClick: onCancel || onClose,
32
+ style: {
33
+ marginRight: 8
34
+ },
35
+ type: cancelType || 'default'
36
+ }, cancelButtonProps), cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText)), React.createElement(Button, Object.assign({
37
+ onClick: onOk || onSubmit,
38
+ type: okType || 'primary',
39
+ loading: confirmLoading
40
+ }, okButtonProps), okText || (locale === null || locale === void 0 ? void 0 : locale.okText)));
41
+ };
14
42
  export const Drawer = _a => {
15
43
  var {
16
- closable,
17
- className
44
+ closable = true,
45
+ className,
46
+ footer,
47
+ showFooter,
48
+ onClose,
49
+ onSubmit,
50
+ onCancel,
51
+ onOk,
52
+ okText = '',
53
+ cancelText = '',
54
+ locale,
55
+ okType = 'primary',
56
+ cancelType = 'default',
57
+ confirmLoading = false,
58
+ okButtonProps = {},
59
+ cancelButtonProps = {},
60
+ clickOnBlankToClose = false
18
61
  } = _a,
19
- rest = __rest(_a, ["closable", "className"]);
62
+ rest = __rest(_a, ["closable", "className", "footer", "showFooter", "onClose", "onSubmit", "onCancel", "onOk", "okText", "cancelText", "locale", "okType", "cancelType", "confirmLoading", "okButtonProps", "cancelButtonProps", "clickOnBlankToClose"]);
63
+ const drawerDom = React.useRef(null);
64
+ const _onCancel = onCancel || onClose;
65
+ useEffect(() => {
66
+ if (clickOnBlankToClose) {
67
+ const handleOutsideClick = event => {
68
+ const drawer = drawerDom.current;
69
+ const targetElement = event.target;
70
+ let isInDrawer = false;
71
+ if (drawer && targetElement) {
72
+ isInDrawer = drawer.contains(targetElement) || targetElement === drawer;
73
+ }
74
+ drawerDom.current = null;
75
+ if (rest.visible && !isInDrawer && _onCancel) {
76
+ _onCancel();
77
+ }
78
+ };
79
+ document.removeEventListener('click', handleOutsideClick);
80
+ document.addEventListener('click', handleOutsideClick);
81
+ return () => {
82
+ document.removeEventListener('click', handleOutsideClick);
83
+ };
84
+ }
85
+ }, [rest.visible, clickOnBlankToClose, _onCancel]);
20
86
  return React.createElement(ConfigConsumer, null, ({
21
87
  getPrefixCls
22
88
  }) => {
23
89
  const prefixCls = getPrefixCls('drawer');
24
90
  return React.createElement(LocaleReceiver, {
25
- componentName: "Drawer"
26
- }, () => React.createElement(AntdDrawer, Object.assign({
27
- className: classNames(prefixCls, 'tntd-drawer', className, {
28
- [`${prefixCls}-contain-closable`]: closable !== false
29
- }),
30
- closable: closable
31
- }, rest)));
91
+ componentName: "Drawer",
92
+ defaultLocale: locale
93
+ }, locale => {
94
+ return React.createElement("div", {
95
+ onClick: event => {
96
+ drawerDom.current = event.target;
97
+ }
98
+ }, React.createElement(AntdDrawer, Object.assign({
99
+ className: classNames(prefixCls, 'tnt-drawer', 'tntd-drawer', className, {
100
+ [`${prefixCls}-contain-closable`]: closable !== false,
101
+ [`${prefixCls}-footer`]: showFooter || footer
102
+ }),
103
+ closable: false,
104
+ onClose: onClose,
105
+ width: 480
106
+ }, rest), React.createElement(React.Fragment, null, closable !== false && React.createElement(Icon, {
107
+ type: "close",
108
+ className: `${prefixCls}-close`,
109
+ onClick: onClose
110
+ }), rest.children, React.createElement("div", {
111
+ className: `${prefixCls}-footer-style`
112
+ }, !footer ? showFooter && React.createElement(DefaultFooter, {
113
+ confirmLoading: confirmLoading,
114
+ okButtonProps: okButtonProps,
115
+ cancelButtonProps: cancelButtonProps,
116
+ okType: okType,
117
+ locale: locale,
118
+ okText: okText,
119
+ cancelType: cancelType,
120
+ cancelText: cancelText,
121
+ onClose: onClose,
122
+ onSubmit: onSubmit,
123
+ onOk: onOk,
124
+ onCancel: onCancel
125
+ }) : footer))));
126
+ });
32
127
  });
33
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACL,oBAAC,UAAU,kBACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE;gBACzD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:56:20\n * @FilePath: /tntd/packages/tntd/src/drawer/drawer.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdDrawer } from 'antd/es/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OA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CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { ConfigConsumer } from 'antd/es/config-provider'\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport { default as AntdDrawer } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport type { BaseButtonProps } from 'antd/es/button/button'\nimport type { ButtonType } from '../button/button'\n\nimport React, { FC, useEffect, useRef } from 'react'\nimport { Button } from '../button'\nimport Icon from '../icon'\nconst DefaultFooter = ({\n locale,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText,\n okType,\n cancelText,\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n cancelType,\n}: {\n locale?: {\n okText?: string\n cancelText?: string\n }\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText: string\n cancelText: string\n okType?: ButtonType\n cancelType: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n}) => {\n return (\n <>\n <Button\n onClick={onCancel || onClose}\n style={{ marginRight: 8 }}\n type={cancelType || 'default'}\n {...cancelButtonProps}\n >\n {cancelText || locale?.cancelText}\n </Button>\n <Button\n onClick={onOk || onSubmit}\n type={okType || 'primary'}\n loading={confirmLoading}\n {...okButtonProps}\n >\n {okText || locale?.okText}\n </Button>\n </>\n )\n}\n\ninterface CustomDrawerProps extends AntdDrawerProps {\n footer?: React.ReactNode\n showFooter?: boolean\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText?: string\n cancelText?: string\n locale?: {\n okText?: string\n cancelText?: string\n }\n okType?: ButtonType\n cancelType?: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n clickOnBlankToClose: boolean\n}\n\nexport const Drawer: FC<CustomDrawerProps> = ({\n closable = true,\n className,\n footer,\n showFooter,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText = '',\n cancelText = '',\n locale,\n okType = 'primary',\n cancelType = 'default',\n confirmLoading = false,\n okButtonProps = {},\n cancelButtonProps = {},\n clickOnBlankToClose = false,\n ...rest\n}) => {\n const drawerDom = React.useRef<EventTarget | null>(null)\n const _onCancel = onCancel || onClose\n\n useEffect(() => {\n if (clickOnBlankToClose) {\n const handleOutsideClick = (event: Event) => {\n const drawer = drawerDom.current as Node\n const targetElement = event.target as Node\n\n let isInDrawer = false\n if (drawer && targetElement) {\n isInDrawer = drawer.contains(targetElement as Node) || targetElement === drawer\n }\n drawerDom.current = null\n if (rest.visible && !isInDrawer && _onCancel) {\n _onCancel()\n }\n }\n document.removeEventListener('click', handleOutsideClick)\n document.addEventListener('click', handleOutsideClick)\n return () => {\n document.removeEventListener('click', handleOutsideClick)\n }\n }\n }, [rest.visible, clickOnBlankToClose, _onCancel])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\" defaultLocale={locale}>\n {(locale) => {\n return (\n <div\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n drawerDom.current = event.target\n }}\n >\n <AntdDrawer\n className={classNames(prefixCls, 'tnt-drawer', 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n [`${prefixCls}-footer`]: showFooter || footer,\n })}\n closable={false}\n onClose={onClose}\n width={480}\n {...rest}\n >\n <>\n {closable !== false && (\n <Icon type=\"close\" className={`${prefixCls}-close`} onClick={onClose} />\n )}\n {rest.children}\n <div className={`${prefixCls}-footer-style`}>\n {!footer\n ? showFooter && (\n <DefaultFooter\n confirmLoading={confirmLoading}\n okButtonProps={okButtonProps}\n cancelButtonProps={cancelButtonProps}\n okType={okType}\n locale={locale}\n okText={okText}\n cancelType={cancelType}\n cancelText={cancelText}\n onClose={onClose}\n onSubmit={onSubmit}\n onOk={onOk}\n onCancel={onCancel}\n />\n )\n : footer}\n </div>\n </>\n </AntdDrawer>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import './style';
2
2
  import { Drawer } from './drawer';
3
- import './drawer.less';
3
+ import './index.less';
4
4
  export * from 'antd/es/drawer';
5
5
  export default Drawer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,eAAe,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './drawer.less'\nexport * from 'antd/es/drawer'\n\nexport default Drawer\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,cAAc,CAAA;AACrB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './index.less'\nexport * from 'antd/es/drawer'\n\nexport default Drawer\n"]}
@@ -0,0 +1,154 @@
1
+ @drawer-prefix-cls: ~'@{ant-prefix}-drawer';
2
+
3
+
4
+ .tnt-drawer.@{drawer-prefix-cls} {
5
+ &-top {
6
+ .@{drawer-prefix-cls}-wrapper-body {
7
+ margin-top: 48px;
8
+ }
9
+
10
+ .@{drawer-prefix-cls}-content-wrapper {
11
+ height: 480px !important;
12
+ }
13
+ }
14
+
15
+ &-bottom {
16
+ .@{drawer-prefix-cls}-content-wrapper {
17
+ height: 480px !important;
18
+ }
19
+ }
20
+
21
+ .@{drawer-prefix-cls}-wrapper-body {
22
+ margin-top: 48px;
23
+ max-height: ~'calc(100vh - 50px)';
24
+ }
25
+
26
+ &-footer {
27
+ .@{drawer-prefix-cls}-header {
28
+ border-bottom: none;
29
+ position: absolute;
30
+ right: 0;
31
+ top: 0;
32
+ background: #fff;
33
+ width: 100%;
34
+ }
35
+
36
+ .@{drawer-prefix-cls}-wrapper-body {
37
+ max-height: ~'calc(100vh - 98px)' !important;
38
+ margin-top: 48px !important;
39
+ margin-bottom: 48px !important;
40
+ }
41
+
42
+ }
43
+
44
+ .@{drawer-prefix-cls}-title {
45
+ font-size: 16px !important;
46
+ font-weight: 500 !important;
47
+ }
48
+
49
+ .@{drawer-prefix-cls}-close {
50
+ color: fade(@text-color, 50%);
51
+ width: 62px;
52
+ top: -4px;
53
+
54
+
55
+ position: absolute;
56
+ top: -2px;
57
+ right: 0;
58
+ z-index: 10;
59
+ display: block;
60
+ width: 48px;
61
+ height: 48px;
62
+ padding: 0;
63
+ color: rgba(23, 35, 61, 0.8);
64
+ font-weight: 700;
65
+ font-size: 20px;
66
+ font-style: normal;
67
+ line-height: 56px;
68
+ text-align: center;
69
+ text-transform: none;
70
+ text-decoration: none;
71
+ background: transparent;
72
+ border: 0;
73
+ outline: 0;
74
+ cursor: pointer;
75
+ transition: color 0.3s;
76
+ text-rendering: auto;
77
+ }
78
+
79
+
80
+ .@{drawer-prefix-cls}-contain-closable {
81
+ .@{drawer-prefix-cls}-header {
82
+ padding: 12px 36px 12px 20px;
83
+ }
84
+ }
85
+
86
+ &-right {
87
+ .@{drawer-prefix-cls}-content {
88
+ border-radius: @border-radius-base 0px 0px @border-radius-base;
89
+ background: #F8F9FB;
90
+ }
91
+ }
92
+
93
+ &-left {
94
+ .@{drawer-prefix-cls}-content {
95
+ border-radius: 0px @border-radius-base @border-radius-base 0px;
96
+ background: #F8F9FB;
97
+ }
98
+ }
99
+
100
+ &-top {
101
+ .@{drawer-prefix-cls}-content {
102
+ border-radius: 0px 0px @border-radius-base @border-radius-base;
103
+ background: #F8F9FB;
104
+ padding-top: 48px;
105
+ }
106
+
107
+ .@{drawer-prefix-cls}-wrapper-body {
108
+ margin-top: 0px !important;
109
+ }
110
+ }
111
+
112
+ &-bottom {
113
+ .@{drawer-prefix-cls}-content {
114
+ border-radius: @border-radius-base @border-radius-base 0px 0px;
115
+ background: #F8F9FB;
116
+ padding-top: 48px;
117
+ }
118
+
119
+ .@{drawer-prefix-cls}-wrapper-body {
120
+ margin-top: 0px !important;
121
+ }
122
+ }
123
+
124
+
125
+ .@{drawer-prefix-cls}-header {
126
+ padding: 13px 24px;
127
+ border-bottom: none;
128
+ position: absolute;
129
+ right: 0;
130
+ top: 0;
131
+ width: 100%;
132
+ background: #fff;
133
+ }
134
+
135
+ .@{drawer-prefix-cls}-body {
136
+ padding: @padding-lg !important;
137
+
138
+ }
139
+
140
+
141
+ .@{drawer-prefix-cls}-wrapper-body {
142
+
143
+ .@{drawer-prefix-cls}-footer-style {
144
+ position: absolute;
145
+ right: 0;
146
+ bottom: 0;
147
+ width: 100%;
148
+ padding: 8px 24px;
149
+ background: #fff;
150
+ text-align: right;
151
+ }
152
+
153
+ }
154
+ }
@@ -157,7 +157,7 @@
157
157
  padding: 0;
158
158
  color: @text-color-secondary;
159
159
  font-weight: 700;
160
- font-size: 20px;
160
+ font-size: @font-size-lg;
161
161
  font-style: normal;
162
162
  line-height: 56px;
163
163
  text-align: center;
@@ -169,9 +169,7 @@
169
169
  cursor: pointer;
170
170
  transition: color @animation-duration-slow;
171
171
  text-rendering: auto;
172
- .tntd-anticon {
173
- font-size: 20px;
174
- }
172
+
175
173
  &:focus,
176
174
  &:hover {
177
175
  color: @icon-color-hover;
@@ -170,8 +170,7 @@
170
170
 
171
171
  // Reset Select's style in addon
172
172
  .@{ant-prefix}-select {
173
- margin: calc(1px - @input-padding-vertical-base) (-@input-padding-horizontal-base);
174
-
173
+ margin: calc(-1px - @input-padding-vertical-base) (-@input-padding-horizontal-base);
175
174
  .@{ant-prefix}-select-selection {
176
175
  margin: -1px;
177
176
  background-color: inherit;
@@ -50,6 +50,10 @@ const en_US = _merge(sourceLocale, {
50
50
  TntdSecondPage: {
51
51
  back: 'Back'
52
52
  },
53
- ColorPicker: {}
53
+ ColorPicker: {},
54
+ Drawer: {
55
+ okText: 'Submit',
56
+ cancelText: 'Cancel'
57
+ }
54
58
  });
55
59
  export default en_US;
@@ -1 +1 @@
1
- {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/es/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n})\n\nexport default en_US\n"]}
1
+ {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/es/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n Drawer: {\n okText: 'Submit',\n cancelText: 'Cancel',\n },\n})\n\nexport default en_US\n"]}
@@ -35,6 +35,10 @@ const zh_CN = _merge(sourceLocale, {
35
35
  TntdSecondPage: {
36
36
  back: '返回'
37
37
  },
38
- ColorPicker: {}
38
+ ColorPicker: {},
39
+ Drawer: {
40
+ okText: '确定',
41
+ cancelText: '取消'
42
+ }
39
43
  });
40
44
  export default zh_CN;
@@ -1 +1 @@
1
- {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/es/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n})\n\nexport default zh_CN\n"]}
1
+ {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;KACjB;CACF,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/es/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n Drawer: {\n okText: '确定',\n cancelText: '取消',\n },\n})\n\nexport default zh_CN\n"]}
@@ -12,14 +12,18 @@ import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
12
12
  import './index.less';
13
13
  export default (props => {
14
14
  const {
15
- className
15
+ className,
16
+ version
16
17
  } = props,
17
- other = __rest(props, ["className"]);
18
+ other = __rest(props, ["className", "version"]);
19
+ const currentVersion = version || localStorage.getItem('app_version') || 'v2';
18
20
  return React.createElement(LocaleReceiver, {
19
21
  componentName: "PageLoading"
20
22
  }, (locale, localeCode) => {
21
23
  return React.createElement("div", Object.assign({
22
- className: cn('tnt-page-loading-container', className)
23
- }, other), React.createElement("span", null, locale.text));
24
+ className: cn('tnt-page-loading-container', 'tnt-current-' + currentVersion, className)
25
+ }, other), React.createElement("div", {
26
+ className: "tnt-page-loading-bg"
27
+ }, React.createElement("span", null, locale.text)));
24
28
  });
25
29
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/page-loading/index.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,cAAc,MAAM,wCAAwC,CAAA;AAEnE,OAAO,cAAc,CAAA;AAErB,eAAe,CAAC,KAAK,EAAE,EAAE;IACrB,MAAM,EAAE,SAAS,KAAe,KAAK,EAAf,KAAK,UAAK,KAAK,EAA/B,aAAuB,CAAQ,CAAA;IACrC,OAAO,CACH,oBAAC,cAAc,IAAC,aAAa,EAAC,aAAa,IACxC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACtB,OAAO,CACH,2CAAK,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,IAAM,KAAK;YACtE,kCAAO,MAAM,CAAC,IAAI,CAAQ,CACxB,CACL,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACP,CAAC,CAAC","sourcesContent":["import React from 'react'\nimport cn from 'classnames'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\n\nimport './index.less'\n\nexport default (props) => {\n const { className, ...other } = props\n return (\n <LocaleReceiver componentName=\"PageLoading\">\n {(locale, localeCode) => {\n return (\n <div className={cn('tnt-page-loading-container', className)} {...other}>\n <span>{locale.text}</span>\n </div>\n )\n }}\n </LocaleReceiver>\n ) \n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/page-loading/index.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,cAAc,MAAM,wCAAwC,CAAA;AAEnE,OAAO,cAAc,CAAA;AAErB,eAAe,CAAC,KAAK,EAAE,EAAE;IACvB,MAAM,EAAE,SAAS,EAAE,OAAO,KAAe,KAAK,EAAf,KAAK,UAAK,KAAK,EAAxC,wBAAgC,CAAQ,CAAA;IAC9C,MAAM,cAAc,GAAG,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,CAAA;IAC7E,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,aAAa,IACxC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACtB,OAAO,CACL,2CAAK,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,cAAc,GAAG,cAAc,EAAE,SAAS,CAAC,IAAM,KAAK;YACrG,6BAAK,SAAS,EAAC,qBAAqB;gBAClC,kCAAO,MAAM,CAAC,IAAI,CAAQ,CACtB,CACF,CACP,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAC","sourcesContent":["import React from 'react'\nimport cn from 'classnames'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\n\nimport './index.less'\n\nexport default (props) => {\n const { className, version, ...other } = props\n const currentVersion = version || localStorage.getItem('app_version') || 'v2'\n return (\n <LocaleReceiver componentName=\"PageLoading\">\n {(locale, localeCode) => {\n return (\n <div className={cn('tnt-page-loading-container', 'tnt-current-' + currentVersion, className)} {...other}>\n <div className=\"tnt-page-loading-bg\">\n <span>{locale.text}</span>\n </div>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n};\n"]}
@@ -1,22 +1,38 @@
1
1
  .tnt-page-loading-container {
2
- position: fixed;
3
- top: 140px;
4
- left: 50%;
5
- width: 70px;
6
- height: 70px;
7
- background-size: 100% 100%;
8
- transform: translate(-50%, 0);
9
- background-repeat: no-repeat;
10
- background-image: url("./loading.gif");
11
- z-index: 99999999999;
12
- text-align: center;
13
- span {
2
+ position: relative;
3
+ &.tnt-current-v2 {
4
+ height: calc(-50px + 100vh) !important;
5
+ }
6
+ &.tnt-current-v3 {
7
+ height: calc(-60px + 100vh) !important;
8
+ }
9
+ .tnt-page-loading-bg {
14
10
  position: absolute;
11
+ top: 45%;
15
12
  left: 50%;
16
- bottom: 0;
17
- transform: translate(-50%, 0);
18
- width: 100%;
19
- font-size: 12px;
20
- color: #17233D;
13
+ width: 70px;
14
+ height: 70px;
15
+ background-size: 100% 100%;
16
+ transform: translate(-50%, -50%);
17
+ background-repeat: no-repeat;
18
+ background-image: url("./loading.gif");
19
+ z-index: 99999999999;
20
+ text-align: center;
21
+ span {
22
+ position: absolute;
23
+ left: 50%;
24
+ bottom: 0;
25
+ transform: translate(-50%, 0);
26
+ width: 100%;
27
+ font-size: 12px;
28
+ color: #17233D;
29
+ }
30
+ }
31
+ }
32
+ .tnt-themeS2,.tnt-themeS3 {
33
+ .tnt-current-v3.tnt-page-loading-container {
34
+ span {
35
+ color: #fff;
36
+ }
21
37
  }
22
38
  }
@@ -3,7 +3,7 @@
3
3
  background: #fff;
4
4
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.05);
5
5
  padding: 20px 16px 16px 16px;
6
- height: calc(-84px + 100vh) !important;
6
+ max-height: calc(-84px + 100vh) !important;
7
7
  overflow-y: auto;
8
8
 
9
9
  .tnt-querylistscene-content {
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import cn from 'classnames';
2
3
  import './index.less';
3
4
  export default ((WrappedComponent, options = {}) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs-container/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,cAAc,CAAC;AAEtB,eAAe,CAAC,gBAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;IAC3C,MAAM,cAAc,GAAG,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;IAE9E,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACd,6BAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,cAAc,GAAG,cAAc,EAAE,SAAS,CAAC;QAClF,oBAAC,gBAAgB,oBAAK,KAAK,EAAM,OAAO,EAAI,CAC1C,CACT,CAAC;AACN,CAAC,CAAC","sourcesContent":["import cn from 'classnames'\n\nimport './index.less';\n\nexport default (WrappedComponent, options = {}) => {\n const { version, className = '' } = options\n const currentVersion = version || localStorage.getItem('app_version') || 'v2';\n\n return (props) => (\n <div className={cn('tnt-tabs-v-container', 'tnt-current-' + currentVersion, className)}>\n <WrappedComponent {...props} {...options} />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs-container/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,cAAc,CAAC;AAEtB,eAAe,CAAC,gBAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;IAC3C,MAAM,cAAc,GAAG,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;IAE9E,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACd,6BAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,cAAc,GAAG,cAAc,EAAE,SAAS,CAAC;QAClF,oBAAC,gBAAgB,oBAAK,KAAK,EAAM,OAAO,EAAI,CAC1C,CACT,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React from 'react'\nimport cn from 'classnames'\n\nimport './index.less';\n\nexport default (WrappedComponent, options = {}) => {\n const { version, className = '' } = options\n const currentVersion = version || localStorage.getItem('app_version') || 'v2';\n\n return (props) => (\n <div className={cn('tnt-tabs-v-container', 'tnt-current-' + currentVersion, className)}>\n <WrappedComponent {...props} {...options} />\n </div>\n );\n};\n"]}
@@ -12,7 +12,7 @@
12
12
  }
13
13
  .ant-tabs-nav .ant-tabs-tab {
14
14
  padding: 9px 15px 10px;
15
- margin-right: 0;
15
+ // margin-right: 0;
16
16
  }
17
17
  .ant-tabs-nav-wrap,
18
18
  .ant-tabs-nav-container {
@@ -22,7 +22,7 @@
22
22
  bottom: 0;
23
23
  }
24
24
  .tnt-querylistscene-content {
25
- height: calc(100vh - 90px);
25
+ max-height: calc(100vh - 90px);
26
26
  overflow: hidden auto;
27
27
  }
28
28
  }
@@ -42,7 +42,7 @@
42
42
  }
43
43
  }
44
44
  .tnt-querylistscene-content {
45
- height: calc(100vh - 131px);
45
+ max-height: calc(100vh - 131px);
46
46
  overflow: hidden auto;
47
47
  background-color: transparent;
48
48
  padding: 20px 16px 16px 16px;
@@ -1,4 +1,27 @@
1
1
  import type { DrawerProps as AntdDrawerProps } from 'antd/lib/drawer';
2
- import { FC } from 'react';
3
- export declare const Drawer: FC<AntdDrawerProps>;
2
+ import type { BaseButtonProps } from 'antd/lib/button/button';
3
+ import type { ButtonType } from '../button/button';
4
+ import React, { FC } from 'react';
5
+ interface CustomDrawerProps extends AntdDrawerProps {
6
+ footer?: React.ReactNode;
7
+ showFooter?: boolean;
8
+ onClose?: () => void;
9
+ onSubmit?: () => void;
10
+ onCancel?: () => void;
11
+ onOk?: () => void;
12
+ okText?: string;
13
+ cancelText?: string;
14
+ locale?: {
15
+ okText?: string;
16
+ cancelText?: string;
17
+ };
18
+ okType?: ButtonType;
19
+ cancelType?: ButtonType;
20
+ confirmLoading?: boolean;
21
+ okButtonProps?: BaseButtonProps;
22
+ cancelButtonProps?: BaseButtonProps;
23
+ clickOnBlankToClose: boolean;
24
+ }
25
+ export declare const Drawer: FC<CustomDrawerProps>;
26
+ export {};
4
27
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGpE,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAKjC,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,eAAe,CAmBtC,CAAA"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAA;AAuDpD,UAAU,iBAAkB,SAAQ,eAAe;IACjD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,Q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