@jetlinks-web/components 3.0.1-rc → 3.1.0
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 +13 -9
- package/es/BadgeStatus/Badge.js +1 -2
- package/es/BadgeStatus/color.js +3 -3
- package/es/CardSelect/CardSelect.js +23 -13
- package/es/CardSelect/style/index.js +25 -1
- package/es/CheckButton/CheckButton.js +12 -4
- package/es/CheckButton/style/index.js +41 -1
- package/es/DragModal/DragModal.js +14 -8
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +13 -7
- package/es/EditTable/FormItem.js +18 -19
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +11 -5
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +23 -18
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.js +53 -0
- package/es/EditTable/style/form.js +24 -0
- package/es/EditTable/style/group.js +25 -0
- package/es/EditTable/style/header.js +58 -0
- package/es/EditTable/style/index.js +42 -1
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +30 -3
- package/es/Ellipsis/Ellipsis.js +10 -2
- package/es/Ellipsis/style/index.js +24 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +6 -7
- package/es/ProLayout/Basic/BasicLayout.js +45 -41
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +3 -7
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +21 -17
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +18 -42
- package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +13 -12
- package/es/ProLayout/TopHeader/style.js +126 -0
- package/es/ProLayout/style/index.js +7 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Alert.js +12 -4
- package/es/ProTable/Content.js +166 -45
- package/es/ProTable/Header.js +21 -11
- package/es/ProTable/Pagination.js +28 -11
- package/es/ProTable/ProTable.js +104 -46
- package/es/ProTable/hooks/index.js +2 -0
- package/es/ProTable/hooks/useTableInject.js +5 -0
- package/es/ProTable/hooks/useTableSelection.js +95 -0
- package/es/ProTable/setting.js +24 -1
- package/es/ProTable/style/index.js +109 -1
- package/es/RadioButton/RadioButton.js +10 -4
- package/es/RadioButton/style/index.js +23 -1
- package/es/Scrollbar/Scrollbar.js +10 -3
- package/es/Scrollbar/Thumb.js +36 -25
- package/es/Scrollbar/style/index.js +63 -1
- package/es/Search/Advanced/History.js +23 -16
- package/es/Search/Advanced/SaveHistory.js +1 -2
- package/es/Search/Advanced/index.js +212 -292
- package/es/Search/Item.js +175 -415
- package/es/Search/Search.js +78 -172
- package/es/Search/hooks/index.js +108 -1
- package/es/Search/hooks/useRouteQuery.js +57 -0
- package/es/Search/setting.js +132 -14
- package/es/Search/style/index.js +4 -2
- package/es/Search/style/item.js +28 -0
- package/es/Search/style/search.js +133 -0
- package/es/Search/util.js +116 -124
- package/es/Skeleton/components/DashBoardCard.js +19 -12
- package/es/Skeleton/components/DashBoardChart.js +48 -45
- package/es/Skeleton/components/Detail.js +27 -21
- package/es/Skeleton/components/Drawer.js +23 -14
- package/es/Skeleton/components/Item.js +9 -1
- package/es/Skeleton/components/List.js +0 -1
- package/es/Skeleton/components/ListCard.js +20 -13
- package/es/Skeleton/components/ListCardItem.js +12 -13
- package/es/Skeleton/components/ListTable.js +19 -10
- package/es/Skeleton/components/Page.js +0 -1
- package/es/Skeleton/components/Tree.js +21 -14
- package/es/Skeleton/skeleton.js +17 -8
- package/es/Skeleton/style/index.js +132 -1
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +44 -39
- package/es/VirtualTable/VirtualTable.js +398 -0
- package/es/VirtualTable/data.js +36 -0
- package/es/VirtualTable/index.js +5 -0
- package/es/VirtualTable/style/index.js +32 -0
- package/es/components.js +1 -4
- package/es/locale/en-US.js +6 -8
- package/es/locale/zh-CN.js +6 -8
- package/es/style/index.js +0 -3
- package/es/style/styleRegister.js +21 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +0 -13
- package/lib/AutoComplete/AutoComplete.js +13 -9
- package/lib/BadgeStatus/Badge.js +1 -2
- package/lib/BadgeStatus/color.js +3 -3
- package/lib/CardSelect/CardSelect.js +23 -13
- package/lib/CardSelect/style/index.js +30 -1
- package/lib/CheckButton/CheckButton.js +12 -4
- package/lib/CheckButton/style/index.js +46 -1
- package/lib/DragModal/DragModal.js +14 -8
- package/lib/DragModal/style/index.js +69 -1
- package/lib/EditTable/Body.js +10 -3
- package/lib/EditTable/EditTable.js +13 -7
- package/lib/EditTable/FormItem.js +18 -19
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +23 -18
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.js +60 -0
- package/lib/EditTable/style/form.js +31 -0
- package/lib/EditTable/style/group.js +32 -0
- package/lib/EditTable/style/header.js +65 -0
- package/lib/EditTable/style/index.js +47 -1
- package/lib/EditTable/style/menu.js +33 -0
- package/lib/EditTable/style/table.js +52 -0
- package/lib/EditTable/utils.js +31 -3
- package/lib/Ellipsis/Ellipsis.js +10 -2
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/Icon/icon.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +6 -7
- package/lib/ProLayout/Basic/BasicLayout.js +45 -42
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +2 -6
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +19 -15
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +19 -42
- package/lib/ProLayout/SiderMenu/SiderMenu.js +24 -37
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +14 -12
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +12 -4
- package/lib/ProTable/Content.js +166 -45
- package/lib/ProTable/Header.js +21 -11
- package/lib/ProTable/Pagination.js +28 -11
- package/lib/ProTable/ProTable.js +104 -46
- package/lib/ProTable/hooks/index.js +27 -0
- package/lib/ProTable/hooks/useTableInject.js +11 -0
- package/lib/ProTable/hooks/useTableSelection.js +102 -0
- package/lib/ProTable/setting.js +24 -1
- package/lib/ProTable/style/index.js +114 -1
- package/lib/RadioButton/RadioButton.js +10 -4
- package/lib/RadioButton/style/index.js +28 -1
- package/lib/Scrollbar/Scrollbar.js +10 -3
- package/lib/Scrollbar/Thumb.js +36 -25
- package/lib/Scrollbar/style/index.js +68 -1
- package/lib/Search/Advanced/History.js +23 -16
- package/lib/Search/Advanced/SaveHistory.js +1 -2
- package/lib/Search/Advanced/index.js +212 -292
- package/lib/Search/Item.js +175 -415
- package/lib/Search/Search.js +78 -172
- package/lib/Search/hooks/index.js +130 -1
- package/lib/Search/hooks/useRouteQuery.js +64 -0
- package/lib/Search/setting.js +133 -15
- package/lib/Search/style/index.js +9 -2
- package/lib/Search/style/item.js +35 -0
- package/lib/Search/style/search.js +140 -0
- package/lib/Search/util.js +116 -124
- package/lib/Skeleton/components/DashBoardCard.js +19 -12
- package/lib/Skeleton/components/DashBoardChart.js +48 -45
- package/lib/Skeleton/components/Detail.js +27 -21
- package/lib/Skeleton/components/Drawer.js +23 -14
- package/lib/Skeleton/components/Item.js +9 -1
- package/lib/Skeleton/components/List.js +0 -1
- package/lib/Skeleton/components/ListCard.js +20 -13
- package/lib/Skeleton/components/ListCardItem.js +12 -13
- package/lib/Skeleton/components/ListTable.js +19 -10
- package/lib/Skeleton/components/Page.js +0 -1
- package/lib/Skeleton/components/Tree.js +21 -14
- package/lib/Skeleton/skeleton.js +17 -8
- package/lib/Skeleton/style/index.js +137 -1
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +44 -39
- package/lib/VirtualTable/VirtualTable.js +398 -0
- package/lib/VirtualTable/data.js +43 -0
- package/lib/VirtualTable/index.js +12 -0
- package/lib/VirtualTable/style/index.js +39 -0
- package/lib/components.js +8 -30
- package/lib/index.js +1 -2
- package/lib/locale/en-US.js +6 -8
- package/lib/locale/zh-CN.js +6 -8
- package/lib/style/components.less +0 -1
- package/lib/style/index.js +1 -4
- package/lib/style/styleRegister.js +28 -0
- package/lib/style/variable.js +10 -0
- package/lib/style.js +1 -15
- package/package.json +170 -173
- package/es/AMap/Map.js +0 -133
- package/es/AMap/index.js +0 -5
- package/es/AMap/util.js +0 -56
- package/es/CardSelect/style/index.css +0 -24
- package/es/CardSelect/style/index.less +0 -26
- package/es/CheckButton/style/index.css +0 -37
- package/es/CheckButton/style/index.less +0 -40
- package/es/DragModal/style/index.css +0 -82
- package/es/DragModal/style/index.less +0 -97
- package/es/Echarts/Echarts.js +0 -48
- package/es/Echarts/index.js +0 -5
- package/es/EditTable/style/body.less +0 -66
- package/es/EditTable/style/form.less +0 -33
- package/es/EditTable/style/group.less +0 -32
- package/es/EditTable/style/header.less +0 -77
- package/es/EditTable/style/index.css +0 -267
- package/es/EditTable/style/index.less +0 -41
- package/es/EditTable/style/menu.less +0 -25
- package/es/EditTable/style/table.less +0 -47
- package/es/Ellipsis/style/index.css +0 -17
- package/es/Ellipsis/style/index.less +0 -20
- package/es/FlameGraph/FlameGraph.js +0 -136
- package/es/FlameGraph/index.js +0 -5
- package/es/FlameGraph/style/index.css +0 -43
- package/es/FlameGraph/style/index.js +0 -1
- package/es/FlameGraph/style/index.less +0 -52
- package/es/ProLayout/Basic/BasicLayout.less +0 -66
- package/es/ProLayout/Basic/Header.less +0 -8
- package/es/ProLayout/PageContainer/index.less +0 -103
- package/es/ProLayout/SiderMenu/index.less +0 -231
- package/es/ProLayout/TopHeader/index.less +0 -174
- package/es/ProLayout/style/default.less +0 -4
- package/es/ProLayout/style/style.less +0 -7
- package/es/ProTable/style/ProTable.less +0 -139
- package/es/RadioButton/style/index.css +0 -20
- package/es/RadioButton/style/index.less +0 -19
- package/es/Scrollbar/style/index.css +0 -65
- package/es/Scrollbar/style/index.less +0 -83
- package/es/Search/style/Item.less +0 -33
- package/es/Search/style/Search.less +0 -179
- package/es/Skeleton/style/Skeleton.less +0 -166
- package/es/Title/style/index.css +0 -27
- package/es/Title/style/index.less +0 -27
- package/es/style/index.css +0 -5375
- package/es/style/index.less +0 -14
- package/es/style/variable.css +0 -4
- package/es/style/variable.less +0 -4
- package/lib/AMap/Map.js +0 -133
- package/lib/AMap/index.js +0 -12
- package/lib/AMap/util.js +0 -62
- package/lib/CardSelect/style/index.css +0 -24
- package/lib/CardSelect/style/index.less +0 -26
- package/lib/CheckButton/style/index.css +0 -37
- package/lib/CheckButton/style/index.less +0 -40
- package/lib/DragModal/style/index.css +0 -82
- package/lib/DragModal/style/index.less +0 -97
- package/lib/Echarts/Echarts.js +0 -48
- package/lib/Echarts/index.js +0 -12
- package/lib/EditTable/style/body.less +0 -66
- package/lib/EditTable/style/form.less +0 -33
- package/lib/EditTable/style/group.less +0 -32
- package/lib/EditTable/style/header.less +0 -77
- package/lib/EditTable/style/index.css +0 -267
- package/lib/EditTable/style/index.less +0 -41
- package/lib/EditTable/style/menu.less +0 -25
- package/lib/EditTable/style/table.less +0 -47
- package/lib/Ellipsis/style/index.css +0 -17
- package/lib/Ellipsis/style/index.less +0 -20
- package/lib/FlameGraph/FlameGraph.js +0 -136
- package/lib/FlameGraph/index.js +0 -12
- package/lib/FlameGraph/style/index.css +0 -43
- package/lib/FlameGraph/style/index.js +0 -3
- package/lib/FlameGraph/style/index.less +0 -52
- package/lib/ProLayout/Basic/BasicLayout.less +0 -66
- package/lib/ProLayout/Basic/Header.less +0 -8
- package/lib/ProLayout/PageContainer/index.less +0 -103
- package/lib/ProLayout/SiderMenu/index.less +0 -231
- package/lib/ProLayout/TopHeader/index.less +0 -174
- package/lib/ProLayout/style/default.less +0 -4
- package/lib/ProLayout/style/style.less +0 -7
- package/lib/ProTable/style/ProTable.less +0 -139
- package/lib/RadioButton/style/index.css +0 -20
- package/lib/RadioButton/style/index.less +0 -19
- package/lib/Scrollbar/style/index.css +0 -65
- package/lib/Scrollbar/style/index.less +0 -83
- package/lib/Search/style/Item.less +0 -33
- package/lib/Search/style/Search.less +0 -179
- package/lib/Skeleton/style/Skeleton.less +0 -166
- package/lib/Title/style/index.css +0 -27
- package/lib/Title/style/index.less +0 -27
- package/lib/style/index.css +0 -5375
- package/lib/style/index.less +0 -14
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export var genTableStyle = function genTableStyle(config) {
|
|
2
|
+
var token = config.token;
|
|
3
|
+
return {
|
|
4
|
+
'.jetlinks-edit-table-wrapper': {
|
|
5
|
+
background: '#fff',
|
|
6
|
+
height: '100%',
|
|
7
|
+
position: 'relative',
|
|
8
|
+
'&.table-full-screen': {
|
|
9
|
+
padding: 24
|
|
10
|
+
},
|
|
11
|
+
'.jetlinks-edit-table': {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
flexGrow: 0,
|
|
15
|
+
flexShrink: 0,
|
|
16
|
+
background: '#fafafa',
|
|
17
|
+
transition: 'background-color .3s ease',
|
|
18
|
+
overflow: 'auto hidden',
|
|
19
|
+
'.jetlinks-edit-table-header': {
|
|
20
|
+
overflow: 'hidden',
|
|
21
|
+
width: '100%'
|
|
22
|
+
},
|
|
23
|
+
'.jetlinks-edit-table-body': {
|
|
24
|
+
backgroundColor: '#fff',
|
|
25
|
+
overflowY: 'hidden',
|
|
26
|
+
position: 'relative',
|
|
27
|
+
height: '100%',
|
|
28
|
+
width: '100%',
|
|
29
|
+
flex: '1 1 auto',
|
|
30
|
+
flexDirection: 'row'
|
|
31
|
+
},
|
|
32
|
+
'.jetlinks-table-horizontal-scroll': {
|
|
33
|
+
width: '100%',
|
|
34
|
+
height: '15px',
|
|
35
|
+
minHeight: '15px',
|
|
36
|
+
maxHeight: '15px',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
'.jetlinks-table-horizontal-scroll-bar': {
|
|
39
|
+
height: '100%',
|
|
40
|
+
overflowX: 'scroll'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
package/es/EditTable/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
1
2
|
import { cloneDeep, omit } from "lodash-es";
|
|
2
3
|
/**
|
|
3
4
|
* 规则收集器,收集columns中的rules和watch
|
|
@@ -6,9 +7,35 @@ import { cloneDeep, omit } from "lodash-es";
|
|
|
6
7
|
export var collectValidateRules = function collectValidateRules(columns) {
|
|
7
8
|
var rules = {};
|
|
8
9
|
columns.forEach(function (item) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
var _item$form;
|
|
11
|
+
if ((_item$form = item.form) !== null && _item$form !== void 0 && _item$form.rules) {
|
|
12
|
+
var currentLevel = rules; // 从最顶层开始构建
|
|
13
|
+
var field = item.form.field || item.dataIndex;
|
|
14
|
+
var parts = Array.isArray(field) ? field : String(field).split(',');
|
|
15
|
+
for (var i = 0; i < parts.length; i++) {
|
|
16
|
+
var part = parts[i];
|
|
17
|
+
if (i === parts.length - 1) {
|
|
18
|
+
// 这是最深层的叶子节点
|
|
19
|
+
currentLevel[part] = _toConsumableArray(item.form.rules);
|
|
20
|
+
} else {
|
|
21
|
+
// 这是中间的父节点(例如 'prop1' 或 'type')
|
|
22
|
+
if (!currentLevel[part]) {
|
|
23
|
+
// 如果当前层级还没有这个属性,就把它定义为一个对象
|
|
24
|
+
currentLevel[part] = {
|
|
25
|
+
type: 'object',
|
|
26
|
+
fields: {}
|
|
27
|
+
};
|
|
28
|
+
} else if (currentLevel[part].type !== 'object') {
|
|
29
|
+
// 如果已经存在但不是对象类型,可能是之前被错误定义为叶子节点,修正它
|
|
30
|
+
console.warn("Warning: '".concat(parts.slice(0, i + 1).join('.'), "' was expected to be an object but has other rules. Overwriting."));
|
|
31
|
+
currentLevel[part] = {
|
|
32
|
+
type: 'object',
|
|
33
|
+
fields: {}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// 进入下一层级,继续构建 `fields`
|
|
37
|
+
currentLevel = currentLevel[part].fields;
|
|
38
|
+
}
|
|
12
39
|
}
|
|
13
40
|
}
|
|
14
41
|
});
|
package/es/Ellipsis/Ellipsis.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
"mergeProps": "setup-const",
|
|
8
8
|
"ref": "setup-const",
|
|
9
9
|
"useAttrs": "setup-const",
|
|
10
|
+
"useEllipsisStyle": "setup-maybe-ref",
|
|
10
11
|
"props": "setup-reactive-const",
|
|
12
|
+
"prefixCls": "setup-ref",
|
|
13
|
+
"wrapSSR": "setup-maybe-ref",
|
|
14
|
+
"hashId": "setup-maybe-ref",
|
|
11
15
|
"jEllipsis": "literal-const",
|
|
12
16
|
"jEllipsisCursorClass": "literal-const",
|
|
13
17
|
"jEllipsisLineClampClass": "literal-const",
|
|
@@ -25,9 +29,10 @@
|
|
|
25
29
|
"syncCursorStyle": "setup-const",
|
|
26
30
|
"getTooltipDisabled": "setup-const"
|
|
27
31
|
} */
|
|
28
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps,
|
|
32
|
+
import { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps, withCtx as _withCtx, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
29
33
|
import { Tooltip } from 'ant-design-vue';
|
|
30
34
|
import { computed, mergeProps, ref, useAttrs } from 'vue';
|
|
35
|
+
import useEllipsisStyle from './style';
|
|
31
36
|
const jEllipsis = 'j-ellipsis';
|
|
32
37
|
const jEllipsisCursorClass = 'j-ellipsis-cursor';
|
|
33
38
|
const jEllipsisLineClampClass = 'j-ellipsis-line-clamp';
|
|
@@ -51,6 +56,8 @@ const __sfc_main__ = Object.assign({
|
|
|
51
56
|
},
|
|
52
57
|
setup(__props) {
|
|
53
58
|
const props = __props;
|
|
59
|
+
const prefixCls = computed(() => 'j-ellipsis');
|
|
60
|
+
const [wrapSSR, hashId] = useEllipsisStyle(prefixCls);
|
|
54
61
|
// define class name
|
|
55
62
|
const expandedRef = ref(false);
|
|
56
63
|
const tooltipRef = ref(null);
|
|
@@ -72,6 +79,7 @@ const __sfc_main__ = Object.assign({
|
|
|
72
79
|
jEllipsis,
|
|
73
80
|
props.lineClamp !== undefined ? jEllipsisLineClampClass : undefined,
|
|
74
81
|
props.expandTrigger === 'click' ? jEllipsisCursorClass : undefined,
|
|
82
|
+
hashId.value
|
|
75
83
|
],
|
|
76
84
|
style: ellipsisStyleRef.value,
|
|
77
85
|
}),
|
|
@@ -176,7 +184,7 @@ const __sfc_main__ = Object.assign({
|
|
|
176
184
|
name: "title",
|
|
177
185
|
fn: _withCtx(() => [
|
|
178
186
|
_createElementVNode("div", {
|
|
179
|
-
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep'])
|
|
187
|
+
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep', _unref(hashId)])
|
|
180
188
|
}, [
|
|
181
189
|
_renderSlot(_ctx.$slots, "default"),
|
|
182
190
|
_renderSlot(_ctx.$slots, "tooltip")
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import genCompoentStyle from "../../style/styleRegister";
|
|
2
|
+
var genEllipsisStyle = function genEllipsisStyle(config) {
|
|
3
|
+
var token = config.token;
|
|
4
|
+
return {
|
|
5
|
+
'.j-ellipsis': {
|
|
6
|
+
overflow: 'hidden',
|
|
7
|
+
verticalAlign: 'bottom'
|
|
8
|
+
},
|
|
9
|
+
'.j-ellipsis-cursor': {
|
|
10
|
+
cursor: 'pointer'
|
|
11
|
+
},
|
|
12
|
+
'.j-ellipsis-line-clamp': {
|
|
13
|
+
display: '-webkit-box',
|
|
14
|
+
'-webkit-box-orient': 'vertical',
|
|
15
|
+
wordBreak: 'break-all'
|
|
16
|
+
},
|
|
17
|
+
'.j-ellipsis-deep': {
|
|
18
|
+
maxHeight: '380px',
|
|
19
|
+
'-webkit-line-clamp': 17,
|
|
20
|
+
textOverflow: 'ellipsis'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default genCompoentStyle([genEllipsisStyle]);
|
package/es/FullPage/FullPage.js
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
"y": "setup-maybe-ref"
|
|
9
9
|
} */
|
|
10
10
|
import { defineComponent as _defineComponent } from 'vue';
|
|
11
|
-
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock
|
|
12
|
-
const _withScopeId = n => (_pushScopeId("data-v-1747107044018"), n = n(), _popScopeId(), n);
|
|
11
|
+
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
12
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
14
13
|
import { ref, inject } from 'vue';
|
|
15
14
|
import { useElementBounding } from '@vueuse/core';
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
"provide": "setup-const",
|
|
4
4
|
"reactive": "setup-const",
|
|
5
5
|
"watch": "setup-const",
|
|
6
|
-
"defineOptions": "setup-const",
|
|
7
6
|
"defaultLocal": "setup-maybe-ref",
|
|
8
7
|
"props": "setup-reactive-const",
|
|
9
8
|
"state": "setup-reactive-const"
|
|
10
9
|
} */
|
|
11
10
|
import { defineComponent as _defineComponent } from 'vue';
|
|
12
11
|
import { renderSlot as _renderSlot } from "vue";
|
|
13
|
-
import { provide, reactive, watch
|
|
12
|
+
import { provide, reactive, watch } from "vue";
|
|
14
13
|
import defaultLocal from '../locale/zh-CN';
|
|
15
14
|
const __sfc_main__ = _defineComponent({
|
|
16
15
|
...{
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
6
|
var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
|
|
8
|
-
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
8
|
import { h, defineComponent, computed, inject, getCurrentInstance, toRefs } from "vue";
|
|
10
9
|
import { Button, Tooltip, Modal } from 'ant-design-vue';
|
|
11
10
|
import "ant-design-vue/es";
|
|
@@ -77,15 +76,15 @@ var PermissionButton = defineComponent({
|
|
|
77
76
|
noPermissionTitle = props.noPermissionTitle,
|
|
78
77
|
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
79
78
|
if (popConfirm) {
|
|
80
|
-
buttonProps.onClick = /*#__PURE__*/_asyncToGenerator(
|
|
79
|
+
buttonProps.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
81
80
|
var _props$popConfirmBefo;
|
|
82
81
|
var _popConfirm;
|
|
83
|
-
return _regeneratorRuntime
|
|
82
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
84
83
|
while (1) switch (_context.prev = _context.next) {
|
|
85
84
|
case 0:
|
|
86
|
-
_context.next =
|
|
85
|
+
_context.next = 1;
|
|
87
86
|
return ((_props$popConfirmBefo = props.popConfirmBefore) === null || _props$popConfirmBefo === void 0 ? void 0 : _props$popConfirmBefo.call(props)) || popConfirm;
|
|
88
|
-
case
|
|
87
|
+
case 1:
|
|
89
88
|
_popConfirm = _context.sent;
|
|
90
89
|
if (context.components) {
|
|
91
90
|
confirm(_objectSpread(_objectSpread({}, _popConfirm), {}, {
|
|
@@ -105,7 +104,7 @@ var PermissionButton = defineComponent({
|
|
|
105
104
|
}
|
|
106
105
|
});
|
|
107
106
|
}
|
|
108
|
-
case
|
|
107
|
+
case 2:
|
|
109
108
|
case "end":
|
|
110
109
|
return _context.stop();
|
|
111
110
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Fragment as _Fragment, createVNode as _createVNode
|
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
6
|
var _excluded = ["pure", "onCollapse", "onOpenKeys", "onSelect", "onMenuClick"];
|
|
6
7
|
import SiderMenu, { siderMenuProps } from '../SiderMenu/SiderMenu';
|
|
@@ -8,14 +9,12 @@ import { computed, defineComponent, provide, reactive, watchEffect, toRefs, h }
|
|
|
8
9
|
import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
9
10
|
import { baseHeaderProps } from '../TopHeader';
|
|
10
11
|
import Header, { headerViewProps } from './Header';
|
|
11
|
-
import useConfigInject from
|
|
12
|
+
import useConfigInject from "ant-design-vue/es/config-provider/hooks/useConfigInject";
|
|
12
13
|
import { pick } from 'lodash-es';
|
|
13
14
|
import { defaultRouteContext, routeContextInjectKey } from '../RouteContext';
|
|
14
15
|
import { getMenuFirstChildren, getSlot } from '../util';
|
|
15
16
|
import { Layout, LayoutContent, Breadcrumb, Tabs } from 'ant-design-vue';
|
|
16
|
-
|
|
17
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
|
-
}
|
|
17
|
+
import useProLayoutStyle from '../style';
|
|
19
18
|
export var basicLayoutProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultSettingProps), siderMenuProps), baseHeaderProps), headerViewProps), {}, {
|
|
20
19
|
pure: Boolean,
|
|
21
20
|
loading: Boolean,
|
|
@@ -115,6 +114,13 @@ export default defineComponent({
|
|
|
115
114
|
}
|
|
116
115
|
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
117
116
|
});
|
|
117
|
+
var stylePrefixCls = computed(function () {
|
|
118
|
+
return 'pro-layout';
|
|
119
|
+
});
|
|
120
|
+
var _useProLayoutStyle = useProLayoutStyle(stylePrefixCls),
|
|
121
|
+
_useProLayoutStyle2 = _slicedToArray(_useProLayoutStyle, 2),
|
|
122
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
123
|
+
hashId = _useProLayoutStyle2[1];
|
|
118
124
|
var onCollapse = function onCollapse(collapsed) {
|
|
119
125
|
emit('update:collapsed', collapsed);
|
|
120
126
|
emit('collapse', collapsed);
|
|
@@ -152,7 +158,7 @@ export default defineComponent({
|
|
|
152
158
|
return "".concat(props.prefixCls, "-basicLayout");
|
|
153
159
|
});
|
|
154
160
|
var className = computed(function () {
|
|
155
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, baseClassName.value, true), "".concat(baseClassName.value, "-top-menu"), isTop.value), "".concat(baseClassName.value, "-is-children"), props.isChildrenLayout), "".concat(baseClassName.value, "-fix-siderbar"), props.fixSiderbar), "".concat(baseClassName.value, "-").concat(props.layout), props.layout), "".concat(baseClassName.value, "-").concat(props.layoutType), props.layoutType);
|
|
161
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, baseClassName.value, true), "".concat(baseClassName.value, "-top-menu"), isTop.value), "".concat(baseClassName.value, "-is-children"), props.isChildrenLayout), "".concat(baseClassName.value, "-fix-siderbar"), props.fixSiderbar), "".concat(baseClassName.value, "-").concat(props.layout), props.layout), "".concat(baseClassName.value, "-").concat(props.layoutType), props.layoutType), hashId.value, true);
|
|
156
162
|
});
|
|
157
163
|
var genLayoutStyle = reactive({
|
|
158
164
|
position: 'relative'
|
|
@@ -246,7 +252,6 @@ export default defineComponent({
|
|
|
246
252
|
return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
247
253
|
}
|
|
248
254
|
if (props.layoutType === LayoutType.LIST) {
|
|
249
|
-
var _slot;
|
|
250
255
|
var _slots$default2;
|
|
251
256
|
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
252
257
|
"class": className.value
|
|
@@ -273,13 +278,13 @@ export default defineComponent({
|
|
|
273
278
|
"onSelect": onSelect,
|
|
274
279
|
"onOpenKeys": onOpenKeys,
|
|
275
280
|
"onMenuClick": onMenuClick
|
|
276
|
-
}), null), _createVNode(Layout, null,
|
|
277
|
-
default: function _default() {
|
|
278
|
-
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
279
|
-
}
|
|
280
|
-
})) ? _slot : {
|
|
281
|
+
}), null), _createVNode(Layout, null, {
|
|
281
282
|
default: function _default() {
|
|
282
|
-
return [
|
|
283
|
+
return [_createVNode(LayoutContent, null, {
|
|
284
|
+
default: function _default() {
|
|
285
|
+
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
286
|
+
}
|
|
287
|
+
})];
|
|
283
288
|
}
|
|
284
289
|
})];
|
|
285
290
|
}
|
|
@@ -326,7 +331,6 @@ export default defineComponent({
|
|
|
326
331
|
})]);
|
|
327
332
|
} else {
|
|
328
333
|
var _slots$default4;
|
|
329
|
-
var _slot2, _slot3;
|
|
330
334
|
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
331
335
|
"class": className.value
|
|
332
336
|
}, [_createVNode(Layout, null, {
|
|
@@ -354,32 +358,32 @@ export default defineComponent({
|
|
|
354
358
|
padding: 0,
|
|
355
359
|
height: '40px'
|
|
356
360
|
}, props.pageHeaderStyle || {})
|
|
357
|
-
}, _isSlot(_slot2 = _createVNode(Tabs, {
|
|
358
|
-
"hide-add": true,
|
|
359
|
-
"type": "editable-card",
|
|
360
|
-
"class": "history-tabs",
|
|
361
|
-
"id": 'history-route-tabs',
|
|
362
|
-
"tabBarStyle": {
|
|
363
|
-
margin: 0
|
|
364
|
-
},
|
|
365
|
-
"onTabClick": onTabClick,
|
|
366
|
-
"onEdit": onTabEdit,
|
|
367
|
-
"activeKey": props.historyActive,
|
|
368
|
-
"onChange": onTabChange
|
|
369
361
|
}, {
|
|
370
362
|
default: function _default() {
|
|
371
|
-
return [
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
363
|
+
return [_createVNode(Tabs, {
|
|
364
|
+
"hide-add": true,
|
|
365
|
+
"type": "editable-card",
|
|
366
|
+
"class": "history-tabs",
|
|
367
|
+
"id": "history-route-tabs",
|
|
368
|
+
"tabBarStyle": {
|
|
369
|
+
margin: 0
|
|
370
|
+
},
|
|
371
|
+
"onTabClick": onTabClick,
|
|
372
|
+
"onEdit": onTabEdit,
|
|
373
|
+
"activeKey": props.historyActive,
|
|
374
|
+
"onChange": onTabChange
|
|
375
|
+
}, {
|
|
376
|
+
default: function _default() {
|
|
377
|
+
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
378
|
+
return _createVNode(Tabs.TabPane, {
|
|
379
|
+
"key": item.name,
|
|
380
|
+
"tab": item.label,
|
|
381
|
+
"closable": true
|
|
382
|
+
}, null);
|
|
383
|
+
})];
|
|
384
|
+
}
|
|
377
385
|
})];
|
|
378
386
|
}
|
|
379
|
-
})) ? _slot2 : {
|
|
380
|
-
default: function _default() {
|
|
381
|
-
return [_slot2];
|
|
382
|
-
}
|
|
383
387
|
}), _createVNode(LayoutContent, {
|
|
384
388
|
"style": {
|
|
385
389
|
flex: '1 1 0',
|
|
@@ -393,13 +397,13 @@ export default defineComponent({
|
|
|
393
397
|
"style": _objectSpread({
|
|
394
398
|
padding: '11px 24px'
|
|
395
399
|
}, props.pageFooterStyle || {})
|
|
396
|
-
}, _isSlot(_slot3 = _createVNode(Breadcrumb, {
|
|
397
|
-
"routes": breadcrumb.value.routes
|
|
398
400
|
}, {
|
|
399
|
-
itemRender: breadcrumb.value.itemRender
|
|
400
|
-
})) ? _slot3 : {
|
|
401
401
|
default: function _default() {
|
|
402
|
-
return [
|
|
402
|
+
return [_createVNode(Breadcrumb, {
|
|
403
|
+
"routes": breadcrumb.value.routes
|
|
404
|
+
}, {
|
|
405
|
+
itemRender: breadcrumb.value.itemRender
|
|
406
|
+
})];
|
|
403
407
|
}
|
|
404
408
|
})];
|
|
405
409
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
export var genBasicLayoutStyle = function genBasicLayoutStyle(config) {
|
|
3
|
+
var componentCls = config.componentCls,
|
|
4
|
+
token = config.token;
|
|
5
|
+
var basicLayoutPrefixCls = "".concat(token.antCls, "-pro-basicLayout");
|
|
6
|
+
var proLayoutHeaderHeight = '48px';
|
|
7
|
+
return _defineProperty({}, "".concat(basicLayoutPrefixCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
width: '100%',
|
|
11
|
+
minHeight: '100%'
|
|
12
|
+
}, "".concat(token.antCls, "-layout-header"), _defineProperty({}, "&".concat(token.antCls, "-pro-fixed-header"), {
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
top: 0
|
|
15
|
+
})), "".concat(basicLayoutPrefixCls, "-content"), _defineProperty(_defineProperty(_defineProperty({
|
|
16
|
+
position: 'relative',
|
|
17
|
+
margin: '24px'
|
|
18
|
+
}, "".concat(token.antCls, "-pro-page-container"), {
|
|
19
|
+
margin: '-24px -24px 0'
|
|
20
|
+
}), "".concat(basicLayoutPrefixCls, "-content-disable-margin"), _defineProperty({
|
|
21
|
+
margin: 0
|
|
22
|
+
}, "".concat(token.antCls, "-pro-page-container"), {
|
|
23
|
+
margin: 0
|
|
24
|
+
})), "> ".concat(token.antCls, "-layout"), {
|
|
25
|
+
maxHeight: '100%'
|
|
26
|
+
})), "".concat(basicLayoutPrefixCls, "-is-children").concat(basicLayoutPrefixCls, "-fix-siderbar"), {
|
|
27
|
+
height: '100vh',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
transform: 'rotate(0)'
|
|
30
|
+
}), "".concat(basicLayoutPrefixCls, "-has-header"), _defineProperty({
|
|
31
|
+
'.tech-page-container': {
|
|
32
|
+
height: "calc(100vh - ".concat(proLayoutHeaderHeight, " - ").concat(proLayoutHeaderHeight, ")")
|
|
33
|
+
}
|
|
34
|
+
}, "".concat(basicLayoutPrefixCls, "-is-children"), _defineProperty({
|
|
35
|
+
minHeight: "calc(100vh - ".concat(proLayoutHeaderHeight, ")")
|
|
36
|
+
}, "&".concat(basicLayoutPrefixCls, "-fix-siderbar"), {
|
|
37
|
+
height: "calc(100vh - ".concat(proLayoutHeaderHeight, ")")
|
|
38
|
+
}))));
|
|
39
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode, Fragment as _Fragment
|
|
1
|
+
import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import { baseHeaderProps, TopNavHeader } from '../TopHeader';
|
|
@@ -7,9 +7,6 @@ import { defineComponent, computed, toRefs } from 'vue';
|
|
|
7
7
|
import { useRouteContext } from '../RouteContext';
|
|
8
8
|
import { Layout } from 'ant-design-vue';
|
|
9
9
|
import { LayoutType } from "../defaultSettings";
|
|
10
|
-
function _isSlot(s) {
|
|
11
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
12
|
-
}
|
|
13
10
|
export var headerViewProps = _objectSpread(_objectSpread({}, baseHeaderProps), {}, {
|
|
14
11
|
headerRender: {
|
|
15
12
|
type: [Object, Function, Boolean],
|
|
@@ -77,7 +74,6 @@ export default defineComponent({
|
|
|
77
74
|
return 0;
|
|
78
75
|
});
|
|
79
76
|
return function () {
|
|
80
|
-
var _slot;
|
|
81
77
|
return _createVNode(_Fragment, null, [needFixedHeader.value && _createVNode(Layout.Header, {
|
|
82
78
|
"style": {
|
|
83
79
|
height: "".concat(headerHeight.value, "px"),
|
|
@@ -94,9 +90,9 @@ export default defineComponent({
|
|
|
94
90
|
right: right.value
|
|
95
91
|
},
|
|
96
92
|
"class": className.value
|
|
97
|
-
},
|
|
93
|
+
}, {
|
|
98
94
|
default: function _default() {
|
|
99
|
-
return [
|
|
95
|
+
return [renderContent()];
|
|
100
96
|
}
|
|
101
97
|
})]);
|
|
102
98
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
export var genHeaderStyle = function genHeaderStyle(config) {
|
|
3
|
+
var componentCls = config.componentCls,
|
|
4
|
+
token = config.token;
|
|
5
|
+
var proLayoutFixedHeaderPrefixCls = "".concat(token.antCls, "-pro-fixed-header");
|
|
6
|
+
return _defineProperty({}, "".concat(proLayoutFixedHeaderPrefixCls), {
|
|
7
|
+
zIndex: 9,
|
|
8
|
+
width: '100%'
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -2,22 +2,20 @@ import { Fragment as _Fragment } from "vue";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
import { createVNode as _createVNode
|
|
5
|
+
import { createVNode as _createVNode } from "vue";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
7
|
var _excluded = ["title", "tabList", "tabActiveKey", "content", "pageHeaderRender", "header", "extraContent", "prefixedClassName", "prefixCls", "fixedHeader", "showBack"];
|
|
8
|
-
import { withInstall } from
|
|
8
|
+
import { withInstall } from "ant-design-vue/es/_util/type";
|
|
9
9
|
import { Affix, Spin, PageHeader, Tabs, Button } from 'ant-design-vue';
|
|
10
10
|
import { defineComponent, unref, toRefs, computed } from 'vue';
|
|
11
|
-
import { pageHeaderProps } from
|
|
11
|
+
import { pageHeaderProps } from "ant-design-vue/es/page-header";
|
|
12
12
|
import { useRouteContext } from '../RouteContext';
|
|
13
13
|
import { getSlotVNode } from '../util';
|
|
14
|
-
import
|
|
14
|
+
import "ant-design-vue/es/_util/type";
|
|
15
15
|
import 'ant-design-vue/es/_util/vue-types';
|
|
16
16
|
import { LayoutType } from "../defaultSettings";
|
|
17
17
|
import { useLocaleReceiver } from "../../LocaleReciver";
|
|
18
|
-
|
|
19
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
20
|
-
}
|
|
18
|
+
import useProLayoutStyle from '../style';
|
|
21
19
|
export var pageHeaderTabConfig = {
|
|
22
20
|
/**
|
|
23
21
|
* @name tabs 的列表
|
|
@@ -153,7 +151,6 @@ var renderFooter = function renderFooter(props) {
|
|
|
153
151
|
}, [item.tab]);
|
|
154
152
|
};
|
|
155
153
|
if (tabList && tabList.length) {
|
|
156
|
-
var _slot;
|
|
157
154
|
return _createVNode(Tabs, _objectSpread({
|
|
158
155
|
"class": "page-container-tabs",
|
|
159
156
|
"activeKey": tabActiveKey,
|
|
@@ -163,14 +160,14 @@ var renderFooter = function renderFooter(props) {
|
|
|
163
160
|
}
|
|
164
161
|
},
|
|
165
162
|
"tabBarExtraContent": tabBarExtraContent
|
|
166
|
-
}, tabProps),
|
|
167
|
-
return _createVNode(Tabs.TabPane, _objectSpread(_objectSpread({}, item), {}, {
|
|
168
|
-
"tab": tabPane(item),
|
|
169
|
-
"key": item.key
|
|
170
|
-
}), null);
|
|
171
|
-
})) ? _slot : {
|
|
163
|
+
}, tabProps), {
|
|
172
164
|
default: function _default() {
|
|
173
|
-
return [
|
|
165
|
+
return [tabList.map(function (item) {
|
|
166
|
+
return _createVNode(Tabs.TabPane, _objectSpread(_objectSpread({}, item), {}, {
|
|
167
|
+
"tab": tabPane(item),
|
|
168
|
+
"key": item.key
|
|
169
|
+
}), null);
|
|
170
|
+
})];
|
|
174
171
|
}
|
|
175
172
|
});
|
|
176
173
|
}
|
|
@@ -277,11 +274,18 @@ var PageContainer = defineComponent({
|
|
|
277
274
|
var value = useRouteContext();
|
|
278
275
|
var getPrefixCls = value.getPrefixCls;
|
|
279
276
|
var prefixCls = props.prefixCls || getPrefixCls();
|
|
277
|
+
var stylePrefixCls = computed(function () {
|
|
278
|
+
return 'pro-layout';
|
|
279
|
+
});
|
|
280
|
+
var _useProLayoutStyle = useProLayoutStyle(stylePrefixCls),
|
|
281
|
+
_useProLayoutStyle2 = _slicedToArray(_useProLayoutStyle, 2),
|
|
282
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
283
|
+
hashId = _useProLayoutStyle2[1];
|
|
280
284
|
var prefixedClassName = computed(function () {
|
|
281
285
|
return "".concat(prefixCls, "-page-container");
|
|
282
286
|
});
|
|
283
287
|
var classNames = computed(function () {
|
|
284
|
-
return _defineProperty(_defineProperty({}, prefixedClassName.value, true), "".concat(prefixCls, "-page-container-ghost"), ghost.value);
|
|
288
|
+
return _defineProperty(_defineProperty(_defineProperty({}, hashId.value, true), prefixedClassName.value, true), "".concat(prefixCls, "-page-container-ghost"), ghost.value);
|
|
285
289
|
});
|
|
286
290
|
var headerDom = computed(function () {
|
|
287
291
|
// const tags = getSlotVNode<DefaultPropRender>(slots, props, 'tags');
|
|
@@ -320,7 +324,7 @@ var PageContainer = defineComponent({
|
|
|
320
324
|
}) : headerDom.value, _createVNode("div", {
|
|
321
325
|
"class": "".concat(prefixedClassName.value, "-grid-content")
|
|
322
326
|
}, [loading.value ? _createVNode(Spin, null, null) : slots.default ? _createVNode("div", null, [_createVNode("div", {
|
|
323
|
-
"class": "".concat(prefixedClassName.value, "-children-content ").concat(childrenFullHeight.value ? 'children-full-height' : ''),
|
|
327
|
+
"class": "".concat(prefixedClassName.value, "-children-content ").concat(childrenFullHeight.value ? 'children-full-height' : '', " ").concat(hashId.value),
|
|
324
328
|
"style": _objectSpread({}, props.contentStyle || {})
|
|
325
329
|
}, [slots.default()]), value.hasFooterToolbar && _createVNode("div", {
|
|
326
330
|
"style": {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
export var genPageContainerStyle = function genPageContainerStyle(config) {
|
|
3
|
+
var token = config.token;
|
|
4
|
+
var proLayoutPageContainerCls = "".concat(token.antCls, "-pro-page-container");
|
|
5
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(proLayoutPageContainerCls, "-children-content"), {
|
|
6
|
+
margin: '24px 24px 0'
|
|
7
|
+
}), "".concat(proLayoutPageContainerCls), _defineProperty(_defineProperty({}, "".concat(proLayoutPageContainerCls, "-warp"), _defineProperty({
|
|
8
|
+
backgroundColor: token.colorBgContainer
|
|
9
|
+
}, "".concat(token.antCls, "-tabs-bar"), {
|
|
10
|
+
margin: 0
|
|
11
|
+
})), "".concat(proLayoutPageContainerCls, "-ghost"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-warp"), {
|
|
12
|
+
backgroundColor: token.colorBgContainer
|
|
13
|
+
}))), "".concat(proLayoutPageContainerCls, "-main"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(proLayoutPageContainerCls, "-detail"), {
|
|
14
|
+
display: 'flex'
|
|
15
|
+
}), "".concat(proLayoutPageContainerCls, "-row"), {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
width: '100%'
|
|
18
|
+
}), "".concat(proLayoutPageContainerCls, "-title-content"), {
|
|
19
|
+
marginBottom: '16px'
|
|
20
|
+
}), "".concat(proLayoutPageContainerCls, "-title,").concat(proLayoutPageContainerCls, "-content"), {
|
|
21
|
+
flex: 'auto'
|
|
22
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent,").concat(proLayoutPageContainerCls, "-main"), {
|
|
23
|
+
flex: '0 1 auto'
|
|
24
|
+
}), "".concat(proLayoutPageContainerCls, "-title"), {
|
|
25
|
+
marginBottom: '16px'
|
|
26
|
+
}), "".concat(proLayoutPageContainerCls, "-logo"), {
|
|
27
|
+
marginBottom: '16px'
|
|
28
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
29
|
+
minWidth: '242px',
|
|
30
|
+
marginLeft: '88px',
|
|
31
|
+
textAlign: 'right'
|
|
32
|
+
})), "@media screen and (max-width: ".concat(token.screenXl, "px)"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-main"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
33
|
+
marginLeft: '44px'
|
|
34
|
+
}))), "@media screen and (max-width: ".concat(token.screenLG, "px)"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-main"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
35
|
+
marginLeft: '20px'
|
|
36
|
+
}))), "@media screen and (max-width: ".concat(token.screenMD, "px)"), _defineProperty({}, "".concat(proLayoutPageContainerCls, "-main"), _defineProperty(_defineProperty({}, "".concat(proLayoutPageContainerCls, "-row"), {
|
|
37
|
+
display: 'block'
|
|
38
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent,").concat(proLayoutPageContainerCls, "-action"), {
|
|
39
|
+
marginLeft: 0,
|
|
40
|
+
textAlign: 'left'
|
|
41
|
+
}))), "@media screen and (max-width: ".concat(token.screenSM, "px)"), _defineProperty(_defineProperty({}, "".concat(proLayoutPageContainerCls, "-detail"), {
|
|
42
|
+
display: 'block'
|
|
43
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
44
|
+
marginLeft: 0
|
|
45
|
+
}));
|
|
46
|
+
};
|