@meethive/components 0.0.3 → 0.0.5

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 (111) hide show
  1. package/es/AutoComplete/AutoComplete.js +71 -80
  2. package/es/BadgeStatus/Badge.js +38 -47
  3. package/es/CardSelect/CardSelect.js +115 -137
  4. package/es/CheckButton/CheckButton.js +102 -118
  5. package/es/ConfigProvider/ConfigProvider.js +44 -68
  6. package/es/DragModal/DragModal.js +191 -212
  7. package/es/EditTable/Body.js +158 -189
  8. package/es/EditTable/CellRender.js +10 -12
  9. package/es/EditTable/EditTable.js +385 -434
  10. package/es/EditTable/FormItem.js +140 -169
  11. package/es/EditTable/Group.js +171 -204
  12. package/es/EditTable/Header.js +57 -63
  13. package/es/EditTable/HeaderRender.js +10 -12
  14. package/es/EditTable/components/ContextMenu/Menu.js +78 -86
  15. package/es/EditTable/components/Search/Search.js +151 -163
  16. package/es/EditTable/components/Search/Sort.js +104 -119
  17. package/es/Ellipsis/Ellipsis.js +144 -148
  18. package/es/Empty/Empty.js +51 -57
  19. package/es/FullPage/FullPage.js +20 -19
  20. package/es/Icon/Icon.js +42 -49
  21. package/es/LocaleProvider/LocaleProvider.js +32 -38
  22. package/es/Markdown/Markdown.js +101 -118
  23. package/es/PermissionButton/PermissionButton.js +118 -118
  24. package/es/ProLayout/Basic/BasicLayout.js +361 -418
  25. package/es/ProLayout/Basic/Header.js +97 -111
  26. package/es/ProLayout/PageContainer/index.js +298 -344
  27. package/es/ProLayout/SiderMenu/BaseMenu.js +233 -240
  28. package/es/ProTable/Alert.js +39 -40
  29. package/es/ProTable/Content.js +84 -97
  30. package/es/ProTable/Header.js +32 -33
  31. package/es/ProTable/Pagination.js +56 -55
  32. package/es/ProTable/ProTable.js +256 -276
  33. package/es/RadioButton/RadioButton.js +48 -53
  34. package/es/Scrollbar/Bar.js +65 -76
  35. package/es/Scrollbar/Scrollbar.js +129 -161
  36. package/es/Scrollbar/Thumb.js +101 -150
  37. package/es/Search/Item.js +208 -236
  38. package/es/Search/Search.js +90 -90
  39. package/es/Skeleton/Skeleton.js +26 -27
  40. package/es/Skeleton/components/DashBoardCard.js +26 -27
  41. package/es/Skeleton/components/DashBoardChart.js +26 -27
  42. package/es/Skeleton/components/Detail.js +26 -27
  43. package/es/Skeleton/components/Drawer.js +26 -27
  44. package/es/Skeleton/components/Item.js +55 -54
  45. package/es/Skeleton/components/List.js +29 -27
  46. package/es/Skeleton/components/ListCard.js +28 -28
  47. package/es/Skeleton/components/ListCardItem.js +20 -20
  48. package/es/Skeleton/components/ListTable.js +26 -27
  49. package/es/Skeleton/components/Page.js +27 -26
  50. package/es/Skeleton/components/Search.js +16 -16
  51. package/es/Skeleton/components/Tree.js +26 -27
  52. package/es/TimeFormat/TimeFormat.js +32 -36
  53. package/es/Title/Title.js +23 -26
  54. package/es/ValueItem/ValueItem.js +100 -113
  55. package/es/VirtualTable/VirtualTable.js +235 -271
  56. package/lib/AutoComplete/AutoComplete.js +71 -80
  57. package/lib/BadgeStatus/Badge.js +38 -47
  58. package/lib/CardSelect/CardSelect.js +115 -137
  59. package/lib/CheckButton/CheckButton.js +102 -118
  60. package/lib/ConfigProvider/ConfigProvider.js +44 -68
  61. package/lib/DragModal/DragModal.js +191 -212
  62. package/lib/EditTable/Body.js +158 -189
  63. package/lib/EditTable/CellRender.js +10 -12
  64. package/lib/EditTable/EditTable.js +385 -434
  65. package/lib/EditTable/FormItem.js +140 -169
  66. package/lib/EditTable/Group.js +171 -204
  67. package/lib/EditTable/Header.js +57 -63
  68. package/lib/EditTable/HeaderRender.js +10 -12
  69. package/lib/EditTable/components/ContextMenu/Menu.js +78 -86
  70. package/lib/EditTable/components/Search/Search.js +151 -163
  71. package/lib/EditTable/components/Search/Sort.js +104 -119
  72. package/lib/Ellipsis/Ellipsis.js +144 -148
  73. package/lib/Empty/Empty.js +51 -57
  74. package/lib/FullPage/FullPage.js +20 -19
  75. package/lib/Icon/Icon.js +42 -49
  76. package/lib/LocaleProvider/LocaleProvider.js +32 -38
  77. package/lib/Markdown/Markdown.js +101 -118
  78. package/lib/PermissionButton/PermissionButton.js +118 -118
  79. package/lib/ProLayout/Basic/BasicLayout.js +361 -418
  80. package/lib/ProLayout/Basic/Header.js +97 -111
  81. package/lib/ProLayout/PageContainer/index.js +298 -344
  82. package/lib/ProLayout/SiderMenu/BaseMenu.js +233 -240
  83. package/lib/ProTable/Alert.js +39 -40
  84. package/lib/ProTable/Content.js +84 -97
  85. package/lib/ProTable/Header.js +32 -33
  86. package/lib/ProTable/Pagination.js +56 -55
  87. package/lib/ProTable/ProTable.js +256 -276
  88. package/lib/RadioButton/RadioButton.js +48 -53
  89. package/lib/Scrollbar/Bar.js +65 -76
  90. package/lib/Scrollbar/Scrollbar.js +129 -161
  91. package/lib/Scrollbar/Thumb.js +101 -150
  92. package/lib/Search/Item.js +208 -236
  93. package/lib/Search/Search.js +90 -90
  94. package/lib/Skeleton/Skeleton.js +26 -27
  95. package/lib/Skeleton/components/DashBoardCard.js +26 -27
  96. package/lib/Skeleton/components/DashBoardChart.js +26 -27
  97. package/lib/Skeleton/components/Detail.js +26 -27
  98. package/lib/Skeleton/components/Drawer.js +26 -27
  99. package/lib/Skeleton/components/Item.js +55 -54
  100. package/lib/Skeleton/components/List.js +29 -27
  101. package/lib/Skeleton/components/ListCard.js +28 -28
  102. package/lib/Skeleton/components/ListCardItem.js +20 -20
  103. package/lib/Skeleton/components/ListTable.js +26 -27
  104. package/lib/Skeleton/components/Page.js +27 -26
  105. package/lib/Skeleton/components/Search.js +16 -16
  106. package/lib/Skeleton/components/Tree.js +26 -27
  107. package/lib/TimeFormat/TimeFormat.js +32 -36
  108. package/lib/Title/Title.js +23 -26
  109. package/lib/ValueItem/ValueItem.js +100 -113
  110. package/lib/VirtualTable/VirtualTable.js +235 -271
  111. package/package.json +1 -1
@@ -1,354 +1,308 @@
1
- function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
- import { defineComponent, computed, toRefs, unref } from 'vue'
3
- import { withInstall } from 'ant-design-vue/es/_util/type'
4
- import { Affix, Spin, PageHeader, Tabs, Button } from 'ant-design-vue'
5
- import { pageHeaderProps } from 'ant-design-vue/es/page-header'
6
- import { useRouteContext } from '../RouteContext'
7
- import { getSlotVNode } from '../util'
8
- import { LayoutType } from '../defaultSettings'
9
- import { useLocaleReceiver } from '../../LocaleReciver'
10
- import useProLayoutStyle from '../style'
11
-
12
- export const pageHeaderTabConfig = {
1
+ import { defineComponent, computed, toRefs, unref, createVNode as _createVNode, mergeProps as _mergeProps, isVNode as _isVNode, Fragment as _Fragment } from 'vue';
2
+ import { withInstall } from 'ant-design-vue/es/_util/type';
3
+ import { Affix, Spin, PageHeader, Tabs, Button } from 'ant-design-vue';
4
+ import { pageHeaderProps } from 'ant-design-vue/es/page-header';
5
+ import { useRouteContext } from '../RouteContext';
6
+ import { getSlotVNode } from '../util';
7
+ import { LayoutType } from '../defaultSettings';
8
+ import { useLocaleReceiver } from '../../LocaleReciver';
9
+ import useProLayoutStyle from '../style';
10
+ function _isSlot(s) {
11
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
12
+ }
13
+ export const pageHeaderTabConfig = {
13
14
  /**
14
15
  * @name tabs 的列表
15
- */
16
- tabList: {
17
- type: [Object, Function, Array],
18
- default: () => undefined
19
- },
16
+ */
17
+ tabList: {
18
+ type: [Object, Function, Array],
19
+ default: () => undefined
20
+ },
20
21
  /**
21
22
  * @name 当前选中 tab 的 key
22
- */
23
- tabActiveKey: String,
23
+ */
24
+ tabActiveKey: String,
24
25
  /**
25
26
  * @name tab 上多余的区域
26
- */
27
- tabBarExtraContent: {
28
- type: [Object, Function],
29
- default: () => undefined
30
- },
27
+ */
28
+ tabBarExtraContent: {
29
+ type: [Object, Function],
30
+ default: () => undefined
31
+ },
31
32
  /**
32
33
  * @name tabs 的其他配置
33
- */
34
- tabProps: {
35
- type: Object,
36
- default: () => undefined
37
- },
34
+ */
35
+ tabProps: {
36
+ type: Object,
37
+ default: () => undefined
38
+ },
38
39
  /**
39
40
  * @name 固定 PageHeader 到页面顶部
40
- */
41
- fixedHeader: Boolean,
42
- // events
43
- onTabChange: Function,
44
- pure: Boolean
45
- }
46
-
47
- export const pageContainerProps = {
48
- ...pageHeaderTabConfig,
49
- ...pageHeaderProps,
50
- prefixCls: {
51
- type: String,
52
- default: 'ant-pro'
53
- },
54
- title: {
55
- type: [Object, String, Boolean, Function],
56
- default: () => null
57
- },
58
- subTitle: {
59
- type: [Object, String, Boolean, Function],
60
- default: () => null
61
- },
62
- content: {
63
- type: [Object, String, Boolean, Function],
64
- default: () => null
65
- },
66
- extra: {
67
- type: [Object, String, Boolean, Function],
68
- default: () => null
69
- },
70
- extraContent: {
71
- type: [Object, String, Boolean, Function],
72
- default: () => null
73
- },
74
- header: {
75
- type: [Object, String, Boolean, Function],
76
- default: () => null
77
- },
78
- pageHeaderRender: {
79
- type: [Object, Function, Boolean],
80
- default: () => undefined
81
- },
82
- affixProps: {
83
- type: [Object, Function]
84
- },
85
- ghost: {
86
- type: Boolean,
87
- default: () => false
88
- },
89
- loading: {
90
- type: Boolean,
91
- default: () => undefined
92
- },
93
- childrenFullHeight: {
94
- type: Boolean,
95
- default: () => true
96
- },
97
- pure: {
98
- type: Boolean,
99
- default: false
100
- },
101
- showBack: {
102
- type: Boolean,
103
- default: false
104
- },
105
- contentStyle: {
106
- type: Object,
107
- default: () => ({})
108
- },
109
- onBack: {
110
- type: Function
111
- }
112
- }
113
-
114
- const renderFooter = (props) => {
115
- const {
116
- tabList,
117
- tabActiveKey,
118
- onTabChange,
119
- tabBarExtraContent,
120
- tabProps
121
- } = props
122
-
123
- const tabPane = (item) => {
124
- return React.createElement('span', { class: item.class || `tab-pane-${item.key}`,}, item.tab)
125
- }
126
-
127
- if (tabList && tabList.length) {
128
- return (
129
- React.createElement(Tabs, {
130
- class: "page-container-tabs",
131
- activeKey: tabActiveKey,
132
- onChange: (key) => {
133
- if (onTabChange) {
134
- onTabChange(key)
135
- }
136
- },
137
- tabBarExtraContent: tabBarExtraContent,
138
- ...tabProps,}
139
-
140
- , tabList.map((item) => (
141
- React.createElement(Tabs.TabPane, {
142
- ...item,
143
- tab: tabPane(item),
144
- key: item.key,}
145
- )
146
- ))
147
- )
148
- )
149
- }
150
- return null
151
- }
152
-
153
- const renderPageHeader = (content, extraContent, prefixedClassName) => {
154
- if (!content && !extraContent) {
155
- return null
156
- }
157
- return (
158
- React.createElement('div', { class: `${prefixedClassName}-detail`,}
159
- , React.createElement('div', { class: `${prefixedClassName}-main`,}
160
- , React.createElement('div', { class: `${prefixedClassName}-row`,}
161
- , content && (
162
- React.createElement('div', { class: `${prefixedClassName}-content`,}
163
- , typeof content === 'function' && content() || content
164
- )
165
- )
166
- , extraContent && (
167
- React.createElement('div', { class: `${prefixedClassName}-extraContent`,}
168
- , typeof extraContent === 'function' && extraContent() || extraContent
169
- )
170
- )
171
- )
172
- )
173
- )
174
- )
175
- }
176
-
177
- const ProPageHeader = (props) => {
178
- const {
179
- title,
180
- tabList,
181
- tabActiveKey,
182
- content,
183
- pageHeaderRender,
184
- header,
185
- extraContent,
186
- prefixedClassName,
187
- prefixCls,
188
- fixedHeader: _,
189
- showBack,
190
- onBack,
191
- ...restProps
192
- } = props
193
-
194
- const value = useRouteContext()
195
- const [contextLocale] = useLocaleReceiver('ProLayout')
196
-
197
- if (pageHeaderRender === false) {
198
- return null
199
- }
200
- if (pageHeaderRender) {
201
- return pageHeaderRender({ ...props })
202
- }
203
-
204
- let pageHeaderTitle = title
205
- if (!title && title !== false) {
206
- pageHeaderTitle = (value ).title
207
- }
208
-
209
- const unrefBreadcrumb = unref((value ).breadcrumb || {})
210
- const breadcrumb = props.breadcrumb || {
211
- ...unrefBreadcrumb,
212
- routes: unrefBreadcrumb.routes,
213
- itemRender: unrefBreadcrumb.itemRender
214
- }
215
-
216
- const backProps = {}
217
- if (showBack) {
218
- // @ts-ignore
219
- backProps.backIcon = React.createElement(Button, null, contextLocale.value.pageContainer.back)
220
- backProps.onBack = () => {
221
- if (props.onBack) {
222
- props.onBack()
223
- } else {
224
- _optionalChain([(value ), 'access', _2 => _2.back, 'optionalCall', _3 => _3()])
225
- }
226
- }
227
- }
228
-
229
- const styles = (value ).layoutType === LayoutType.CARD
230
- ? {
231
- padding: props.extra || props.subTitle || pageHeaderTitle || tabList || props.extraContent || props.showBack || props.title
232
- ? '16px 24px'
233
- : '0px'
234
- }
235
- : {}
236
-
237
- return (
238
- React.createElement('div', { class: `${prefixedClassName}-wrap`,}
239
- , React.createElement(PageHeader, {
240
- style: styles,
241
- ...backProps,
242
- ...restProps,
243
- title: pageHeaderTitle,
244
- breadcrumb: (value ).layoutType === LayoutType.LIST ? breadcrumb : null,
245
- footer: renderFooter({
246
- ...restProps,
247
- tabList,
248
- tabActiveKey
249
- }),
250
- prefixCls: prefixCls,}
251
-
252
- , header || renderPageHeader(content, extraContent, prefixedClassName)
253
- )
254
- )
255
- )
256
- }
257
-
258
- const PageContainer = defineComponent({
259
- name: 'JPageContainer',
260
- inheritAttrs: false,
261
- props: pageContainerProps ,
262
- setup(props, { slots, attrs }) {
263
- const {
264
- loading,
265
- affixProps,
266
- ghost,
267
- childrenFullHeight
268
- } = toRefs(props)
269
-
270
- const value = useRouteContext()
271
- const getPrefixCls = (value ).getPrefixCls
272
- const prefixCls = props.prefixCls || getPrefixCls()
273
-
274
- const stylePrefixCls = computed(() => 'pro-layout')
275
- const [wrapSSR, hashId] = useProLayoutStyle(stylePrefixCls)
276
-
277
- const prefixedClassName = computed(() => `${prefixCls}-page-container`)
278
-
279
- const classNames = computed(() => ({
280
- [hashId.value]: true,
281
- [prefixedClassName.value]: true,
282
- [`${prefixCls}-page-container-ghost`]: ghost.value
283
- }))
284
-
285
- const headerDom = computed(() => {
286
- // const tags = getSlotVNode<DefaultPropRender>(slots, props, 'tags');
287
- const headerContent = getSlotVNode(slots, props, 'content')
288
- const extra = getSlotVNode(slots, props, 'extra')
289
- const extraContent = getSlotVNode(slots, props, 'extraContent')
290
- const subTitle = getSlotVNode(slots, props, 'subTitle')
291
- const title = getSlotVNode(slots, props, 'title')
292
- // @ts-ignore
293
- return (
294
- React.createElement(ProPageHeader, {
295
- ...props,
296
- prefixCls: undefined,
297
- prefixedClassName: prefixedClassName.value,
298
- ghost: ghost.value,
299
- title: title,
300
- subTitle: subTitle,
301
- content: headerContent,
302
- extra: extra,
303
- extraContent: extraContent,}
304
- )
305
- )
306
- })
307
-
308
- return () => {
309
- const { fixedHeader, pure } = props
310
-
311
- return (
312
- React.createElement(React.Fragment, null
313
- , pure ? (
314
- React.createElement('div', { class: classNames.value,}
315
- , _optionalChain([slots, 'access', _4 => _4.default, 'optionalCall', _5 => _5()])
316
- )
317
- ) : (
318
- React.createElement('div', { class: classNames.value, style: { ...(attrs.style || {}) },}
319
- , fixedHeader && headerDom.value ? (
320
- React.createElement(Affix, {
321
- ...affixProps.value,
322
- offsetTop: (value ).hasHeader && (value ).fixedHeader ? (value ).headerHeight : 0,}
323
-
324
- , headerDom.value
325
- )
326
- ) : (
327
- headerDom.value
328
- )
329
- , React.createElement('div', { class: `${prefixedClassName.value}-grid-content`,}
330
- , loading.value ? (
331
- React.createElement(Spin, null )
332
- ) : slots.default ? (
333
- React.createElement('div', null
334
- , React.createElement('div', {
335
- class: `${prefixedClassName.value}-children-content ${childrenFullHeight.value ? 'children-full-height' : ''} ${hashId.value}`,
336
- style: { ...(props.contentStyle || {}) },}
337
-
338
- , slots.default()
339
- )
340
- , (value ).hasFooterToolbar && (
341
- React.createElement('div', { style: { height: 48, marginTop: 24 },} )
342
- )
343
- )
344
- ) : null
345
- )
346
- )
347
- )
348
- )
349
- )
350
- }
351
- }
352
- })
353
-
354
- export default withInstall(PageContainer)
41
+ */
42
+ fixedHeader: Boolean,
43
+ // events
44
+ onTabChange: Function,
45
+ pure: Boolean
46
+ };
47
+ export const pageContainerProps = {
48
+ ...pageHeaderTabConfig,
49
+ ...pageHeaderProps,
50
+ prefixCls: {
51
+ type: String,
52
+ default: 'ant-pro'
53
+ },
54
+ title: {
55
+ type: [Object, String, Boolean, Function],
56
+ default: () => null
57
+ },
58
+ subTitle: {
59
+ type: [Object, String, Boolean, Function],
60
+ default: () => null
61
+ },
62
+ content: {
63
+ type: [Object, String, Boolean, Function],
64
+ default: () => null
65
+ },
66
+ extra: {
67
+ type: [Object, String, Boolean, Function],
68
+ default: () => null
69
+ },
70
+ extraContent: {
71
+ type: [Object, String, Boolean, Function],
72
+ default: () => null
73
+ },
74
+ header: {
75
+ type: [Object, String, Boolean, Function],
76
+ default: () => null
77
+ },
78
+ pageHeaderRender: {
79
+ type: [Object, Function, Boolean],
80
+ default: () => undefined
81
+ },
82
+ affixProps: {
83
+ type: [Object, Function]
84
+ },
85
+ ghost: {
86
+ type: Boolean,
87
+ default: () => false
88
+ },
89
+ loading: {
90
+ type: Boolean,
91
+ default: () => undefined
92
+ },
93
+ childrenFullHeight: {
94
+ type: Boolean,
95
+ default: () => true
96
+ },
97
+ pure: {
98
+ type: Boolean,
99
+ default: false
100
+ },
101
+ showBack: {
102
+ type: Boolean,
103
+ default: false
104
+ },
105
+ contentStyle: {
106
+ type: Object,
107
+ default: () => ({})
108
+ },
109
+ onBack: {
110
+ type: Function
111
+ }
112
+ };
113
+ const renderFooter = props => {
114
+ const {
115
+ tabList,
116
+ tabActiveKey,
117
+ onTabChange,
118
+ tabBarExtraContent,
119
+ tabProps
120
+ } = props;
121
+ const tabPane = item => {
122
+ return _createVNode("span", {
123
+ "class": item.class || `tab-pane-${item.key}`
124
+ }, [item.tab]);
125
+ };
126
+ if (tabList && tabList.length) {
127
+ let _slot;
128
+ return _createVNode(Tabs, _mergeProps({
129
+ "class": "page-container-tabs",
130
+ "activeKey": tabActiveKey,
131
+ "onChange": key => {
132
+ if (onTabChange) {
133
+ onTabChange(key);
134
+ }
135
+ },
136
+ "tabBarExtraContent": tabBarExtraContent
137
+ }, tabProps), _isSlot(_slot = tabList.map(item => _createVNode(Tabs.TabPane, _mergeProps(item, {
138
+ "tab": tabPane(item),
139
+ "key": item.key
140
+ }), null))) ? _slot : {
141
+ default: () => [_slot]
142
+ });
143
+ }
144
+ return null;
145
+ };
146
+ const renderPageHeader = (content, extraContent, prefixedClassName) => {
147
+ if (!content && !extraContent) {
148
+ return null;
149
+ }
150
+ return _createVNode("div", {
151
+ "class": `${prefixedClassName}-detail`
152
+ }, [_createVNode("div", {
153
+ "class": `${prefixedClassName}-main`
154
+ }, [_createVNode("div", {
155
+ "class": `${prefixedClassName}-row`
156
+ }, [content && _createVNode("div", {
157
+ "class": `${prefixedClassName}-content`
158
+ }, [typeof content === 'function' && content() || content]), extraContent && _createVNode("div", {
159
+ "class": `${prefixedClassName}-extraContent`
160
+ }, [typeof extraContent === 'function' && extraContent() || extraContent])])])]);
161
+ };
162
+ const ProPageHeader = props => {
163
+ const {
164
+ title,
165
+ tabList,
166
+ tabActiveKey,
167
+ content,
168
+ pageHeaderRender,
169
+ header,
170
+ extraContent,
171
+ prefixedClassName,
172
+ prefixCls,
173
+ fixedHeader: _,
174
+ showBack,
175
+ onBack,
176
+ ...restProps
177
+ } = props;
178
+ const value = useRouteContext();
179
+ const [contextLocale] = useLocaleReceiver('ProLayout');
180
+ if (pageHeaderRender === false) {
181
+ return null;
182
+ }
183
+ if (pageHeaderRender) {
184
+ return pageHeaderRender({
185
+ ...props
186
+ });
187
+ }
188
+ let pageHeaderTitle = title;
189
+ if (!title && title !== false) {
190
+ pageHeaderTitle = value.title;
191
+ }
192
+ const unrefBreadcrumb = unref(value.breadcrumb || {});
193
+ const breadcrumb = props.breadcrumb || {
194
+ ...unrefBreadcrumb,
195
+ routes: unrefBreadcrumb.routes,
196
+ itemRender: unrefBreadcrumb.itemRender
197
+ };
198
+ const backProps = {};
199
+ if (showBack) {
200
+ // @ts-ignore
201
+ backProps.backIcon = _createVNode(Button, null, {
202
+ default: () => [contextLocale.value.pageContainer.back]
203
+ });
204
+ backProps.onBack = () => {
205
+ if (props.onBack) {
206
+ props.onBack();
207
+ } else {
208
+ value.back?.();
209
+ }
210
+ };
211
+ }
212
+ const styles = value.layoutType === LayoutType.CARD ? {
213
+ padding: props.extra || props.subTitle || pageHeaderTitle || tabList || props.extraContent || props.showBack || props.title ? '16px 24px' : '0px'
214
+ } : {};
215
+ return _createVNode("div", {
216
+ "class": `${prefixedClassName}-wrap`
217
+ }, [_createVNode(PageHeader, _mergeProps({
218
+ "style": styles
219
+ }, backProps, restProps, {
220
+ "title": pageHeaderTitle,
221
+ "breadcrumb": value.layoutType === LayoutType.LIST ? breadcrumb : null,
222
+ "footer": renderFooter({
223
+ ...restProps,
224
+ tabList,
225
+ tabActiveKey
226
+ }),
227
+ "prefixCls": prefixCls
228
+ }), {
229
+ default: () => [header || renderPageHeader(content, extraContent, prefixedClassName)]
230
+ })]);
231
+ };
232
+ const PageContainer = defineComponent({
233
+ name: 'JPageContainer',
234
+ inheritAttrs: false,
235
+ props: pageContainerProps,
236
+ setup(props, {
237
+ slots,
238
+ attrs
239
+ }) {
240
+ const {
241
+ loading,
242
+ affixProps,
243
+ ghost,
244
+ childrenFullHeight
245
+ } = toRefs(props);
246
+ const value = useRouteContext();
247
+ const getPrefixCls = value.getPrefixCls;
248
+ const prefixCls = props.prefixCls || getPrefixCls();
249
+ const stylePrefixCls = computed(() => 'pro-layout');
250
+ const [wrapSSR, hashId] = useProLayoutStyle(stylePrefixCls);
251
+ const prefixedClassName = computed(() => `${prefixCls}-page-container`);
252
+ const classNames = computed(() => ({
253
+ [hashId.value]: true,
254
+ [prefixedClassName.value]: true,
255
+ [`${prefixCls}-page-container-ghost`]: ghost.value
256
+ }));
257
+ const headerDom = computed(() => {
258
+ // const tags = getSlotVNode<DefaultPropRender>(slots, props, 'tags');
259
+ const headerContent = getSlotVNode(slots, props, 'content');
260
+ const extra = getSlotVNode(slots, props, 'extra');
261
+ const extraContent = getSlotVNode(slots, props, 'extraContent');
262
+ const subTitle = getSlotVNode(slots, props, 'subTitle');
263
+ const title = getSlotVNode(slots, props, 'title');
264
+ // @ts-ignore
265
+ return _createVNode(ProPageHeader, _mergeProps(props, {
266
+ "prefixCls": undefined,
267
+ "prefixedClassName": prefixedClassName.value,
268
+ "ghost": ghost.value,
269
+ "title": title,
270
+ "subTitle": subTitle,
271
+ "content": headerContent,
272
+ "extra": extra,
273
+ "extraContent": extraContent
274
+ }), null);
275
+ });
276
+ return () => {
277
+ const {
278
+ fixedHeader,
279
+ pure
280
+ } = props;
281
+ return _createVNode(_Fragment, null, [pure ? _createVNode("div", {
282
+ "class": classNames.value
283
+ }, [slots.default?.()]) : _createVNode("div", {
284
+ "class": classNames.value,
285
+ "style": {
286
+ ...(attrs.style || {})
287
+ }
288
+ }, [fixedHeader && headerDom.value ? _createVNode(Affix, _mergeProps(affixProps.value, {
289
+ "offsetTop": value.hasHeader && value.fixedHeader ? value.headerHeight : 0
290
+ }), {
291
+ default: () => [headerDom.value]
292
+ }) : headerDom.value, _createVNode("div", {
293
+ "class": `${prefixedClassName.value}-grid-content`
294
+ }, [loading.value ? _createVNode(Spin, null, null) : slots.default ? _createVNode("div", null, [_createVNode("div", {
295
+ "class": `${prefixedClassName.value}-children-content ${childrenFullHeight.value ? 'children-full-height' : ''} ${hashId.value}`,
296
+ "style": {
297
+ ...(props.contentStyle || {})
298
+ }
299
+ }, [slots.default()]), value.hasFooterToolbar && _createVNode("div", {
300
+ "style": {
301
+ height: 48,
302
+ marginTop: 24
303
+ }
304
+ }, null)]) : null])])]);
305
+ };
306
+ }
307
+ });
308
+ export default withInstall(PageContainer);