@meethive/components 0.0.2 → 0.0.4
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.
- package/es/AutoComplete/AutoComplete.js +71 -80
- package/es/BadgeStatus/Badge.js +38 -47
- package/es/CardSelect/CardSelect.js +115 -137
- package/es/CheckButton/CheckButton.js +102 -118
- package/es/ConfigProvider/ConfigProvider.js +44 -68
- package/es/DragModal/DragModal.js +191 -212
- package/es/EditTable/Body.js +158 -189
- package/es/EditTable/CellRender.js +10 -12
- package/es/EditTable/EditTable.js +385 -434
- package/es/EditTable/FormItem.js +140 -169
- package/es/EditTable/Group.js +171 -204
- package/es/EditTable/Header.js +57 -63
- package/es/EditTable/HeaderRender.js +10 -12
- package/es/EditTable/components/ContextMenu/Menu.js +78 -86
- package/es/EditTable/components/Search/Search.js +151 -163
- package/es/EditTable/components/Search/Sort.js +104 -119
- package/es/Ellipsis/Ellipsis.js +144 -148
- package/es/Empty/Empty.js +51 -57
- package/es/FullPage/FullPage.js +20 -19
- package/es/Icon/Icon.js +42 -49
- package/es/LocaleProvider/LocaleProvider.js +38 -31
- package/es/Markdown/Markdown.js +101 -118
- package/es/PermissionButton/PermissionButton.js +118 -118
- package/es/ProLayout/Basic/BasicLayout.js +301 -418
- package/es/ProLayout/Basic/Header.js +91 -111
- package/es/ProLayout/PageContainer/index.js +267 -344
- package/es/ProLayout/SiderMenu/BaseMenu.js +186 -240
- package/es/ProTable/Alert.js +39 -40
- package/es/ProTable/Content.js +84 -97
- package/es/ProTable/Header.js +32 -33
- package/es/ProTable/Pagination.js +56 -55
- package/es/ProTable/ProTable.js +256 -276
- package/es/RadioButton/RadioButton.js +48 -53
- package/es/Scrollbar/Bar.js +65 -76
- package/es/Scrollbar/Scrollbar.js +129 -161
- package/es/Scrollbar/Thumb.js +101 -150
- package/es/Search/Item.js +208 -236
- package/es/Search/Search.js +90 -90
- package/es/Skeleton/Skeleton.js +26 -27
- package/es/Skeleton/components/DashBoardCard.js +26 -27
- package/es/Skeleton/components/DashBoardChart.js +26 -27
- package/es/Skeleton/components/Detail.js +26 -27
- package/es/Skeleton/components/Drawer.js +26 -27
- package/es/Skeleton/components/Item.js +55 -54
- package/es/Skeleton/components/List.js +29 -27
- package/es/Skeleton/components/ListCard.js +28 -28
- package/es/Skeleton/components/ListCardItem.js +20 -20
- package/es/Skeleton/components/ListTable.js +26 -27
- package/es/Skeleton/components/Page.js +27 -26
- package/es/Skeleton/components/Search.js +16 -16
- package/es/Skeleton/components/Tree.js +26 -27
- package/es/TimeFormat/TimeFormat.js +32 -36
- package/es/Title/Title.js +23 -26
- package/es/ValueItem/ValueItem.js +100 -113
- package/es/VirtualTable/VirtualTable.js +235 -271
- package/lib/AutoComplete/AutoComplete.js +71 -80
- package/lib/BadgeStatus/Badge.js +38 -47
- package/lib/CardSelect/CardSelect.js +115 -137
- package/lib/CheckButton/CheckButton.js +102 -118
- package/lib/ConfigProvider/ConfigProvider.js +44 -68
- package/lib/DragModal/DragModal.js +191 -212
- package/lib/EditTable/Body.js +158 -189
- package/lib/EditTable/CellRender.js +10 -12
- package/lib/EditTable/EditTable.js +385 -434
- package/lib/EditTable/FormItem.js +140 -169
- package/lib/EditTable/Group.js +171 -204
- package/lib/EditTable/Header.js +57 -63
- package/lib/EditTable/HeaderRender.js +10 -12
- package/lib/EditTable/components/ContextMenu/Menu.js +78 -86
- package/lib/EditTable/components/Search/Search.js +151 -163
- package/lib/EditTable/components/Search/Sort.js +104 -119
- package/lib/Ellipsis/Ellipsis.js +144 -148
- package/lib/Empty/Empty.js +51 -57
- package/lib/FullPage/FullPage.js +20 -19
- package/lib/Icon/Icon.js +42 -49
- package/lib/LocaleProvider/LocaleProvider.js +38 -31
- package/lib/Markdown/Markdown.js +101 -118
- package/lib/PermissionButton/PermissionButton.js +118 -118
- package/lib/ProLayout/Basic/BasicLayout.js +301 -418
- package/lib/ProLayout/Basic/Header.js +91 -111
- package/lib/ProLayout/PageContainer/index.js +267 -344
- package/lib/ProLayout/SiderMenu/BaseMenu.js +186 -240
- package/lib/ProTable/Alert.js +39 -40
- package/lib/ProTable/Content.js +84 -97
- package/lib/ProTable/Header.js +32 -33
- package/lib/ProTable/Pagination.js +56 -55
- package/lib/ProTable/ProTable.js +256 -276
- package/lib/RadioButton/RadioButton.js +48 -53
- package/lib/Scrollbar/Bar.js +65 -76
- package/lib/Scrollbar/Scrollbar.js +129 -161
- package/lib/Scrollbar/Thumb.js +101 -150
- package/lib/Search/Item.js +208 -236
- package/lib/Search/Search.js +90 -90
- package/lib/Skeleton/Skeleton.js +26 -27
- package/lib/Skeleton/components/DashBoardCard.js +26 -27
- package/lib/Skeleton/components/DashBoardChart.js +26 -27
- package/lib/Skeleton/components/Detail.js +26 -27
- package/lib/Skeleton/components/Drawer.js +26 -27
- package/lib/Skeleton/components/Item.js +55 -54
- package/lib/Skeleton/components/List.js +29 -27
- package/lib/Skeleton/components/ListCard.js +28 -28
- package/lib/Skeleton/components/ListCardItem.js +20 -20
- package/lib/Skeleton/components/ListTable.js +26 -27
- package/lib/Skeleton/components/Page.js +27 -26
- package/lib/Skeleton/components/Search.js +16 -16
- package/lib/Skeleton/components/Tree.js +26 -27
- package/lib/TimeFormat/TimeFormat.js +32 -36
- package/lib/Title/Title.js +23 -26
- package/lib/ValueItem/ValueItem.js +100 -113
- package/lib/VirtualTable/VirtualTable.js +235 -271
- package/package.json +1 -1
|
@@ -1,111 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
)
|
|
93
|
-
)
|
|
94
|
-
, React.createElement(Layout.Header, {
|
|
95
|
-
style: {
|
|
96
|
-
padding: 0,
|
|
97
|
-
height: `${headerHeight.value}px`,
|
|
98
|
-
lineHeight: `${headerHeight.value}px`,
|
|
99
|
-
width: props.hasSiderMenu ? `calc(100% - ${width.value}px)` : '100%',
|
|
100
|
-
zIndex: 100,
|
|
101
|
-
right: right.value
|
|
102
|
-
},
|
|
103
|
-
class: className.value,}
|
|
104
|
-
|
|
105
|
-
, renderContent()
|
|
106
|
-
)
|
|
107
|
-
)
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
})
|
|
1
|
+
import { createVNode as _createVNode } from 'vue';
|
|
2
|
+
import { defineComponent, computed, toRefs } from 'vue';
|
|
3
|
+
import { Layout } from 'ant-design-vue';
|
|
4
|
+
import PropTypes from 'ant-design-vue/es/_util/vue-types';
|
|
5
|
+
import { baseHeaderProps, TopNavHeader } from '../TopHeader';
|
|
6
|
+
import { useRouteContext } from '../RouteContext';
|
|
7
|
+
import { LayoutType } from '../defaultSettings';
|
|
8
|
+
export const headerViewProps = {
|
|
9
|
+
...baseHeaderProps,
|
|
10
|
+
headerRender: {
|
|
11
|
+
type: [Object, Function, Boolean],
|
|
12
|
+
default: () => undefined
|
|
13
|
+
},
|
|
14
|
+
headerTitleRender: {
|
|
15
|
+
type: [Object, Function, Boolean],
|
|
16
|
+
default: () => undefined
|
|
17
|
+
},
|
|
18
|
+
headerContentRender: {
|
|
19
|
+
type: [Object, Function, Boolean],
|
|
20
|
+
default: () => undefined
|
|
21
|
+
},
|
|
22
|
+
hasSiderMenu: PropTypes.looseBool,
|
|
23
|
+
siderWidth: PropTypes.number.def(208)
|
|
24
|
+
};
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
name: 'HeaderView',
|
|
27
|
+
inheritAttrs: false,
|
|
28
|
+
props: headerViewProps,
|
|
29
|
+
setup(props) {
|
|
30
|
+
const {
|
|
31
|
+
prefixCls,
|
|
32
|
+
fixedHeader,
|
|
33
|
+
headerHeight,
|
|
34
|
+
layout,
|
|
35
|
+
theme,
|
|
36
|
+
onCollapse
|
|
37
|
+
} = toRefs(props);
|
|
38
|
+
const context = useRouteContext();
|
|
39
|
+
const needFixedHeader = computed(() => {
|
|
40
|
+
return fixedHeader.value || context.fixedHeader;
|
|
41
|
+
});
|
|
42
|
+
const isTop = computed(() => {
|
|
43
|
+
return layout.value === 'top';
|
|
44
|
+
});
|
|
45
|
+
const className = computed(() => ({
|
|
46
|
+
[`${prefixCls.value}-fixed-header`]: needFixedHeader.value,
|
|
47
|
+
[`${prefixCls.value}-top-menu`]: isTop.value
|
|
48
|
+
}));
|
|
49
|
+
const renderContent = () => {
|
|
50
|
+
const defaultDom = _createVNode(TopNavHeader, {
|
|
51
|
+
theme: theme.value,
|
|
52
|
+
mode: 'horizontal',
|
|
53
|
+
...props,
|
|
54
|
+
onCollapse: onCollapse.value,
|
|
55
|
+
menuData: context.menuData
|
|
56
|
+
}, null);
|
|
57
|
+
if (props.headerRender) {
|
|
58
|
+
return props.headerRender(props, defaultDom);
|
|
59
|
+
}
|
|
60
|
+
return defaultDom;
|
|
61
|
+
};
|
|
62
|
+
const right = computed(() => {
|
|
63
|
+
return needFixedHeader.value ? 0 : undefined;
|
|
64
|
+
});
|
|
65
|
+
const width = computed(() => {
|
|
66
|
+
if (context.layoutType === LayoutType.PAD) {
|
|
67
|
+
return context.siderWidth;
|
|
68
|
+
}
|
|
69
|
+
return 0;
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
return <>
|
|
73
|
+
{needFixedHeader.value && <Layout.Header style={{
|
|
74
|
+
height: `${headerHeight.value}px`,
|
|
75
|
+
lineHeight: `${headerHeight.value}px`,
|
|
76
|
+
background: 'transparent'
|
|
77
|
+
}} />}
|
|
78
|
+
<Layout.Header style={{
|
|
79
|
+
padding: 0,
|
|
80
|
+
height: `${headerHeight.value}px`,
|
|
81
|
+
lineHeight: `${headerHeight.value}px`,
|
|
82
|
+
width: props.hasSiderMenu ? `calc(100% - ${width.value}px)` : '100%',
|
|
83
|
+
zIndex: 100,
|
|
84
|
+
right: right.value
|
|
85
|
+
}} class={className.value}>
|
|
86
|
+
{renderContent()}
|
|
87
|
+
</Layout.Header>
|
|
88
|
+
</>;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|