@jetlinks-web/components 2.0.2 → 2.0.4-1
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/AMap/Map.js +125 -0
- package/es/AMap/index.js +2 -0
- package/es/AMap/util.js +56 -0
- package/es/BadgeStatus/Badge.js +54 -0
- package/es/BadgeStatus/color.js +21 -0
- package/es/BadgeStatus/index.js +3 -0
- package/es/CardSelect/CardSelect.js +123 -0
- package/es/CardSelect/index.js +2 -0
- package/es/CheckButton/CheckButton.js +120 -0
- package/es/CheckButton/index.js +2 -0
- package/es/CheckButton/style/index.css +37 -0
- package/es/CheckButton/style/index.less +40 -0
- package/es/ConfigProvider/context.js +12 -0
- package/es/ConfigProvider/index.js +31 -0
- package/es/Echarts/Echarts.js +47 -0
- package/es/Echarts/index.js +2 -0
- package/es/Ellipsis/Ellipsis.js +184 -0
- package/es/Ellipsis/index.js +2 -0
- package/es/Ellipsis/style/index.css +17 -0
- package/es/Ellipsis/style/index.less +20 -0
- package/es/Empty/Empty.js +56 -0
- package/es/Empty/image.js +2 -0
- package/es/Empty/index.js +2 -0
- package/es/FullPage/FullPage.js +31 -0
- package/es/FullPage/index.js +2 -0
- package/es/Icon/icon.js +42 -0
- package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
- package/es/MonacoEditor/Monaco.js +238 -0
- package/es/MonacoEditor/index.js +2 -0
- package/es/PermissionButton/index.js +117 -0
- package/es/ProLayout/Basic/BasicLayout.js +259 -0
- package/es/ProLayout/Basic/Header.js +97 -0
- package/es/ProLayout/PageContainer/index.js +324 -0
- package/es/ProLayout/PageContainer/typings.js +1 -0
- package/es/ProLayout/RouteContext.js +22 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +285 -0
- package/es/ProLayout/SiderMenu/SiderMenu.js +278 -0
- package/es/ProLayout/SiderMenu/index.js +2 -0
- package/es/ProLayout/SiderMenu/typings.js +1 -0
- package/es/ProLayout/TopHeader/index.js +163 -0
- package/es/ProLayout/defaultSettings.js +66 -0
- package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
- package/{src → es}/ProLayout/style/default.less +1 -1
- package/es/ProLayout/style/index.js +1 -0
- package/es/ProLayout/typings.js +1 -0
- package/es/ProLayout/util.js +61 -0
- package/es/ProTable/index.js +411 -0
- package/es/ProTable/proTableTypes.js +11 -0
- package/es/ProTable/style/index.css +65 -0
- package/es/ProTable/style/index.js +1 -0
- package/{src → es}/ProTable/style/index.less +92 -92
- package/es/Scrollbar/Bar.js +114 -0
- package/es/Scrollbar/Scrollbar.js +212 -0
- package/es/Scrollbar/Thumb.js +189 -0
- package/es/Scrollbar/constants.js +1 -0
- package/es/Scrollbar/index.js +2 -0
- package/es/Scrollbar/scrollbarProps.js +100 -0
- package/es/Scrollbar/thumbProps.js +10 -0
- package/es/Scrollbar/util.js +30 -0
- package/es/Search/Advanced/History.js +183 -0
- package/es/Search/Advanced/SaveHistory.js +153 -0
- package/es/Search/Advanced/index.js +520 -0
- package/es/Search/Item.js +497 -0
- package/es/Search/Search.js +249 -0
- package/es/Search/hooks/index.js +1 -0
- package/es/Search/hooks/useSearchItems.js +40 -0
- package/es/Search/index.js +4 -0
- package/es/Search/setting.js +91 -0
- package/es/Search/style/Item.less +33 -0
- package/es/Search/style/Search.less +179 -0
- package/es/Search/style/index.js +2 -0
- package/es/Search/typing.js +1 -0
- package/es/Search/util.js +234 -0
- package/es/ValueItem/ValueItem.js +233 -0
- package/es/ValueItem/index.js +2 -0
- package/es/ValueItem/util.js +16 -0
- package/es/index.js +24 -0
- package/es/style/index.js +3 -0
- package/es/style/variable.css +0 -0
- package/{src → es}/style/variable.less +2 -4
- package/es/style.js +5 -0
- package/lib/AMap/Map.js +125 -0
- package/lib/AMap/index.js +9 -0
- package/lib/AMap/util.js +62 -0
- package/lib/BadgeStatus/Badge.js +54 -0
- package/lib/BadgeStatus/color.js +27 -0
- package/lib/BadgeStatus/index.js +22 -0
- package/lib/CardSelect/CardSelect.js +123 -0
- package/lib/CardSelect/index.js +9 -0
- package/lib/CheckButton/CheckButton.js +120 -0
- package/lib/CheckButton/index.js +9 -0
- package/lib/CheckButton/style/index.css +37 -0
- package/lib/CheckButton/style/index.less +40 -0
- package/lib/ConfigProvider/context.js +19 -0
- package/lib/ConfigProvider/index.js +37 -0
- package/lib/Echarts/Echarts.js +47 -0
- package/lib/Echarts/index.js +9 -0
- package/lib/Ellipsis/Ellipsis.js +184 -0
- package/lib/Ellipsis/index.js +9 -0
- package/lib/Ellipsis/style/index.css +17 -0
- package/lib/Ellipsis/style/index.less +20 -0
- package/lib/Empty/Empty.js +56 -0
- package/lib/Empty/image.js +8 -0
- package/lib/Empty/index.js +9 -0
- package/lib/FullPage/FullPage.js +31 -0
- package/lib/FullPage/index.js +9 -0
- package/lib/Icon/icon.js +52 -0
- package/lib/Icon/index.js +9 -0
- package/lib/MonacoEditor/Monaco.js +238 -0
- package/lib/MonacoEditor/index.js +9 -0
- package/lib/PermissionButton/index.js +124 -0
- package/lib/ProLayout/Basic/BasicLayout.js +268 -0
- package/lib/ProLayout/Basic/BasicLayout.less +66 -0
- package/lib/ProLayout/Basic/Header.js +103 -0
- package/lib/ProLayout/Basic/Header.less +8 -0
- package/lib/ProLayout/PageContainer/index.js +327 -0
- package/lib/ProLayout/PageContainer/index.less +103 -0
- package/lib/ProLayout/PageContainer/typings.js +5 -0
- package/lib/ProLayout/RouteContext.js +28 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +290 -0
- package/lib/ProLayout/SiderMenu/SiderMenu.js +287 -0
- package/lib/ProLayout/SiderMenu/index.js +20 -0
- package/lib/ProLayout/SiderMenu/index.less +212 -0
- package/lib/ProLayout/SiderMenu/typings.js +5 -0
- package/lib/ProLayout/TopHeader/index.js +168 -0
- package/lib/ProLayout/TopHeader/index.less +174 -0
- package/lib/ProLayout/defaultSettings.js +72 -0
- package/lib/ProLayout/index.js +16 -0
- package/lib/ProLayout/style/default.less +4 -0
- package/lib/ProLayout/style/index.js +3 -0
- package/lib/ProLayout/style/style.less +7 -0
- package/lib/ProLayout/typings.js +5 -0
- package/lib/ProLayout/util.js +72 -0
- package/lib/ProTable/index.js +417 -0
- package/lib/ProTable/proTableTypes.js +17 -0
- package/lib/ProTable/style/index.css +65 -0
- package/lib/ProTable/style/index.js +3 -0
- package/lib/ProTable/style/index.less +92 -0
- package/lib/Scrollbar/Bar.js +114 -0
- package/lib/Scrollbar/Scrollbar.js +212 -0
- package/lib/Scrollbar/Thumb.js +189 -0
- package/lib/Scrollbar/constants.js +7 -0
- package/lib/Scrollbar/index.js +9 -0
- package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/scrollbarProps.js} +106 -108
- package/lib/Scrollbar/thumbProps.js +16 -0
- package/lib/Scrollbar/util.js +37 -0
- package/lib/Search/Advanced/History.js +183 -0
- package/lib/Search/Advanced/SaveHistory.js +153 -0
- package/lib/Search/Advanced/index.js +520 -0
- package/lib/Search/Item.js +497 -0
- package/lib/Search/Search.js +249 -0
- package/lib/Search/hooks/index.js +16 -0
- package/lib/Search/hooks/useSearchItems.js +47 -0
- package/lib/Search/index.js +16 -0
- package/lib/Search/setting.js +97 -0
- package/lib/Search/style/Item.less +33 -0
- package/lib/Search/style/Search.less +179 -0
- package/lib/Search/style/index.js +4 -0
- package/lib/Search/typing.js +5 -0
- package/lib/Search/util.js +241 -0
- package/lib/ValueItem/ValueItem.js +233 -0
- package/lib/ValueItem/index.js +9 -0
- package/lib/ValueItem/util.js +22 -0
- package/lib/index.js +158 -0
- package/lib/style/components.less +3 -0
- package/lib/style/index.js +4 -0
- package/lib/style/variable.css +0 -0
- package/lib/style/variable.less +2 -0
- package/lib/style.js +7 -0
- package/package.json +123 -13
- package/index.ts +0 -64
- package/src/AMap/Map.vue +0 -110
- package/src/AMap/index.ts +0 -1
- package/src/AMap/util.ts +0 -56
- package/src/BadgeStatus/Badge.vue +0 -41
- package/src/BadgeStatus/color.ts +0 -25
- package/src/BadgeStatus/index.ts +0 -4
- package/src/CardSelect/CardSelect.vue +0 -136
- package/src/CardSelect/index.ts +0 -3
- package/src/CheckButton/CheckButton.vue +0 -146
- package/src/CheckButton/index.md +0 -27
- package/src/CheckButton/index.ts +0 -3
- package/src/ConfigProvider/context.ts +0 -17
- package/src/ConfigProvider/index.tsx +0 -42
- package/src/Echarts/Echarts.vue +0 -43
- package/src/Echarts/index.ts +0 -3
- package/src/Ellipsis/Ellipsis.vue +0 -182
- package/src/Ellipsis/index.ts +0 -3
- package/src/Empty/Empty.vue +0 -43
- package/src/Empty/image.ts +0 -3
- package/src/Empty/index.ts +0 -2
- package/src/FullPage/FullPage.vue +0 -30
- package/src/FullPage/index.ts +0 -3
- package/src/Icon/icon.tsx +0 -40
- package/src/MonacoEditor/Monaco.vue +0 -242
- package/src/MonacoEditor/index.md +0 -26
- package/src/MonacoEditor/index.ts +0 -2
- package/src/PermissionButton/index.tsx +0 -110
- package/src/ProLayout/Basic/BasicLayout.tsx +0 -392
- package/src/ProLayout/Basic/Header.tsx +0 -115
- package/src/ProLayout/PageContainer/index.tsx +0 -441
- package/src/ProLayout/PageContainer/typings.ts +0 -56
- package/src/ProLayout/RouteContext.ts +0 -87
- package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
- package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
- package/src/ProLayout/SiderMenu/index.ts +0 -2
- package/src/ProLayout/SiderMenu/typings.ts +0 -49
- package/src/ProLayout/TopHeader/index.tsx +0 -210
- package/src/ProLayout/defaultSettings.ts +0 -106
- package/src/ProLayout/style/index.ts +0 -1
- package/src/ProLayout/typings.ts +0 -87
- package/src/ProLayout/util.ts +0 -64
- package/src/ProTable/index.md +0 -53
- package/src/ProTable/index.tsx +0 -551
- package/src/ProTable/proTableTypes.ts +0 -70
- package/src/ProTable/style/index.ts +0 -1
- package/src/Scrollbar/Bar.vue +0 -75
- package/src/Scrollbar/Scrollbar.vue +0 -260
- package/src/Scrollbar/Thumb.vue +0 -163
- package/src/Scrollbar/constants.ts +0 -10
- package/src/Scrollbar/index.ts +0 -4
- package/src/Scrollbar/thumb.ts +0 -16
- package/src/Scrollbar/util.ts +0 -38
- package/src/Search/Advanced/History.vue +0 -140
- package/src/Search/Advanced/SaveHistory.vue +0 -108
- package/src/Search/Advanced/index.vue +0 -435
- package/src/Search/Item.vue +0 -525
- package/src/Search/Search.vue +0 -398
- package/src/Search/hooks/index.ts +0 -1
- package/src/Search/hooks/useSearchItems.ts +0 -68
- package/src/Search/index.md +0 -57
- package/src/Search/index.ts +0 -5
- package/src/Search/setting.ts +0 -55
- package/src/Search/typing.ts +0 -76
- package/src/Search/util.ts +0 -263
- package/src/ValueItem/ValueItem.vue +0 -192
- package/src/ValueItem/index.ts +0 -3
- package/src/ValueItem/util.ts +0 -16
- package/src/style/index.ts +0 -3
- /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
- /package/{src → es}/ProLayout/Basic/Header.less +0 -0
- /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
- /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
- /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
- /package/{src → es}/ProLayout/style/style.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,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
|
+
};
|