@jetlinks-web/components 2.0.2 → 2.0.3

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 (237) hide show
  1. package/es/AMap/Map.js +124 -0
  2. package/es/AMap/index.js +2 -0
  3. package/es/AMap/util.js +56 -0
  4. package/es/BadgeStatus/Badge.js +54 -0
  5. package/es/BadgeStatus/color.js +21 -0
  6. package/es/BadgeStatus/index.js +3 -0
  7. package/es/CardSelect/CardSelect.js +123 -0
  8. package/es/CardSelect/index.js +2 -0
  9. package/es/CheckButton/CheckButton.js +121 -0
  10. package/es/CheckButton/index.js +2 -0
  11. package/es/ConfigProvider/context.js +12 -0
  12. package/es/ConfigProvider/index.js +31 -0
  13. package/es/Echarts/Echarts.js +47 -0
  14. package/es/Echarts/index.js +2 -0
  15. package/es/Ellipsis/Ellipsis.js +189 -0
  16. package/es/Ellipsis/index.js +2 -0
  17. package/es/Empty/Empty.js +56 -0
  18. package/es/Empty/image.js +2 -0
  19. package/es/Empty/index.js +2 -0
  20. package/es/FullPage/FullPage.js +31 -0
  21. package/es/FullPage/index.js +2 -0
  22. package/es/Icon/icon.js +42 -0
  23. package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
  24. package/es/MonacoEditor/Monaco.js +238 -0
  25. package/es/MonacoEditor/index.js +2 -0
  26. package/es/PermissionButton/index.js +117 -0
  27. package/es/ProLayout/Basic/BasicLayout.js +259 -0
  28. package/es/ProLayout/Basic/Header.js +97 -0
  29. package/es/ProLayout/PageContainer/index.js +324 -0
  30. package/es/ProLayout/PageContainer/typings.js +1 -0
  31. package/es/ProLayout/RouteContext.js +22 -0
  32. package/es/ProLayout/SiderMenu/BaseMenu.js +285 -0
  33. package/es/ProLayout/SiderMenu/SiderMenu.js +278 -0
  34. package/es/ProLayout/SiderMenu/index.js +2 -0
  35. package/es/ProLayout/SiderMenu/typings.js +1 -0
  36. package/es/ProLayout/TopHeader/index.js +163 -0
  37. package/es/ProLayout/defaultSettings.js +66 -0
  38. package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
  39. package/{src → es}/ProLayout/style/default.less +4 -4
  40. package/es/ProLayout/style/index.js +1 -0
  41. package/es/ProLayout/typings.js +1 -0
  42. package/es/ProLayout/util.js +61 -0
  43. package/es/ProTable/index.js +411 -0
  44. package/es/ProTable/proTableTypes.js +11 -0
  45. package/es/ProTable/style/index.css +65 -0
  46. package/es/ProTable/style/index.js +1 -0
  47. package/es/Scrollbar/Bar.js +114 -0
  48. package/es/Scrollbar/Scrollbar.js +212 -0
  49. package/es/Scrollbar/Thumb.js +189 -0
  50. package/es/Scrollbar/constants.js +1 -0
  51. package/es/Scrollbar/index.js +2 -0
  52. package/es/Scrollbar/scrollbarProps.js +100 -0
  53. package/es/Scrollbar/thumbProps.js +10 -0
  54. package/es/Scrollbar/util.js +30 -0
  55. package/es/Search/Advanced/History.js +183 -0
  56. package/es/Search/Advanced/SaveHistory.js +153 -0
  57. package/es/Search/Advanced/index.js +520 -0
  58. package/es/Search/Item.js +497 -0
  59. package/es/Search/Search.js +249 -0
  60. package/es/Search/hooks/index.js +1 -0
  61. package/es/Search/hooks/useSearchItems.js +40 -0
  62. package/es/Search/index.js +4 -0
  63. package/es/Search/setting.js +91 -0
  64. package/es/Search/style/Item.less +33 -0
  65. package/es/Search/style/Search.less +179 -0
  66. package/es/Search/style/index.js +2 -0
  67. package/es/Search/typing.js +1 -0
  68. package/es/Search/util.js +234 -0
  69. package/es/ValueItem/ValueItem.js +233 -0
  70. package/es/ValueItem/index.js +2 -0
  71. package/es/ValueItem/util.js +16 -0
  72. package/es/index.js +24 -0
  73. package/es/style/index.js +3 -0
  74. package/es/style/variable.css +0 -0
  75. package/{src → es}/style/variable.less +0 -2
  76. package/es/style.js +3 -0
  77. package/lib/AMap/Map.js +124 -0
  78. package/lib/AMap/index.js +9 -0
  79. package/lib/AMap/util.js +62 -0
  80. package/lib/BadgeStatus/Badge.js +54 -0
  81. package/lib/BadgeStatus/color.js +27 -0
  82. package/lib/BadgeStatus/index.js +22 -0
  83. package/lib/CardSelect/CardSelect.js +123 -0
  84. package/lib/CardSelect/index.js +9 -0
  85. package/lib/CheckButton/CheckButton.js +121 -0
  86. package/lib/CheckButton/index.js +9 -0
  87. package/lib/ConfigProvider/context.js +19 -0
  88. package/lib/ConfigProvider/index.js +37 -0
  89. package/lib/Echarts/Echarts.js +47 -0
  90. package/lib/Echarts/index.js +9 -0
  91. package/lib/Ellipsis/Ellipsis.js +189 -0
  92. package/lib/Ellipsis/index.js +9 -0
  93. package/lib/Empty/Empty.js +56 -0
  94. package/lib/Empty/image.js +8 -0
  95. package/lib/Empty/index.js +9 -0
  96. package/lib/FullPage/FullPage.js +31 -0
  97. package/lib/FullPage/index.js +9 -0
  98. package/lib/Icon/icon.js +52 -0
  99. package/lib/Icon/index.js +9 -0
  100. package/lib/MonacoEditor/Monaco.js +238 -0
  101. package/lib/MonacoEditor/index.js +9 -0
  102. package/lib/PermissionButton/index.js +124 -0
  103. package/lib/ProLayout/Basic/BasicLayout.js +268 -0
  104. package/lib/ProLayout/Basic/BasicLayout.less +66 -0
  105. package/lib/ProLayout/Basic/Header.js +103 -0
  106. package/lib/ProLayout/Basic/Header.less +8 -0
  107. package/lib/ProLayout/PageContainer/index.js +327 -0
  108. package/lib/ProLayout/PageContainer/index.less +103 -0
  109. package/lib/ProLayout/PageContainer/typings.js +5 -0
  110. package/lib/ProLayout/RouteContext.js +28 -0
  111. package/lib/ProLayout/SiderMenu/BaseMenu.js +290 -0
  112. package/lib/ProLayout/SiderMenu/SiderMenu.js +287 -0
  113. package/lib/ProLayout/SiderMenu/index.js +20 -0
  114. package/lib/ProLayout/SiderMenu/index.less +212 -0
  115. package/lib/ProLayout/SiderMenu/typings.js +5 -0
  116. package/lib/ProLayout/TopHeader/index.js +168 -0
  117. package/lib/ProLayout/TopHeader/index.less +174 -0
  118. package/lib/ProLayout/defaultSettings.js +72 -0
  119. package/lib/ProLayout/index.js +16 -0
  120. package/lib/ProLayout/style/default.less +4 -0
  121. package/lib/ProLayout/style/index.js +3 -0
  122. package/lib/ProLayout/style/style.less +7 -0
  123. package/lib/ProLayout/typings.js +5 -0
  124. package/lib/ProLayout/util.js +72 -0
  125. package/lib/ProTable/index.js +417 -0
  126. package/lib/ProTable/proTableTypes.js +17 -0
  127. package/lib/ProTable/style/index.css +65 -0
  128. package/lib/ProTable/style/index.js +3 -0
  129. package/lib/ProTable/style/index.less +92 -0
  130. package/lib/Scrollbar/Bar.js +114 -0
  131. package/lib/Scrollbar/Scrollbar.js +212 -0
  132. package/lib/Scrollbar/Thumb.js +189 -0
  133. package/lib/Scrollbar/constants.js +7 -0
  134. package/lib/Scrollbar/index.js +9 -0
  135. package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/scrollbarProps.js} +106 -108
  136. package/lib/Scrollbar/thumbProps.js +16 -0
  137. package/lib/Scrollbar/util.js +37 -0
  138. package/lib/Search/Advanced/History.js +183 -0
  139. package/lib/Search/Advanced/SaveHistory.js +153 -0
  140. package/lib/Search/Advanced/index.js +520 -0
  141. package/lib/Search/Item.js +497 -0
  142. package/lib/Search/Search.js +249 -0
  143. package/lib/Search/hooks/index.js +16 -0
  144. package/lib/Search/hooks/useSearchItems.js +47 -0
  145. package/lib/Search/index.js +16 -0
  146. package/lib/Search/setting.js +97 -0
  147. package/lib/Search/style/Item.less +33 -0
  148. package/lib/Search/style/Search.less +179 -0
  149. package/lib/Search/style/index.js +4 -0
  150. package/lib/Search/typing.js +5 -0
  151. package/lib/Search/util.js +241 -0
  152. package/lib/ValueItem/ValueItem.js +233 -0
  153. package/lib/ValueItem/index.js +9 -0
  154. package/lib/ValueItem/util.js +22 -0
  155. package/lib/index.js +158 -0
  156. package/lib/style/components.less +1 -0
  157. package/lib/style/index.js +4 -0
  158. package/lib/style/variable.css +0 -0
  159. package/lib/style/variable.less +2 -0
  160. package/lib/style.js +5 -0
  161. package/package.json +122 -13
  162. package/index.ts +0 -64
  163. package/src/AMap/Map.vue +0 -110
  164. package/src/AMap/index.ts +0 -1
  165. package/src/AMap/util.ts +0 -56
  166. package/src/BadgeStatus/Badge.vue +0 -41
  167. package/src/BadgeStatus/color.ts +0 -25
  168. package/src/BadgeStatus/index.ts +0 -4
  169. package/src/CardSelect/CardSelect.vue +0 -136
  170. package/src/CardSelect/index.ts +0 -3
  171. package/src/CheckButton/CheckButton.vue +0 -146
  172. package/src/CheckButton/index.md +0 -27
  173. package/src/CheckButton/index.ts +0 -3
  174. package/src/ConfigProvider/context.ts +0 -17
  175. package/src/ConfigProvider/index.tsx +0 -42
  176. package/src/Echarts/Echarts.vue +0 -43
  177. package/src/Echarts/index.ts +0 -3
  178. package/src/Ellipsis/Ellipsis.vue +0 -182
  179. package/src/Ellipsis/index.ts +0 -3
  180. package/src/Empty/Empty.vue +0 -43
  181. package/src/Empty/image.ts +0 -3
  182. package/src/Empty/index.ts +0 -2
  183. package/src/FullPage/FullPage.vue +0 -30
  184. package/src/FullPage/index.ts +0 -3
  185. package/src/Icon/icon.tsx +0 -40
  186. package/src/MonacoEditor/Monaco.vue +0 -242
  187. package/src/MonacoEditor/index.md +0 -26
  188. package/src/MonacoEditor/index.ts +0 -2
  189. package/src/PermissionButton/index.tsx +0 -110
  190. package/src/ProLayout/Basic/BasicLayout.tsx +0 -392
  191. package/src/ProLayout/Basic/Header.tsx +0 -115
  192. package/src/ProLayout/PageContainer/index.tsx +0 -441
  193. package/src/ProLayout/PageContainer/typings.ts +0 -56
  194. package/src/ProLayout/RouteContext.ts +0 -87
  195. package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
  196. package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
  197. package/src/ProLayout/SiderMenu/index.ts +0 -2
  198. package/src/ProLayout/SiderMenu/typings.ts +0 -49
  199. package/src/ProLayout/TopHeader/index.tsx +0 -210
  200. package/src/ProLayout/defaultSettings.ts +0 -106
  201. package/src/ProLayout/style/index.ts +0 -1
  202. package/src/ProLayout/typings.ts +0 -87
  203. package/src/ProLayout/util.ts +0 -64
  204. package/src/ProTable/index.md +0 -53
  205. package/src/ProTable/index.tsx +0 -551
  206. package/src/ProTable/proTableTypes.ts +0 -70
  207. package/src/ProTable/style/index.ts +0 -1
  208. package/src/Scrollbar/Bar.vue +0 -75
  209. package/src/Scrollbar/Scrollbar.vue +0 -260
  210. package/src/Scrollbar/Thumb.vue +0 -163
  211. package/src/Scrollbar/constants.ts +0 -10
  212. package/src/Scrollbar/index.ts +0 -4
  213. package/src/Scrollbar/thumb.ts +0 -16
  214. package/src/Scrollbar/util.ts +0 -38
  215. package/src/Search/Advanced/History.vue +0 -140
  216. package/src/Search/Advanced/SaveHistory.vue +0 -108
  217. package/src/Search/Advanced/index.vue +0 -435
  218. package/src/Search/Item.vue +0 -525
  219. package/src/Search/Search.vue +0 -398
  220. package/src/Search/hooks/index.ts +0 -1
  221. package/src/Search/hooks/useSearchItems.ts +0 -68
  222. package/src/Search/index.md +0 -57
  223. package/src/Search/index.ts +0 -5
  224. package/src/Search/setting.ts +0 -55
  225. package/src/Search/typing.ts +0 -76
  226. package/src/Search/util.ts +0 -263
  227. package/src/ValueItem/ValueItem.vue +0 -192
  228. package/src/ValueItem/index.ts +0 -3
  229. package/src/ValueItem/util.ts +0 -16
  230. package/src/style/index.ts +0 -3
  231. /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
  232. /package/{src → es}/ProLayout/Basic/Header.less +0 -0
  233. /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
  234. /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
  235. /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
  236. /package/{src → es}/ProLayout/style/style.less +0 -0
  237. /package/{src → es}/ProTable/style/index.less +0 -0
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.pageHeaderTabConfig = exports.pageContainerProps = exports.default = void 0;
8
+ var _vue = require("vue");
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
+ var _type = require("ant-design-vue/es/_util/type");
13
+ var _antDesignVue = require("ant-design-vue");
14
+ var _pageHeader = require("ant-design-vue/es/page-header");
15
+ var _RouteContext = require("../RouteContext");
16
+ var _util = require("../util");
17
+ require("./index.less");
18
+ var _excluded = ["title", "tabList", "tabActiveKey", "content", "pageHeaderRender", "header", "extraContent", "prefixedClassName", "prefixCls", "fixedHeader", "showBack"];
19
+ function _isSlot(s) {
20
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
21
+ }
22
+ var pageHeaderTabConfig = exports.pageHeaderTabConfig = {
23
+ /**
24
+ * @name tabs 的列表
25
+ */
26
+ tabList: {
27
+ type: [Object, Function, Array],
28
+ default: function _default() {
29
+ return undefined;
30
+ }
31
+ },
32
+ /**
33
+ * @name 当前选中 tab 的 key
34
+ */
35
+ tabActiveKey: String,
36
+ /**
37
+ * @name tab 上多余的区域
38
+ */
39
+ tabBarExtraContent: {
40
+ type: [Object, Function],
41
+ default: function _default() {
42
+ return undefined;
43
+ }
44
+ },
45
+ /**
46
+ * @name tabs 的其他配置
47
+ */
48
+ tabProps: {
49
+ type: Object,
50
+ default: function _default() {
51
+ return undefined;
52
+ }
53
+ },
54
+ /**
55
+ * @name 固定 PageHeader 到页面顶部
56
+ */
57
+ fixedHeader: Boolean,
58
+ // events
59
+ onTabChange: Function,
60
+ pure: Boolean
61
+ };
62
+ var pageContainerProps = exports.pageContainerProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, pageHeaderTabConfig), _pageHeader.pageHeaderProps), {}, {
63
+ prefixCls: {
64
+ type: String,
65
+ default: 'ant-pro'
66
+ },
67
+ title: {
68
+ type: [Object, String, Boolean, Function],
69
+ default: function _default() {
70
+ return null;
71
+ }
72
+ },
73
+ subTitle: {
74
+ type: [Object, String, Boolean, Function],
75
+ default: function _default() {
76
+ return null;
77
+ }
78
+ },
79
+ content: {
80
+ type: [Object, String, Boolean, Function],
81
+ default: function _default() {
82
+ return null;
83
+ }
84
+ },
85
+ extra: {
86
+ type: [Object, String, Boolean, Function],
87
+ default: function _default() {
88
+ return null;
89
+ }
90
+ },
91
+ extraContent: {
92
+ type: [Object, String, Boolean, Function],
93
+ default: function _default() {
94
+ return null;
95
+ }
96
+ },
97
+ header: {
98
+ type: [Object, String, Boolean, Function],
99
+ default: function _default() {
100
+ return null;
101
+ }
102
+ },
103
+ pageHeaderRender: {
104
+ type: [Object, Function, Boolean],
105
+ default: function _default() {
106
+ return undefined;
107
+ }
108
+ },
109
+ affixProps: {
110
+ type: [Object, Function]
111
+ },
112
+ ghost: {
113
+ type: Boolean,
114
+ default: function _default() {
115
+ return false;
116
+ }
117
+ },
118
+ loading: {
119
+ type: Boolean,
120
+ default: function _default() {
121
+ return undefined;
122
+ }
123
+ },
124
+ childrenFullHeight: {
125
+ type: Boolean,
126
+ default: function _default() {
127
+ return true;
128
+ }
129
+ },
130
+ pure: {
131
+ type: Boolean,
132
+ default: false
133
+ },
134
+ showBack: {
135
+ type: Boolean,
136
+ default: false
137
+ },
138
+ contentStyle: {
139
+ type: Object,
140
+ default: function _default() {
141
+ return {};
142
+ }
143
+ }
144
+ });
145
+ var renderFooter = function renderFooter(props) {
146
+ var tabList = props.tabList,
147
+ tabActiveKey = props.tabActiveKey,
148
+ onTabChange = props.onTabChange,
149
+ tabBarExtraContent = props.tabBarExtraContent,
150
+ tabProps = props.tabProps;
151
+ var tabPane = function tabPane(item) {
152
+ return (0, _vue.createVNode)("span", {
153
+ "class": item.class || "tab-pane-".concat(item.key)
154
+ }, [item.tab]);
155
+ };
156
+ if (tabList && tabList.length) {
157
+ var _slot;
158
+ return (0, _vue.createVNode)(_antDesignVue.Tabs, (0, _objectSpread2.default)({
159
+ "class": "page-container-tabs",
160
+ "activeKey": tabActiveKey,
161
+ "onChange": function onChange(key) {
162
+ if (onTabChange) {
163
+ onTabChange(key);
164
+ }
165
+ },
166
+ "tabBarExtraContent": tabBarExtraContent
167
+ }, tabProps), _isSlot(_slot = tabList.map(function (item) {
168
+ return (0, _vue.createVNode)(_antDesignVue.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
169
+ "tab": tabPane(item),
170
+ "key": item.key
171
+ }), null);
172
+ })) ? _slot : {
173
+ default: function _default() {
174
+ return [_slot];
175
+ }
176
+ });
177
+ }
178
+ return null;
179
+ };
180
+ var renderPageHeader = function renderPageHeader(content, extraContent, prefixedClassName) {
181
+ if (!content && !extraContent) {
182
+ return null;
183
+ }
184
+ return (0, _vue.createVNode)("div", {
185
+ "class": "".concat(prefixedClassName, "-detail")
186
+ }, [(0, _vue.createVNode)("div", {
187
+ "class": "".concat(prefixedClassName, "-main")
188
+ }, [(0, _vue.createVNode)("div", {
189
+ "class": "".concat(prefixedClassName, "-row")
190
+ }, [content && (0, _vue.createVNode)("div", {
191
+ "class": "".concat(prefixedClassName, "-content")
192
+ }, [
193
+ // @ts-ignore
194
+ typeof content === 'function' && content() || content]), extraContent && (0, _vue.createVNode)("div", {
195
+ "class": "".concat(prefixedClassName, "-extraContent")
196
+ }, [
197
+ // @ts-ignore
198
+ typeof extraContent === 'function' && extraContent() || extraContent])])])]);
199
+ };
200
+ var ProPageHeader = function ProPageHeader(props) {
201
+ var title = props.title,
202
+ tabList = props.tabList,
203
+ tabActiveKey = props.tabActiveKey,
204
+ content = props.content,
205
+ pageHeaderRender = props.pageHeaderRender,
206
+ header = props.header,
207
+ extraContent = props.extraContent,
208
+ prefixedClassName = props.prefixedClassName,
209
+ prefixCls = props.prefixCls,
210
+ _ = props.fixedHeader,
211
+ showBack = props.showBack,
212
+ restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
213
+ var value = (0, _RouteContext.useRouteContext)();
214
+ if (pageHeaderRender === false) {
215
+ return null;
216
+ }
217
+ if (pageHeaderRender) {
218
+ return pageHeaderRender((0, _objectSpread2.default)({}, props));
219
+ }
220
+ var pageHeaderTitle = title;
221
+ if (!title && title !== false) {
222
+ pageHeaderTitle = value.title;
223
+ }
224
+ var unrefBreadcrumb = (0, _vue.unref)(value.breadcrumb || {});
225
+ var breadcrumb = props.breadcrumb || (0, _objectSpread2.default)((0, _objectSpread2.default)({}, unrefBreadcrumb), {}, {
226
+ routes: unrefBreadcrumb.routes,
227
+ itemRender: unrefBreadcrumb.itemRender
228
+ });
229
+ var backProps = {};
230
+ if (showBack) {
231
+ // @ts-ignore
232
+ backProps.backIcon = (0, _vue.createVNode)(_antDesignVue.Button, null, {
233
+ default: function _default() {
234
+ return [(0, _vue.createTextVNode)("\u8FD4\u56DE")];
235
+ }
236
+ });
237
+ backProps.onBack = function () {
238
+ var _value$back;
239
+ (_value$back = value.back) === null || _value$back === void 0 ? void 0 : _value$back.call(value);
240
+ };
241
+ }
242
+ return (0, _vue.createVNode)("div", {
243
+ "class": "".concat(prefixedClassName, "-wrap")
244
+ }, [(0, _vue.createVNode)(_antDesignVue.PageHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, backProps), restProps), {}, {
245
+ "title": pageHeaderTitle,
246
+ "breadcrumb": breadcrumb,
247
+ "footer": renderFooter((0, _objectSpread2.default)((0, _objectSpread2.default)({}, restProps), {}, {
248
+ tabList: tabList,
249
+ tabActiveKey: tabActiveKey
250
+ })),
251
+ "prefixCls": prefixCls
252
+ }), {
253
+ default: function _default() {
254
+ return [header || renderPageHeader(content, extraContent, prefixedClassName)];
255
+ }
256
+ })]);
257
+ };
258
+ var PageContainer = (0, _vue.defineComponent)({
259
+ name: 'JPageContainer',
260
+ inheritAttrs: false,
261
+ props: pageContainerProps,
262
+ setup: function setup(props, _ref) {
263
+ var slots = _ref.slots,
264
+ attrs = _ref.attrs;
265
+ var _toRefs = (0, _vue.toRefs)(props),
266
+ loading = _toRefs.loading,
267
+ affixProps = _toRefs.affixProps,
268
+ ghost = _toRefs.ghost,
269
+ childrenFullHeight = _toRefs.childrenFullHeight;
270
+ var value = (0, _RouteContext.useRouteContext)();
271
+ var getPrefixCls = value.getPrefixCls;
272
+ var prefixCls = props.prefixCls || getPrefixCls();
273
+ var prefixedClassName = (0, _vue.computed)(function () {
274
+ return "".concat(prefixCls, "-page-container");
275
+ });
276
+ var classNames = (0, _vue.computed)(function () {
277
+ return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixedClassName.value, true), "".concat(prefixCls, "-page-container-ghost"), ghost.value);
278
+ });
279
+ var headerDom = (0, _vue.computed)(function () {
280
+ // const tags = getSlotVNode<DefaultPropRender>(slots, props, 'tags');
281
+ var headerContent = (0, _util.getSlotVNode)(slots, props, 'content');
282
+ var extra = (0, _util.getSlotVNode)(slots, props, 'extra');
283
+ var extraContent = (0, _util.getSlotVNode)(slots, props, 'extraContent');
284
+ var subTitle = (0, _util.getSlotVNode)(slots, props, 'subTitle');
285
+ var title = (0, _util.getSlotVNode)(slots, props, 'title');
286
+ // @ts-ignore
287
+ return (0, _vue.createVNode)(ProPageHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
288
+ "prefixCls": undefined,
289
+ "prefixedClassName": prefixedClassName.value,
290
+ "ghost": ghost.value,
291
+ "title": title,
292
+ "subTitle": subTitle,
293
+ "content": headerContent,
294
+ "extra": extra,
295
+ "extraContent": extraContent
296
+ }), null);
297
+ });
298
+ return function () {
299
+ var _slots$default;
300
+ var fixedHeader = props.fixedHeader,
301
+ pure = props.pure;
302
+ return (0, _vue.createVNode)(_vue.Fragment, null, [pure ? (0, _vue.createVNode)("div", {
303
+ "class": classNames.value
304
+ }, [(_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]) : (0, _vue.createVNode)("div", {
305
+ "class": classNames.value,
306
+ "style": (0, _objectSpread2.default)({}, attrs.style || {})
307
+ }, [fixedHeader && headerDom.value ? (0, _vue.createVNode)(_antDesignVue.Affix, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, affixProps.value), {}, {
308
+ "offsetTop": value.hasHeader && value.fixedHeader ? value.headerHeight : 0
309
+ }), {
310
+ default: function _default() {
311
+ return [headerDom.value];
312
+ }
313
+ }) : headerDom.value, (0, _vue.createVNode)("div", {
314
+ "class": "".concat(prefixedClassName.value, "-grid-content")
315
+ }, [loading.value ? (0, _vue.createVNode)(_antDesignVue.Spin, null, null) : slots.default ? (0, _vue.createVNode)("div", null, [(0, _vue.createVNode)("div", {
316
+ "class": "".concat(prefixedClassName.value, "-children-content ").concat(childrenFullHeight.value ? 'children-full-height' : ''),
317
+ "style": (0, _objectSpread2.default)({}, props.contentStyle || {})
318
+ }, [slots.default()]), value.hasFooterToolbar && (0, _vue.createVNode)("div", {
319
+ "style": {
320
+ height: 48,
321
+ marginTop: 24
322
+ }
323
+ }, null)]) : null])])]);
324
+ };
325
+ }
326
+ });
327
+ var _default2 = exports.default = (0, _type.withInstall)(PageContainer);
@@ -0,0 +1,103 @@
1
+ @import '../style/default.less';
2
+
3
+ @pro-layout-page-container: ~'@{ant-prefix}-pro-page-container';
4
+
5
+ .@{pro-layout-page-container}-children-content {
6
+ margin: 24px 24px 0;
7
+ }
8
+
9
+ .@{pro-layout-page-container} {
10
+ &-warp {
11
+ background-color: @component-background;
12
+ .@{ant-prefix}-tabs-bar {
13
+ margin: 0;
14
+ }
15
+ }
16
+ &-ghost {
17
+ .@{pro-layout-page-container}-warp {
18
+ background-color: @component-background;
19
+ }
20
+ }
21
+ }
22
+
23
+ .@{pro-layout-page-container}-main {
24
+ .@{pro-layout-page-container}-detail {
25
+ display: flex;
26
+ }
27
+
28
+ .@{pro-layout-page-container}-row {
29
+ display: flex;
30
+ width: 100%;
31
+ }
32
+
33
+ .@{pro-layout-page-container}-title-content {
34
+ margin-bottom: 16px;
35
+ }
36
+
37
+ .@{pro-layout-page-container}-title,
38
+ .@{pro-layout-page-container}-content {
39
+ flex: auto;
40
+ }
41
+
42
+ .@{pro-layout-page-container}-extraContent,
43
+ .@{pro-layout-page-container}-main {
44
+ flex: 0 1 auto;
45
+ }
46
+
47
+ .@{pro-layout-page-container}-main {
48
+ width: 100%;
49
+ }
50
+
51
+ .@{pro-layout-page-container}-title {
52
+ margin-bottom: 16px;
53
+ }
54
+
55
+ .@{pro-layout-page-container}-logo {
56
+ margin-bottom: 16px;
57
+ }
58
+
59
+ .@{pro-layout-page-container}-extraContent {
60
+ min-width: 242px;
61
+ margin-left: 88px;
62
+ text-align: right;
63
+ }
64
+ }
65
+
66
+ @media screen and (max-width: @screen-xl) {
67
+ .@{pro-layout-page-container}-main {
68
+ .@{pro-layout-page-container}-extraContent {
69
+ margin-left: 44px;
70
+ }
71
+ }
72
+ }
73
+
74
+ @media screen and (max-width: @screen-lg) {
75
+ .@{pro-layout-page-container}-main {
76
+ .@{pro-layout-page-container}-extraContent {
77
+ margin-left: 20px;
78
+ }
79
+ }
80
+ }
81
+
82
+ @media screen and (max-width: @screen-md) {
83
+ .@{pro-layout-page-container}-main {
84
+ .@{pro-layout-page-container}-row {
85
+ display: block;
86
+ }
87
+
88
+ .@{pro-layout-page-container}-action,
89
+ .@{pro-layout-page-container}-extraContent {
90
+ margin-left: 0;
91
+ text-align: left;
92
+ }
93
+ }
94
+ }
95
+
96
+ @media screen and (max-width: @screen-sm) {
97
+ .@{pro-layout-page-container}-detail {
98
+ display: block;
99
+ }
100
+ .@{pro-layout-page-container}-extraContent {
101
+ margin-left: 0;
102
+ }
103
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useRouteContext = exports.routeContextInjectKey = exports.provideRouteContext = exports.getPrefixCls = exports.defaultRouteContext = exports.defaultPrefixCls = void 0;
7
+ var _vue = require("vue");
8
+ var _hooks = require("@jetlinks-web/hooks");
9
+ var defaultPrefixCls = exports.defaultPrefixCls = 'ant-pro';
10
+ var getPrefixCls = exports.getPrefixCls = function getPrefixCls(suffixCls, customizePrefixCls) {
11
+ if (customizePrefixCls) return customizePrefixCls;
12
+ return suffixCls ? "".concat(defaultPrefixCls, "-").concat(suffixCls) : defaultPrefixCls;
13
+ };
14
+ var defaultRouteContext = exports.defaultRouteContext = (0, _vue.reactive)({
15
+ getPrefixCls: getPrefixCls,
16
+ locale: function locale(t) {
17
+ return t;
18
+ },
19
+ contentWidth: 'Fluid',
20
+ hasFooterToolbar: false
21
+ });
22
+ var routeContextInjectKey = exports.routeContextInjectKey = Symbol('jetlinks-route-context');
23
+ var provideRouteContext = exports.provideRouteContext = function provideRouteContext(value) {
24
+ (0, _vue.provide)(routeContextInjectKey, value);
25
+ };
26
+ var useRouteContext = exports.useRouteContext = function useRouteContext() {
27
+ return (0, _hooks.useContext)(routeContextInjectKey, defaultRouteContext);
28
+ };