@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,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.genMenuStyle = void 0;
|
|
7
|
+
var genMenuStyle = exports.genMenuStyle = function genMenuStyle(config) {
|
|
8
|
+
var token = config.token;
|
|
9
|
+
return {
|
|
10
|
+
'.jetlinks-edit-table-context-menu': {
|
|
11
|
+
position: 'fixed',
|
|
12
|
+
boxShadow: '0 0 12px rgba(0, 0, 0 ,.2)',
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
width: '192px',
|
|
16
|
+
padding: '4px',
|
|
17
|
+
backgroundColor: '#fff',
|
|
18
|
+
'.ant-menu': {
|
|
19
|
+
borderRight: 'none',
|
|
20
|
+
'.ant-menu-item': {
|
|
21
|
+
margin: 0,
|
|
22
|
+
height: '32px',
|
|
23
|
+
'&.danger': {
|
|
24
|
+
color: token.colorError
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
'.ant-menu-item-active': {
|
|
29
|
+
backgroundColor: 'var(--ant-primary-1)'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.genTableStyle = void 0;
|
|
7
|
+
var genTableStyle = exports.genTableStyle = function genTableStyle(config) {
|
|
8
|
+
var token = config.token;
|
|
9
|
+
return {
|
|
10
|
+
'.jetlinks-edit-table-wrapper': {
|
|
11
|
+
background: '#fff',
|
|
12
|
+
height: '100%',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
'&.table-full-screen': {
|
|
15
|
+
padding: 24
|
|
16
|
+
},
|
|
17
|
+
'.jetlinks-edit-table': {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexDirection: 'column',
|
|
20
|
+
flexGrow: 0,
|
|
21
|
+
flexShrink: 0,
|
|
22
|
+
background: '#fafafa',
|
|
23
|
+
transition: 'background-color .3s ease',
|
|
24
|
+
overflow: 'auto hidden',
|
|
25
|
+
'.jetlinks-edit-table-header': {
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
width: '100%'
|
|
28
|
+
},
|
|
29
|
+
'.jetlinks-edit-table-body': {
|
|
30
|
+
backgroundColor: '#fff',
|
|
31
|
+
overflowY: 'hidden',
|
|
32
|
+
position: 'relative',
|
|
33
|
+
height: '100%',
|
|
34
|
+
width: '100%',
|
|
35
|
+
flex: '1 1 auto',
|
|
36
|
+
flexDirection: 'row'
|
|
37
|
+
},
|
|
38
|
+
'.jetlinks-table-horizontal-scroll': {
|
|
39
|
+
width: '100%',
|
|
40
|
+
height: '15px',
|
|
41
|
+
minHeight: '15px',
|
|
42
|
+
maxHeight: '15px',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
'.jetlinks-table-horizontal-scroll-bar': {
|
|
45
|
+
height: '100%',
|
|
46
|
+
overflowX: 'scroll'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
package/lib/EditTable/utils.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.isFullScreen = exports.handlePureRecord = exports.handleColumnsWidth = exports.collectValidateRules = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
7
9
|
var _lodashEs = require("lodash");
|
|
8
10
|
/**
|
|
9
11
|
* 规则收集器,收集columns中的rules和watch
|
|
@@ -12,9 +14,35 @@ var _lodashEs = require("lodash");
|
|
|
12
14
|
var collectValidateRules = exports.collectValidateRules = function collectValidateRules(columns) {
|
|
13
15
|
var rules = {};
|
|
14
16
|
columns.forEach(function (item) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
var _item$form;
|
|
18
|
+
if ((_item$form = item.form) !== null && _item$form !== void 0 && _item$form.rules) {
|
|
19
|
+
var currentLevel = rules; // 从最顶层开始构建
|
|
20
|
+
var field = item.form.field || item.dataIndex;
|
|
21
|
+
var parts = Array.isArray(field) ? field : String(field).split(',');
|
|
22
|
+
for (var i = 0; i < parts.length; i++) {
|
|
23
|
+
var part = parts[i];
|
|
24
|
+
if (i === parts.length - 1) {
|
|
25
|
+
// 这是最深层的叶子节点
|
|
26
|
+
currentLevel[part] = (0, _toConsumableArray2.default)(item.form.rules);
|
|
27
|
+
} else {
|
|
28
|
+
// 这是中间的父节点(例如 'prop1' 或 'type')
|
|
29
|
+
if (!currentLevel[part]) {
|
|
30
|
+
// 如果当前层级还没有这个属性,就把它定义为一个对象
|
|
31
|
+
currentLevel[part] = {
|
|
32
|
+
type: 'object',
|
|
33
|
+
fields: {}
|
|
34
|
+
};
|
|
35
|
+
} else if (currentLevel[part].type !== 'object') {
|
|
36
|
+
// 如果已经存在但不是对象类型,可能是之前被错误定义为叶子节点,修正它
|
|
37
|
+
console.warn("Warning: '".concat(parts.slice(0, i + 1).join('.'), "' was expected to be an object but has other rules. Overwriting."));
|
|
38
|
+
currentLevel[part] = {
|
|
39
|
+
type: 'object',
|
|
40
|
+
fields: {}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// 进入下一层级,继续构建 `fields`
|
|
44
|
+
currentLevel = currentLevel[part].fields;
|
|
45
|
+
}
|
|
18
46
|
}
|
|
19
47
|
}
|
|
20
48
|
});
|
package/lib/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,3 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _styleRegister = _interopRequireDefault(require("../../style/styleRegister"));
|
|
9
|
+
var genEllipsisStyle = function genEllipsisStyle(config) {
|
|
10
|
+
var token = config.token;
|
|
11
|
+
return {
|
|
12
|
+
'.j-ellipsis': {
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
verticalAlign: 'bottom'
|
|
15
|
+
},
|
|
16
|
+
'.j-ellipsis-cursor': {
|
|
17
|
+
cursor: 'pointer'
|
|
18
|
+
},
|
|
19
|
+
'.j-ellipsis-line-clamp': {
|
|
20
|
+
display: '-webkit-box',
|
|
21
|
+
'-webkit-box-orient': 'vertical',
|
|
22
|
+
wordBreak: 'break-all'
|
|
23
|
+
},
|
|
24
|
+
'.j-ellipsis-deep': {
|
|
25
|
+
maxHeight: '380px',
|
|
26
|
+
'-webkit-line-clamp': 17,
|
|
27
|
+
textOverflow: 'ellipsis'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
var _default = exports.default = (0, _styleRegister.default)([genEllipsisStyle]);
|
package/lib/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-1747107044026"), 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';
|
package/lib/Icon/icon.js
CHANGED
|
@@ -11,8 +11,7 @@ var _vue = require("vue");
|
|
|
11
11
|
var _iconsVue = _interopRequireWildcard(require("@ant-design/icons-vue/lib/icons"));
|
|
12
12
|
var aIcon = _iconsVue;
|
|
13
13
|
var _constants = require("../utils/constants");
|
|
14
|
-
function
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
15
|
var MyIcon = (0, _iconsVue.createFromIconfontCN)({
|
|
17
16
|
scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
|
|
18
17
|
});
|
|
@@ -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,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.destroyFns = exports.default = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -21,7 +21,6 @@ var _confirm = _interopRequireDefault(require("./confirm"));
|
|
|
21
21
|
var _constants = require("../utils/constants");
|
|
22
22
|
var _LocaleReciver = require("../LocaleReciver");
|
|
23
23
|
var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
|
|
24
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
25
24
|
var definedProps = (0, _objectSpread2.default)({
|
|
26
25
|
tooltip: {
|
|
27
26
|
type: Object
|
|
@@ -84,15 +83,15 @@ var PermissionButton = (0, _vue.defineComponent)({
|
|
|
84
83
|
noPermissionTitle = props.noPermissionTitle,
|
|
85
84
|
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
86
85
|
if (popConfirm) {
|
|
87
|
-
buttonProps.onClick = /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
86
|
+
buttonProps.onClick = /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
88
87
|
var _props$popConfirmBefo;
|
|
89
88
|
var _popConfirm;
|
|
90
|
-
return
|
|
89
|
+
return _regenerator.default.wrap(function (_context) {
|
|
91
90
|
while (1) switch (_context.prev = _context.next) {
|
|
92
91
|
case 0:
|
|
93
|
-
_context.next =
|
|
92
|
+
_context.next = 1;
|
|
94
93
|
return ((_props$popConfirmBefo = props.popConfirmBefore) === null || _props$popConfirmBefo === void 0 ? void 0 : _props$popConfirmBefo.call(props)) || popConfirm;
|
|
95
|
-
case
|
|
94
|
+
case 1:
|
|
96
95
|
_popConfirm = _context.sent;
|
|
97
96
|
if (context.components) {
|
|
98
97
|
(0, _confirm.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _popConfirm), {}, {
|
|
@@ -112,7 +111,7 @@ var PermissionButton = (0, _vue.defineComponent)({
|
|
|
112
111
|
}
|
|
113
112
|
});
|
|
114
113
|
}
|
|
115
|
-
case
|
|
114
|
+
case 2:
|
|
116
115
|
case "end":
|
|
117
116
|
return _context.stop();
|
|
118
117
|
}
|
|
@@ -9,22 +9,20 @@ exports.default = exports.basicLayoutProps = void 0;
|
|
|
9
9
|
var _vue = require("vue");
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
14
|
var _SiderMenu = _interopRequireWildcard(require("../SiderMenu/SiderMenu"));
|
|
14
15
|
var _defaultSettings = require("../defaultSettings");
|
|
15
16
|
var _TopHeader = require("../TopHeader");
|
|
16
17
|
var _Header = _interopRequireWildcard(require("./Header"));
|
|
17
|
-
var _useConfigInject2 = _interopRequireDefault(require("ant-design-vue/
|
|
18
|
+
var _useConfigInject2 = _interopRequireDefault(require("ant-design-vue/lib/config-provider/hooks/useConfigInject"));
|
|
18
19
|
var _lodashEs = require("lodash");
|
|
19
20
|
var _RouteContext = require("../RouteContext");
|
|
20
21
|
var _util = require("../util");
|
|
21
22
|
var _antDesignVue = require("ant-design-vue");
|
|
23
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
22
24
|
var _excluded = ["pure", "onCollapse", "onOpenKeys", "onSelect", "onMenuClick"];
|
|
23
|
-
function
|
|
24
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
-
function _isSlot(s) {
|
|
26
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
27
|
-
}
|
|
25
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
26
|
var basicLayoutProps = exports.basicLayoutProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), _SiderMenu.siderMenuProps), _TopHeader.baseHeaderProps), _Header.headerViewProps), {}, {
|
|
29
27
|
pure: Boolean,
|
|
30
28
|
loading: Boolean,
|
|
@@ -124,6 +122,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
124
122
|
}
|
|
125
123
|
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
126
124
|
});
|
|
125
|
+
var stylePrefixCls = (0, _vue.computed)(function () {
|
|
126
|
+
return 'pro-layout';
|
|
127
|
+
});
|
|
128
|
+
var _useProLayoutStyle = (0, _style.default)(stylePrefixCls),
|
|
129
|
+
_useProLayoutStyle2 = (0, _slicedToArray2.default)(_useProLayoutStyle, 2),
|
|
130
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
131
|
+
hashId = _useProLayoutStyle2[1];
|
|
127
132
|
var onCollapse = function onCollapse(collapsed) {
|
|
128
133
|
emit('update:collapsed', collapsed);
|
|
129
134
|
emit('collapse', collapsed);
|
|
@@ -161,7 +166,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
161
166
|
return "".concat(props.prefixCls, "-basicLayout");
|
|
162
167
|
});
|
|
163
168
|
var className = (0, _vue.computed)(function () {
|
|
164
|
-
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, 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);
|
|
169
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, 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);
|
|
165
170
|
});
|
|
166
171
|
var genLayoutStyle = (0, _vue.reactive)({
|
|
167
172
|
position: 'relative'
|
|
@@ -255,7 +260,6 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
255
260
|
return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
256
261
|
}
|
|
257
262
|
if (props.layoutType === _defaultSettings.LayoutType.LIST) {
|
|
258
|
-
var _slot;
|
|
259
263
|
var _slots$default2;
|
|
260
264
|
return (0, _vue.createVNode)(_vue.Fragment, null, [(0, _vue.createVNode)("div", {
|
|
261
265
|
"class": className.value
|
|
@@ -282,13 +286,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
282
286
|
"onSelect": onSelect,
|
|
283
287
|
"onOpenKeys": onOpenKeys,
|
|
284
288
|
"onMenuClick": onMenuClick
|
|
285
|
-
}), null), (0, _vue.createVNode)(_antDesignVue.Layout, null,
|
|
286
|
-
default: function _default() {
|
|
287
|
-
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
288
|
-
}
|
|
289
|
-
})) ? _slot : {
|
|
289
|
+
}), null), (0, _vue.createVNode)(_antDesignVue.Layout, null, {
|
|
290
290
|
default: function _default() {
|
|
291
|
-
return [
|
|
291
|
+
return [(0, _vue.createVNode)(_antDesignVue.LayoutContent, null, {
|
|
292
|
+
default: function _default() {
|
|
293
|
+
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
294
|
+
}
|
|
295
|
+
})];
|
|
292
296
|
}
|
|
293
297
|
})];
|
|
294
298
|
}
|
|
@@ -335,7 +339,6 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
335
339
|
})]);
|
|
336
340
|
} else {
|
|
337
341
|
var _slots$default4;
|
|
338
|
-
var _slot2, _slot3;
|
|
339
342
|
return (0, _vue.createVNode)(_vue.Fragment, null, [(0, _vue.createVNode)("div", {
|
|
340
343
|
"class": className.value
|
|
341
344
|
}, [(0, _vue.createVNode)(_antDesignVue.Layout, null, {
|
|
@@ -363,32 +366,32 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
363
366
|
padding: 0,
|
|
364
367
|
height: '40px'
|
|
365
368
|
}, props.pageHeaderStyle || {})
|
|
366
|
-
}, _isSlot(_slot2 = (0, _vue.createVNode)(_antDesignVue.Tabs, {
|
|
367
|
-
"hide-add": true,
|
|
368
|
-
"type": "editable-card",
|
|
369
|
-
"class": "history-tabs",
|
|
370
|
-
"id": 'history-route-tabs',
|
|
371
|
-
"tabBarStyle": {
|
|
372
|
-
margin: 0
|
|
373
|
-
},
|
|
374
|
-
"onTabClick": onTabClick,
|
|
375
|
-
"onEdit": onTabEdit,
|
|
376
|
-
"activeKey": props.historyActive,
|
|
377
|
-
"onChange": onTabChange
|
|
378
369
|
}, {
|
|
379
370
|
default: function _default() {
|
|
380
|
-
return [
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
371
|
+
return [(0, _vue.createVNode)(_antDesignVue.Tabs, {
|
|
372
|
+
"hide-add": true,
|
|
373
|
+
"type": "editable-card",
|
|
374
|
+
"class": "history-tabs",
|
|
375
|
+
"id": "history-route-tabs",
|
|
376
|
+
"tabBarStyle": {
|
|
377
|
+
margin: 0
|
|
378
|
+
},
|
|
379
|
+
"onTabClick": onTabClick,
|
|
380
|
+
"onEdit": onTabEdit,
|
|
381
|
+
"activeKey": props.historyActive,
|
|
382
|
+
"onChange": onTabChange
|
|
383
|
+
}, {
|
|
384
|
+
default: function _default() {
|
|
385
|
+
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
386
|
+
return (0, _vue.createVNode)(_antDesignVue.Tabs.TabPane, {
|
|
387
|
+
"key": item.name,
|
|
388
|
+
"tab": item.label,
|
|
389
|
+
"closable": true
|
|
390
|
+
}, null);
|
|
391
|
+
})];
|
|
392
|
+
}
|
|
386
393
|
})];
|
|
387
394
|
}
|
|
388
|
-
})) ? _slot2 : {
|
|
389
|
-
default: function _default() {
|
|
390
|
-
return [_slot2];
|
|
391
|
-
}
|
|
392
395
|
}), (0, _vue.createVNode)(_antDesignVue.LayoutContent, {
|
|
393
396
|
"style": {
|
|
394
397
|
flex: '1 1 0',
|
|
@@ -402,13 +405,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
402
405
|
"style": (0, _objectSpread2.default)({
|
|
403
406
|
padding: '11px 24px'
|
|
404
407
|
}, props.pageFooterStyle || {})
|
|
405
|
-
}, _isSlot(_slot3 = (0, _vue.createVNode)(_antDesignVue.Breadcrumb, {
|
|
406
|
-
"routes": breadcrumb.value.routes
|
|
407
408
|
}, {
|
|
408
|
-
itemRender: breadcrumb.value.itemRender
|
|
409
|
-
})) ? _slot3 : {
|
|
410
409
|
default: function _default() {
|
|
411
|
-
return [
|
|
410
|
+
return [(0, _vue.createVNode)(_antDesignVue.Breadcrumb, {
|
|
411
|
+
"routes": breadcrumb.value.routes
|
|
412
|
+
}, {
|
|
413
|
+
itemRender: breadcrumb.value.itemRender
|
|
414
|
+
})];
|
|
412
415
|
}
|
|
413
416
|
})];
|
|
414
417
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genBasicLayoutStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genBasicLayoutStyle = exports.genBasicLayoutStyle = function genBasicLayoutStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls,
|
|
11
|
+
token = config.token;
|
|
12
|
+
var basicLayoutPrefixCls = "".concat(token.antCls, "-pro-basicLayout");
|
|
13
|
+
var proLayoutHeaderHeight = '48px';
|
|
14
|
+
return (0, _defineProperty2.default)({}, "".concat(basicLayoutPrefixCls), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
width: '100%',
|
|
18
|
+
minHeight: '100%'
|
|
19
|
+
}, "".concat(token.antCls, "-layout-header"), (0, _defineProperty2.default)({}, "&".concat(token.antCls, "-pro-fixed-header"), {
|
|
20
|
+
position: 'fixed',
|
|
21
|
+
top: 0
|
|
22
|
+
})), "".concat(basicLayoutPrefixCls, "-content"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
23
|
+
position: 'relative',
|
|
24
|
+
margin: '24px'
|
|
25
|
+
}, "".concat(token.antCls, "-pro-page-container"), {
|
|
26
|
+
margin: '-24px -24px 0'
|
|
27
|
+
}), "".concat(basicLayoutPrefixCls, "-content-disable-margin"), (0, _defineProperty2.default)({
|
|
28
|
+
margin: 0
|
|
29
|
+
}, "".concat(token.antCls, "-pro-page-container"), {
|
|
30
|
+
margin: 0
|
|
31
|
+
})), "> ".concat(token.antCls, "-layout"), {
|
|
32
|
+
maxHeight: '100%'
|
|
33
|
+
})), "".concat(basicLayoutPrefixCls, "-is-children").concat(basicLayoutPrefixCls, "-fix-siderbar"), {
|
|
34
|
+
height: '100vh',
|
|
35
|
+
overflow: 'hidden',
|
|
36
|
+
transform: 'rotate(0)'
|
|
37
|
+
}), "".concat(basicLayoutPrefixCls, "-has-header"), (0, _defineProperty2.default)({
|
|
38
|
+
'.tech-page-container': {
|
|
39
|
+
height: "calc(100vh - ".concat(proLayoutHeaderHeight, " - ").concat(proLayoutHeaderHeight, ")")
|
|
40
|
+
}
|
|
41
|
+
}, "".concat(basicLayoutPrefixCls, "-is-children"), (0, _defineProperty2.default)({
|
|
42
|
+
minHeight: "calc(100vh - ".concat(proLayoutHeaderHeight, ")")
|
|
43
|
+
}, "&".concat(basicLayoutPrefixCls, "-fix-siderbar"), {
|
|
44
|
+
height: "calc(100vh - ".concat(proLayoutHeaderHeight, ")")
|
|
45
|
+
}))));
|
|
46
|
+
};
|
|
@@ -13,9 +13,6 @@ var _vueTypes = _interopRequireDefault(require("ant-design-vue/es/_util/vue-type
|
|
|
13
13
|
var _RouteContext = require("../RouteContext");
|
|
14
14
|
var _antDesignVue = require("ant-design-vue");
|
|
15
15
|
var _defaultSettings = require("../defaultSettings");
|
|
16
|
-
function _isSlot(s) {
|
|
17
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
18
|
-
}
|
|
19
16
|
var headerViewProps = exports.headerViewProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _TopHeader.baseHeaderProps), {}, {
|
|
20
17
|
headerRender: {
|
|
21
18
|
type: [Object, Function, Boolean],
|
|
@@ -83,7 +80,6 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
83
80
|
return 0;
|
|
84
81
|
});
|
|
85
82
|
return function () {
|
|
86
|
-
var _slot;
|
|
87
83
|
return (0, _vue.createVNode)(_vue.Fragment, null, [needFixedHeader.value && (0, _vue.createVNode)(_antDesignVue.Layout.Header, {
|
|
88
84
|
"style": {
|
|
89
85
|
height: "".concat(headerHeight.value, "px"),
|
|
@@ -100,9 +96,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
100
96
|
right: right.value
|
|
101
97
|
},
|
|
102
98
|
"class": className.value
|
|
103
|
-
},
|
|
99
|
+
}, {
|
|
104
100
|
default: function _default() {
|
|
105
|
-
return [
|
|
101
|
+
return [renderContent()];
|
|
106
102
|
}
|
|
107
103
|
})]);
|
|
108
104
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genHeaderStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genHeaderStyle = exports.genHeaderStyle = function genHeaderStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls,
|
|
11
|
+
token = config.token;
|
|
12
|
+
var proLayoutFixedHeaderPrefixCls = "".concat(token.antCls, "-pro-fixed-header");
|
|
13
|
+
return (0, _defineProperty2.default)({}, "".concat(proLayoutFixedHeaderPrefixCls), {
|
|
14
|
+
zIndex: 9,
|
|
15
|
+
width: '100%'
|
|
16
|
+
});
|
|
17
|
+
};
|