@jetlinks-web/components 2.6.23 → 2.6.26

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 (88) hide show
  1. package/es/AMap/Map.js +2 -1
  2. package/es/AutoComplete/AutoComplete.js +1 -0
  3. package/es/BadgeStatus/Badge.js +2 -1
  4. package/es/CardSelect/CardSelect.js +7 -1
  5. package/es/CardSelect/style/index.less +26 -26
  6. package/es/CheckButton/CheckButton.js +2 -1
  7. package/es/DragModal/DragModal.js +1 -0
  8. package/es/Echarts/Echarts.js +2 -1
  9. package/es/EditTable/EditTable.js +6 -4
  10. package/es/EditTable/FormItem.js +4 -9
  11. package/es/EditTable/Header.js +3 -5
  12. package/es/EditTable/components/ContextMenu/Menu.js +2 -1
  13. package/es/EditTable/components/Search/search.js +2 -1
  14. package/es/EditTable/components/Search/sort.js +3 -1
  15. package/es/EditTable/group.js +12 -11
  16. package/es/EditTable/hooks/useValidate.js +1 -1
  17. package/es/EditTable/style/form.less +33 -33
  18. package/es/EditTable/style/group.less +32 -32
  19. package/es/EditTable/style/header.less +77 -77
  20. package/es/EditTable/style/menu.less +25 -25
  21. package/es/EditTable/utils.js +30 -3
  22. package/es/Ellipsis/style/index.less +20 -20
  23. package/es/FlameGraph/FlameGraph.js +4 -5
  24. package/es/FullPage/FullPage.js +2 -1
  25. package/es/LocaleProvider/index.js +2 -1
  26. package/es/PermissionButton/index.js +7 -6
  27. package/es/ProLayout/Basic/BasicLayout.js +39 -34
  28. package/es/ProLayout/Basic/Header.js +7 -3
  29. package/es/ProLayout/PageContainer/index.js +12 -8
  30. package/es/ProLayout/SiderMenu/BaseMenu.js +39 -16
  31. package/es/ProLayout/SiderMenu/SiderMenu.js +34 -14
  32. package/es/ProLayout/SiderMenu/index.less +231 -231
  33. package/es/ProLayout/TopHeader/index.js +9 -1
  34. package/es/ProLayout/util.js +5 -5
  35. package/es/ProTable/Content.js +13 -26
  36. package/es/ProTable/hooks/useTableInject.js +5 -0
  37. package/es/ProTable/hooks/useTableSelection.js +95 -0
  38. package/es/RadioButton/RadioButton.js +1 -0
  39. package/es/Search/Advanced/SaveHistory.js +2 -1
  40. package/es/Search/Item.js +2 -1
  41. package/es/Title/title.js +1 -0
  42. package/es/style/index.css +1 -1
  43. package/lib/AMap/Map.js +2 -1
  44. package/lib/AutoComplete/AutoComplete.js +1 -0
  45. package/lib/BadgeStatus/Badge.js +2 -1
  46. package/lib/CardSelect/CardSelect.js +7 -1
  47. package/lib/CardSelect/style/index.less +26 -26
  48. package/lib/CheckButton/CheckButton.js +2 -1
  49. package/lib/DragModal/DragModal.js +1 -0
  50. package/lib/Echarts/Echarts.js +2 -1
  51. package/lib/EditTable/EditTable.js +6 -4
  52. package/lib/EditTable/FormItem.js +4 -9
  53. package/lib/EditTable/Header.js +3 -5
  54. package/lib/EditTable/components/ContextMenu/Menu.js +2 -1
  55. package/lib/EditTable/components/Search/search.js +2 -1
  56. package/lib/EditTable/components/Search/sort.js +3 -1
  57. package/lib/EditTable/group.js +12 -11
  58. package/lib/EditTable/hooks/useValidate.js +1 -1
  59. package/lib/EditTable/style/form.less +33 -33
  60. package/lib/EditTable/style/group.less +32 -32
  61. package/lib/EditTable/style/header.less +77 -77
  62. package/lib/EditTable/style/menu.less +25 -25
  63. package/lib/EditTable/utils.js +31 -3
  64. package/lib/Ellipsis/style/index.less +20 -20
  65. package/lib/FlameGraph/FlameGraph.js +4 -5
  66. package/lib/FullPage/FullPage.js +2 -1
  67. package/lib/Icon/icon.js +2 -1
  68. package/lib/LocaleProvider/index.js +2 -1
  69. package/lib/PermissionButton/index.js +7 -6
  70. package/lib/ProLayout/Basic/BasicLayout.js +40 -34
  71. package/lib/ProLayout/Basic/Header.js +6 -2
  72. package/lib/ProLayout/PageContainer/index.js +11 -7
  73. package/lib/ProLayout/SiderMenu/BaseMenu.js +39 -17
  74. package/lib/ProLayout/SiderMenu/SiderMenu.js +35 -14
  75. package/lib/ProLayout/SiderMenu/index.less +231 -231
  76. package/lib/ProLayout/TopHeader/index.js +9 -2
  77. package/lib/ProLayout/util.js +5 -5
  78. package/lib/ProTable/Content.js +13 -26
  79. package/lib/ProTable/hooks/useTableInject.js +11 -0
  80. package/lib/ProTable/hooks/useTableSelection.js +102 -0
  81. package/lib/RadioButton/RadioButton.js +1 -0
  82. package/lib/Search/Advanced/SaveHistory.js +2 -1
  83. package/lib/Search/Item.js +2 -1
  84. package/lib/Title/title.js +1 -0
  85. package/lib/components.js +2 -1
  86. package/lib/index.js +2 -1
  87. package/lib/style/index.css +1 -1
  88. package/package.json +3 -3
@@ -1,231 +1,231 @@
1
- @import '../style/default.less';
2
-
3
- @pro-layout-sider-menu-prefix-cls: ~'@{ant-prefix}-pro-sider';
4
-
5
- @nav-header-height: @pro-layout-header-height;
6
-
7
- .@{pro-layout-sider-menu-prefix-cls} {
8
- position: relative;
9
- background-color: @layout-sider-background;
10
- border-right: 0;
11
- // FIXME: 临时修正(可能不会做兼容)
12
- z-index: 20;
13
-
14
- // 这里关掉了动画,不然使用无法兼容
15
- .@{ant-prefix}-menu {
16
- background: transparent;
17
- }
18
-
19
- &.@{ant-prefix}-layout-sider-light {
20
- .@{ant-prefix}-menu-item a {
21
- color: @heading-color;
22
- }
23
- .@{ant-prefix}-menu-item-selected a,
24
- .@{ant-prefix}-menu-item a:hover {
25
- color: @primary-color;
26
- }
27
- }
28
-
29
- &-logo {
30
- position: relative;
31
- display: flex;
32
- align-items: center;
33
- padding: 16px 16px;
34
- cursor: pointer;
35
- transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
36
-
37
- > a {
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- min-height: 32px;
42
- }
43
-
44
- img {
45
- display: inline-block;
46
- height: 32px;
47
- vertical-align: middle;
48
- }
49
-
50
- h1 {
51
- display: inline-block;
52
- height: 32px;
53
- margin: 0 0 0 12px;
54
- color: white;
55
- font-weight: 600;
56
- font-size: 18px;
57
- line-height: 32px;
58
- vertical-align: middle;
59
- animation: pro-layout-title-hide 0.3s;
60
- }
61
- }
62
-
63
- &-logo-card {
64
- padding: 16px 0;
65
- justify-content: center;
66
- }
67
-
68
- &-extra {
69
- margin-bottom: 16px;
70
- padding: 0 16px;
71
- &-no-logo {
72
- margin-top: 16px;
73
- }
74
- }
75
-
76
- &-menu {
77
- position: relative;
78
- z-index: 10;
79
- min-height: 100%;
80
- box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
81
- }
82
-
83
- .@{ant-prefix}-layout-sider-children {
84
- display: flex;
85
- flex-direction: column;
86
- height: 100%;
87
-
88
- ::-webkit-scrollbar {
89
- width: 6px;
90
- height: 6px;
91
- }
92
-
93
- ::-webkit-scrollbar-track {
94
- background: rgba(255, 255, 255, 0.15);
95
- border-radius: 3px;
96
- box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05);
97
- }
98
-
99
- /* 滚动条滑块 */
100
- ::-webkit-scrollbar-thumb {
101
- background: rgba(255, 255, 255, 0.2);
102
- border-radius: 3px;
103
- box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
104
- }
105
- }
106
-
107
- &.@{ant-prefix}-layout-sider-collapsed {
108
- .@{ant-prefix}-menu-inline-collapsed {
109
- width: 48px;
110
- }
111
- .@{pro-layout-sider-menu-prefix-cls} {
112
- &-logo {
113
- padding: 16px 8px;
114
- }
115
- }
116
- }
117
-
118
- &.@{ant-prefix}-layout-sider.@{pro-layout-sider-menu-prefix-cls}-fixed {
119
- position: fixed;
120
- top: 0;
121
- left: 0;
122
- z-index: 99; // react pro-components: z-index: 100;
123
- height: 100%;
124
- overflow: auto;
125
- overflow-x: hidden;
126
- box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
127
- > .@{ant-prefix}-menu-root {
128
- :not(.@{pro-layout-sider-menu-prefix-cls}-link-menu) {
129
- height: ~'calc(100vh - @{nav-header-height})';
130
- overflow-y: auto;
131
- }
132
- }
133
- }
134
-
135
- &-light {
136
- background-color: @component-background;
137
- box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
138
-
139
- .@{ant-prefix}-layout-sider-children {
140
- ::-webkit-scrollbar-track {
141
- background: rgba(0, 0, 0, 0.06);
142
- border-radius: 3px;
143
- box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
144
- }
145
-
146
- /* 滚动条滑块 */
147
- ::-webkit-scrollbar-thumb {
148
- background: rgba(0, 0, 0, 0.12);
149
- border-radius: 3px;
150
- box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
151
- }
152
- }
153
-
154
- .@{pro-layout-sider-menu-prefix-cls}-logo {
155
- h1 {
156
- color: @primary-color;
157
- }
158
- }
159
- .@{ant-prefix}-menu-light {
160
- border-right-color: transparent;
161
- }
162
-
163
- .@{pro-layout-sider-menu-prefix-cls}-collapsed-button {
164
- border-top: @border-width-base @border-style-base
165
- @border-color-split;
166
- }
167
- }
168
-
169
- &-icon {
170
- width: 14px;
171
- vertical-align: baseline;
172
- }
173
-
174
- &-links {
175
- width: 100%;
176
- ul.@{ant-prefix}-menu-root {
177
- height: auto;
178
- }
179
- }
180
-
181
- &-collapsed-button {
182
- border-top: @border-width-base @border-style-base rgba(0, 0, 0, 0.25);
183
- .anticon {
184
- font-size: 16px;
185
- }
186
- }
187
-
188
- .top-nav-menu li.@{ant-prefix}-menu-item {
189
- height: 100%;
190
- line-height: 1;
191
- }
192
- .drawer .drawer-content {
193
- background: @layout-sider-background;
194
- }
195
- }
196
-
197
- // 修正菜单 collapsed 时,icon 与 title 的间距
198
- .@{ant-prefix}-pro-menu-item {
199
- .anticon + .@{ant-prefix}-pro-menu-item-title {
200
- margin-left: 10px;
201
- }
202
- }
203
-
204
- .sider-app-menus {
205
- width: 100px;
206
- background-color: #fff;
207
- cursor: pointer;
208
- padding: 6px;
209
- transition: all .3s;
210
- border-radius: 4px;
211
- color: #333;
212
-
213
- &:hover {
214
- background-color: #efefef;
215
- }
216
- }
217
-
218
- @keyframes pro-layout-title-hide {
219
- 0% {
220
- display: none;
221
- opacity: 0;
222
- }
223
- 80% {
224
- display: none;
225
- opacity: 0;
226
- }
227
- 100% {
228
- display: unset;
229
- opacity: 1;
230
- }
231
- }
1
+ @import '../style/default.less';
2
+
3
+ @pro-layout-sider-menu-prefix-cls: ~'@{ant-prefix}-pro-sider';
4
+
5
+ @nav-header-height: @pro-layout-header-height;
6
+
7
+ .@{pro-layout-sider-menu-prefix-cls} {
8
+ position: relative;
9
+ background-color: @layout-sider-background;
10
+ border-right: 0;
11
+ // FIXME: 临时修正(可能不会做兼容)
12
+ z-index: 20;
13
+
14
+ // 这里关掉了动画,不然使用无法兼容
15
+ .@{ant-prefix}-menu {
16
+ background: transparent;
17
+ }
18
+
19
+ &.@{ant-prefix}-layout-sider-light {
20
+ .@{ant-prefix}-menu-item a {
21
+ color: @heading-color;
22
+ }
23
+ .@{ant-prefix}-menu-item-selected a,
24
+ .@{ant-prefix}-menu-item a:hover {
25
+ color: @primary-color;
26
+ }
27
+ }
28
+
29
+ &-logo {
30
+ position: relative;
31
+ display: flex;
32
+ align-items: center;
33
+ padding: 16px 16px;
34
+ cursor: pointer;
35
+ transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
36
+
37
+ > a {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ min-height: 32px;
42
+ }
43
+
44
+ img {
45
+ display: inline-block;
46
+ height: 32px;
47
+ vertical-align: middle;
48
+ }
49
+
50
+ h1 {
51
+ display: inline-block;
52
+ height: 32px;
53
+ margin: 0 0 0 12px;
54
+ color: white;
55
+ font-weight: 600;
56
+ font-size: 18px;
57
+ line-height: 32px;
58
+ vertical-align: middle;
59
+ animation: pro-layout-title-hide 0.3s;
60
+ }
61
+ }
62
+
63
+ &-logo-card {
64
+ padding: 16px 0;
65
+ justify-content: center;
66
+ }
67
+
68
+ &-extra {
69
+ margin-bottom: 16px;
70
+ padding: 0 16px;
71
+ &-no-logo {
72
+ margin-top: 16px;
73
+ }
74
+ }
75
+
76
+ &-menu {
77
+ position: relative;
78
+ z-index: 10;
79
+ min-height: 100%;
80
+ box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
81
+ }
82
+
83
+ .@{ant-prefix}-layout-sider-children {
84
+ display: flex;
85
+ flex-direction: column;
86
+ height: 100%;
87
+
88
+ ::-webkit-scrollbar {
89
+ width: 6px;
90
+ height: 6px;
91
+ }
92
+
93
+ ::-webkit-scrollbar-track {
94
+ background: rgba(255, 255, 255, 0.15);
95
+ border-radius: 3px;
96
+ box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05);
97
+ }
98
+
99
+ /* 滚动条滑块 */
100
+ ::-webkit-scrollbar-thumb {
101
+ background: rgba(255, 255, 255, 0.2);
102
+ border-radius: 3px;
103
+ box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
104
+ }
105
+ }
106
+
107
+ &.@{ant-prefix}-layout-sider-collapsed {
108
+ .@{ant-prefix}-menu-inline-collapsed {
109
+ width: 48px;
110
+ }
111
+ .@{pro-layout-sider-menu-prefix-cls} {
112
+ &-logo {
113
+ padding: 16px 8px;
114
+ }
115
+ }
116
+ }
117
+
118
+ &.@{ant-prefix}-layout-sider.@{pro-layout-sider-menu-prefix-cls}-fixed {
119
+ position: fixed;
120
+ top: 0;
121
+ left: 0;
122
+ z-index: 99; // react pro-components: z-index: 100;
123
+ height: 100%;
124
+ overflow: auto;
125
+ overflow-x: hidden;
126
+ box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
127
+ > .@{ant-prefix}-menu-root {
128
+ :not(.@{pro-layout-sider-menu-prefix-cls}-link-menu) {
129
+ height: ~'calc(100vh - @{nav-header-height})';
130
+ overflow-y: auto;
131
+ }
132
+ }
133
+ }
134
+
135
+ &-light {
136
+ background-color: @component-background;
137
+ box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
138
+
139
+ .@{ant-prefix}-layout-sider-children {
140
+ ::-webkit-scrollbar-track {
141
+ background: rgba(0, 0, 0, 0.06);
142
+ border-radius: 3px;
143
+ box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
144
+ }
145
+
146
+ /* 滚动条滑块 */
147
+ ::-webkit-scrollbar-thumb {
148
+ background: rgba(0, 0, 0, 0.12);
149
+ border-radius: 3px;
150
+ box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
151
+ }
152
+ }
153
+
154
+ .@{pro-layout-sider-menu-prefix-cls}-logo {
155
+ h1 {
156
+ color: @primary-color;
157
+ }
158
+ }
159
+ .@{ant-prefix}-menu-light {
160
+ border-right-color: transparent;
161
+ }
162
+
163
+ .@{pro-layout-sider-menu-prefix-cls}-collapsed-button {
164
+ border-top: @border-width-base @border-style-base
165
+ @border-color-split;
166
+ }
167
+ }
168
+
169
+ &-icon {
170
+ width: 14px;
171
+ vertical-align: baseline;
172
+ }
173
+
174
+ &-links {
175
+ width: 100%;
176
+ ul.@{ant-prefix}-menu-root {
177
+ height: auto;
178
+ }
179
+ }
180
+
181
+ &-collapsed-button {
182
+ border-top: @border-width-base @border-style-base rgba(0, 0, 0, 0.25);
183
+ .anticon {
184
+ font-size: 16px;
185
+ }
186
+ }
187
+
188
+ .top-nav-menu li.@{ant-prefix}-menu-item {
189
+ height: 100%;
190
+ line-height: 1;
191
+ }
192
+ .drawer .drawer-content {
193
+ background: @layout-sider-background;
194
+ }
195
+ }
196
+
197
+ // 修正菜单 collapsed 时,icon 与 title 的间距
198
+ .@{ant-prefix}-pro-menu-item {
199
+ .anticon + .@{ant-prefix}-pro-menu-item-title {
200
+ margin-left: 10px;
201
+ }
202
+ }
203
+
204
+ .sider-app-menus {
205
+ width: 100px;
206
+ background-color: #fff;
207
+ cursor: pointer;
208
+ padding: 6px;
209
+ transition: all .3s;
210
+ border-radius: 4px;
211
+ color: #333;
212
+
213
+ &:hover {
214
+ background-color: #efefef;
215
+ }
216
+ }
217
+
218
+ @keyframes pro-layout-title-hide {
219
+ 0% {
220
+ display: none;
221
+ opacity: 0;
222
+ }
223
+ 80% {
224
+ display: none;
225
+ opacity: 0;
226
+ }
227
+ 100% {
228
+ display: unset;
229
+ opacity: 1;
230
+ }
231
+ }
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.topNavHeaderProps = exports.baseHeaderProps = exports.TopNavHeader = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _vue = require("vue");
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
12
  var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/lib/vc-resize-observer"));
@@ -17,6 +17,9 @@ var _RouteContext = require("../RouteContext");
17
17
  var _BaseMenu = _interopRequireDefault(require("../SiderMenu/BaseMenu"));
18
18
  var _util = require("../util");
19
19
  var _excluded = ["rightContentRender"];
20
+ function _isSlot(s) {
21
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
22
+ }
20
23
  var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
21
24
  prefixCls: _vueTypes.default.string.def('ant-pro'),
22
25
  collapsed: _vueTypes.default.looseBool,
@@ -143,7 +146,11 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
143
146
  "class": "".concat(prefixCls, "-logo"),
144
147
  "key": "logo",
145
148
  "id": "logo"
146
- }, [headerDom])]), (0, _vue.createVNode)("div", {
149
+ }, _isSlot(headerDom) ? headerDom : {
150
+ default: function _default() {
151
+ return [headerDom];
152
+ }
153
+ })]), (0, _vue.createVNode)("div", {
147
154
  "style": {
148
155
  flex: 1
149
156
  },
@@ -14,14 +14,14 @@ function clearMenuItem(menusData) {
14
14
  return menusData.map(function (item) {
15
15
  var _finalItem$meta;
16
16
  var finalItem = (0, _objectSpread2.default)({}, item);
17
- if ((_finalItem$meta = finalItem.meta) !== null && _finalItem$meta !== void 0 && _finalItem$meta.hideInMenu) {
17
+ if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
18
18
  return null;
19
19
  }
20
- if (finalItem && finalItem !== null && finalItem !== void 0 && finalItem.children) {
20
+ if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
21
21
  var _finalItem$meta2;
22
- if (!((_finalItem$meta2 = finalItem.meta) !== null && _finalItem$meta2 !== void 0 && _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
22
+ if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
23
23
  var _child$meta;
24
- return child && child.name && !((_child$meta = child.meta) !== null && _child$meta !== void 0 && _child$meta.hideInMenu);
24
+ return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? void 0 : _child$meta.hideInMenu);
25
25
  })) {
26
26
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
27
27
  children: clearMenuItem(finalItem.children)
@@ -38,7 +38,7 @@ function flatMap(menusData) {
38
38
  return menusData.map(function (item) {
39
39
  var _finalItem$meta3;
40
40
  var finalItem = (0, _objectSpread2.default)({}, item);
41
- if (!finalItem.name || (_finalItem$meta3 = finalItem.meta) !== null && _finalItem$meta3 !== void 0 && _finalItem$meta3.hideInMenu) {
41
+ if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
42
42
  return null;
43
43
  }
44
44
  if (finalItem.children) {
@@ -23,25 +23,21 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
23
23
  "get": "setup-maybe-ref",
24
24
  "omit": "setup-maybe-ref",
25
25
  "Empty": "setup-maybe-ref",
26
- "useTableInject": "setup-maybe-ref",
27
26
  "props": "setup-reactive-const",
28
27
  "slots": "setup-maybe-ref",
29
- "_rowSelection": "setup-maybe-ref",
30
28
  "_columns": "setup-ref",
31
29
  "_slots": "setup-ref",
32
30
  "_scroll": "setup-ref",
33
- "gridTemplateColumns": "setup-ref",
34
- "onClick": "setup-const"
31
+ "gridTemplateColumns": "setup-ref"
35
32
  } */
36
33
  import { defineComponent as _defineComponent } from 'vue';
37
- import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, mergeProps as _mergeProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createVNode as _createVNode, normalizeProps as _normalizeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createSlots as _createSlots, createBlock as _createBlock } from "vue";
34
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createVNode as _createVNode, mergeProps as _mergeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createSlots as _createSlots, createBlock as _createBlock } from "vue";
38
35
  const _hoisted_1 = { class: "jtable-box" };
39
36
  const _hoisted_2 = {
40
37
  key: 0,
41
38
  class: "jtable-card"
42
39
  };
43
- const _hoisted_3 = ["onClick"];
44
- const _hoisted_4 = {
40
+ const _hoisted_3 = {
45
41
  key: 1,
46
42
  class: "j-table-empty"
47
43
  };
@@ -50,7 +46,6 @@ import { _contentProps } from "./setting";
50
46
  import { Table } from 'ant-design-vue/lib/';
51
47
  import { get, omit } from 'lodash-es';
52
48
  import Empty from '../Empty';
53
- import { useTableInject } from './hooks';
54
49
  const __sfc_main__ = _defineComponent({
55
50
  ...{
56
51
  name: 'Content'
@@ -65,7 +60,6 @@ const __sfc_main__ = _defineComponent({
65
60
  setup(__props) {
66
61
  const props = __props;
67
62
  const slots = useSlots();
68
- const _rowSelection = useTableInject();
69
63
  const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
70
64
  const _slots = computed(() => {
71
65
  return omit(slots, ['emptyText', 'bodyCell']);
@@ -85,12 +79,6 @@ const __sfc_main__ = _defineComponent({
85
79
  const gridTemplateColumns = computed(() => {
86
80
  return `repeat(${props.column}, 1fr)`;
87
81
  });
88
- const onClick = (item) => {
89
- if (_rowSelection && _rowSelection.value) {
90
- const _selected = _optionalChain([_rowSelection, 'access', _3 => _3.value, 'access', _4 => _4.selectedRowKeys, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6(item[props.rowKey])]);
91
- _optionalChain([_rowSelection, 'access', _7 => _7.value, 'access', _8 => _8.onSelect, 'optionalCall', _9 => _9(item, !_selected)]);
92
- }
93
- };
94
82
  return (_ctx, _cache) => {
95
83
  return (_openBlock(), _createElementBlock("div", _hoisted_1, [
96
84
  (_ctx.mode === 'CARD')
@@ -104,35 +92,34 @@ const __sfc_main__ = _defineComponent({
104
92
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
105
93
  return (_openBlock(), _createElementBlock("div", {
106
94
  class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
107
- key: item[props.rowKey],
108
- onClick: ($event) => (onClick(item))
95
+ key: item[props.rowKey]
109
96
  }, [
110
- _renderSlot(_ctx.$slots, "card", _mergeProps({ ref_for: true }, item))
111
- ], 10 /* CLASS, PROPS */, _hoisted_3));
97
+ _renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
98
+ ], 2 /* CLASS */));
112
99
  }), 128 /* KEYED_FRAGMENT */))
113
100
  ], 4 /* STYLE */))
114
- : (_openBlock(), _createElementBlock("div", _hoisted_4, [
101
+ : (_openBlock(), _createElementBlock("div", _hoisted_3, [
115
102
  _renderSlot(_ctx.$slots, "emptyText", {}, () => [
116
103
  _createVNode(_unref(Empty))
117
104
  ])
118
105
  ]))
119
106
  ]))
120
107
  : (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
121
- "row-selection": _ctx.rowSelection || _unref(_rowSelection),
108
+ "row-selection": _ctx.rowSelection,
122
109
  dataSource: _ctx.dataSource,
123
110
  columns: _columns.value,
124
111
  pagination: false,
125
112
  scroll: _scroll.value,
126
- class: { 'j-table-scroll': !_optionalChain([props, 'access', _10 => _10.scroll, 'optionalAccess', _11 => _11.y]) }
113
+ class: { 'j-table-scroll': !_optionalChain([props, 'access', _3 => _3.scroll, 'optionalAccess', _4 => _4.y]) }
127
114
  }), _createSlots({
128
115
  bodyCell: _withCtx(({ column, record, index }) => [
129
- ((_optionalChain([column, 'optionalAccess', _12 => _12.key]) || _optionalChain([column, 'optionalAccess', _13 => _13.dataIndex])) && _optionalChain([column, 'optionalAccess', _14 => _14.scopedSlots]) && (_optionalChain([_slots, 'access', _15 => _15.value, 'optionalAccess', _16 => _16[_optionalChain([column, 'optionalAccess', _17 => _17.dataIndex])]]) || _optionalChain([_slots, 'access', _18 => _18.value, 'optionalAccess', _19 => _19[_optionalChain([column, 'optionalAccess', _20 => _20.key])]])))
130
- ? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _21 => _21.key]) || _optionalChain([column, 'optionalAccess', _22 => _22.dataIndex]), _mergeProps({ key: 0 }, record, {
116
+ ((_optionalChain([column, 'optionalAccess', _5 => _5.key]) || _optionalChain([column, 'optionalAccess', _6 => _6.dataIndex])) && _optionalChain([column, 'optionalAccess', _7 => _7.scopedSlots]) && (_optionalChain([_slots, 'access', _8 => _8.value, 'optionalAccess', _9 => _9[_optionalChain([column, 'optionalAccess', _10 => _10.dataIndex])]]) || _optionalChain([_slots, 'access', _11 => _11.value, 'optionalAccess', _12 => _12[_optionalChain([column, 'optionalAccess', _13 => _13.key])]])))
117
+ ? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _14 => _14.key]) || _optionalChain([column, 'optionalAccess', _15 => _15.dataIndex]), _mergeProps({ key: 0 }, record, {
131
118
  index: index,
132
119
  column: column
133
120
  }))
134
121
  : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
135
- _createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _23 => _23.dataIndex]) || _optionalChain([column, 'optionalAccess', _24 => _24.key])) || '--'), 1 /* TEXT */)
122
+ _createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _16 => _16.dataIndex]) || _optionalChain([column, 'optionalAccess', _17 => _17.key])) || '--'), 1 /* TEXT */)
136
123
  ], 64 /* STABLE_FRAGMENT */))
137
124
  ]),
138
125
  emptyText: _withCtx(() => [
@@ -146,7 +133,7 @@ const __sfc_main__ = _defineComponent({
146
133
  return {
147
134
  name: slotKey,
148
135
  fn: _withCtx((slotProps) => [
149
- (!((_optionalChain([__props, 'access', _25 => _25.column, 'optionalAccess', _26 => _26.key]) || _optionalChain([__props, 'access', _27 => _27.column, 'optionalAccess', _28 => _28.dataIndex])) && _optionalChain([__props, 'access', _29 => _29.column, 'optionalAccess', _30 => _30.scopedSlots]) && (_optionalChain([_slots, 'access', _31 => _31.value, 'optionalAccess', _32 => _32[_optionalChain([__props, 'access', _33 => _33.column, 'optionalAccess', _34 => _34.dataIndex])]]) || _optionalChain([_slots, 'access', _35 => _35.value, 'optionalAccess', _36 => _36[_optionalChain([__props, 'access', _37 => _37.column, 'optionalAccess', _38 => _38.key])]]))))
136
+ (!((_optionalChain([__props, 'access', _18 => _18.column, 'optionalAccess', _19 => _19.key]) || _optionalChain([__props, 'access', _20 => _20.column, 'optionalAccess', _21 => _21.dataIndex])) && _optionalChain([__props, 'access', _22 => _22.column, 'optionalAccess', _23 => _23.scopedSlots]) && (_optionalChain([_slots, 'access', _24 => _24.value, 'optionalAccess', _25 => _25[_optionalChain([__props, 'access', _26 => _26.column, 'optionalAccess', _27 => _27.dataIndex])]]) || _optionalChain([_slots, 'access', _28 => _28.value, 'optionalAccess', _29 => _29[_optionalChain([__props, 'access', _30 => _30.column, 'optionalAccess', _31 => _31.key])]]))))
150
137
  ? _renderSlot(_ctx.$slots, slotKey, _normalizeProps(_mergeProps({ key: 0 }, slotProps)))
151
138
  : _createCommentVNode("v-if", true)
152
139
  ])
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableInject = void 0;
7
+ var _useTableSelection = require("./useTableSelection");
8
+ var _vue = require("vue");
9
+ var useTableInject = exports.useTableInject = function useTableInject() {
10
+ return (0, _vue.inject)(_useTableSelection.PROTABLE_ROW_SELECTION_KEY, null);
11
+ };