@jetlinks-web/components 2.6.24 → 2.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AMap/Map.js +2 -1
- package/es/AutoComplete/AutoComplete.js +1 -0
- package/es/BadgeStatus/Badge.js +2 -1
- package/es/CardSelect/CardSelect.js +7 -1
- package/es/CardSelect/style/index.less +26 -26
- package/es/CheckButton/CheckButton.js +2 -1
- package/es/DragModal/DragModal.js +1 -0
- package/es/Echarts/Echarts.js +2 -1
- package/es/EditTable/EditTable.js +6 -4
- package/es/EditTable/FormItem.js +4 -9
- package/es/EditTable/Header.js +3 -5
- package/es/EditTable/components/ContextMenu/Menu.js +2 -1
- package/es/EditTable/components/Search/search.js +2 -1
- package/es/EditTable/components/Search/sort.js +3 -1
- package/es/EditTable/group.js +12 -11
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/form.less +33 -33
- package/es/EditTable/style/group.less +32 -32
- package/es/EditTable/style/header.less +77 -77
- package/es/EditTable/style/menu.less +25 -25
- package/es/EditTable/utils.js +30 -3
- package/es/Ellipsis/style/index.less +20 -20
- package/es/FlameGraph/FlameGraph.js +4 -5
- package/es/FullPage/FullPage.js +2 -1
- package/es/LocaleProvider/index.js +2 -1
- package/es/PermissionButton/index.js +7 -6
- package/es/ProLayout/Basic/BasicLayout.js +39 -34
- package/es/ProLayout/Basic/Header.js +7 -3
- package/es/ProLayout/PageContainer/index.js +12 -8
- package/es/ProLayout/SiderMenu/BaseMenu.js +39 -16
- package/es/ProLayout/SiderMenu/SiderMenu.js +34 -14
- package/es/ProLayout/SiderMenu/index.less +231 -231
- package/es/ProLayout/TopHeader/index.js +9 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Content.js +2 -2
- package/es/ProTable/hooks/index.js +2 -0
- package/es/RadioButton/RadioButton.js +1 -0
- package/es/Search/Advanced/SaveHistory.js +2 -1
- package/es/Search/Item.js +2 -1
- package/es/Title/title.js +1 -0
- package/es/style/index.css +1 -1
- package/lib/AMap/Map.js +2 -1
- package/lib/AutoComplete/AutoComplete.js +1 -0
- package/lib/BadgeStatus/Badge.js +2 -1
- package/lib/CardSelect/CardSelect.js +7 -1
- package/lib/CardSelect/style/index.less +26 -26
- package/lib/CheckButton/CheckButton.js +2 -1
- package/lib/DragModal/DragModal.js +1 -0
- package/lib/Echarts/Echarts.js +2 -1
- package/lib/EditTable/EditTable.js +6 -4
- package/lib/EditTable/FormItem.js +4 -9
- package/lib/EditTable/Header.js +3 -5
- package/lib/EditTable/components/ContextMenu/Menu.js +2 -1
- package/lib/EditTable/components/Search/search.js +2 -1
- package/lib/EditTable/components/Search/sort.js +3 -1
- package/lib/EditTable/group.js +12 -11
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/form.less +33 -33
- package/lib/EditTable/style/group.less +32 -32
- package/lib/EditTable/style/header.less +77 -77
- package/lib/EditTable/style/menu.less +25 -25
- package/lib/EditTable/utils.js +31 -3
- package/lib/Ellipsis/style/index.less +20 -20
- package/lib/FlameGraph/FlameGraph.js +4 -5
- package/lib/FullPage/FullPage.js +2 -1
- package/lib/Icon/icon.js +2 -1
- package/lib/LocaleProvider/index.js +2 -1
- package/lib/PermissionButton/index.js +7 -6
- package/lib/ProLayout/Basic/BasicLayout.js +40 -34
- package/lib/ProLayout/Basic/Header.js +6 -2
- package/lib/ProLayout/PageContainer/index.js +11 -7
- package/lib/ProLayout/SiderMenu/BaseMenu.js +39 -17
- package/lib/ProLayout/SiderMenu/SiderMenu.js +35 -14
- package/lib/ProLayout/SiderMenu/index.less +231 -231
- package/lib/ProLayout/TopHeader/index.js +9 -2
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Content.js +2 -2
- package/lib/ProTable/hooks/index.js +27 -0
- package/lib/RadioButton/RadioButton.js +1 -0
- package/lib/Search/Advanced/SaveHistory.js +2 -1
- package/lib/Search/Item.js +2 -1
- package/lib/Title/title.js +1 -0
- package/lib/components.js +2 -1
- package/lib/index.js +2 -1
- package/lib/style/index.css +1 -1
- package/package.json +3 -3
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
.jetlinks-edit-table-header-container {
|
|
2
|
-
height: 100%;
|
|
3
|
-
position: relative;
|
|
4
|
-
|
|
5
|
-
.jetlinks-edit-table-header-cell {
|
|
6
|
-
height: 100%;
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
float: left;
|
|
10
|
-
overflow: visible;
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 0;
|
|
13
|
-
|
|
14
|
-
.jetlinks-edit-table-header-cell-box {
|
|
15
|
-
padding: 0 12px;
|
|
16
|
-
width: 100%;
|
|
17
|
-
|
|
18
|
-
&.header-cell-box-tool {
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
align-items: center;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.table-header-cell-title {
|
|
25
|
-
flex: 1;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
gap: 4px;
|
|
30
|
-
|
|
31
|
-
.cell-title-box {
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.header-cell-required {
|
|
37
|
-
color: @error-color;
|
|
38
|
-
padding-left: 8px;
|
|
39
|
-
transform: translateY(3px);
|
|
40
|
-
font-weight: 500;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&::before {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 50%;
|
|
46
|
-
right: 1px;
|
|
47
|
-
width: 1px;
|
|
48
|
-
height: 1.6em;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
background-color: rgba(0,0,0,.06);
|
|
51
|
-
transform: translateY(-50%);
|
|
52
|
-
transition: background-color .3s;
|
|
53
|
-
content: "";
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:not(:last-child) {
|
|
57
|
-
&::before {
|
|
58
|
-
background-color: transparent;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.jetlinks-table-search {
|
|
66
|
-
.jetlinks-table-search-header {
|
|
67
|
-
display: flex;
|
|
68
|
-
justify-content: space-between;
|
|
69
|
-
.jetlinks-drag-modal-footer {
|
|
70
|
-
display: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.jetlinks-table-search-result-total {
|
|
74
|
-
color: @primary-color;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
.jetlinks-edit-table-header-container {
|
|
2
|
+
height: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
|
|
5
|
+
.jetlinks-edit-table-header-cell {
|
|
6
|
+
height: 100%;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
float: left;
|
|
10
|
+
overflow: visible;
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
|
|
14
|
+
.jetlinks-edit-table-header-cell-box {
|
|
15
|
+
padding: 0 12px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
&.header-cell-box-tool {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.table-header-cell-title {
|
|
25
|
+
flex: 1;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
gap: 4px;
|
|
30
|
+
|
|
31
|
+
.cell-title-box {
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.header-cell-required {
|
|
37
|
+
color: @error-color;
|
|
38
|
+
padding-left: 8px;
|
|
39
|
+
transform: translateY(3px);
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::before {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 50%;
|
|
46
|
+
right: 1px;
|
|
47
|
+
width: 1px;
|
|
48
|
+
height: 1.6em;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
background-color: rgba(0,0,0,.06);
|
|
51
|
+
transform: translateY(-50%);
|
|
52
|
+
transition: background-color .3s;
|
|
53
|
+
content: "";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:not(:last-child) {
|
|
57
|
+
&::before {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.jetlinks-table-search {
|
|
66
|
+
.jetlinks-table-search-header {
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
.jetlinks-drag-modal-footer {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.jetlinks-table-search-result-total {
|
|
74
|
+
color: @primary-color;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
.jetlinks-edit-table-context-menu{
|
|
2
|
-
position: fixed;
|
|
3
|
-
box-shadow: 0 0 12px rgba(0, 0, 0 ,.2);
|
|
4
|
-
border-radius: 4px;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
width: 192px;
|
|
7
|
-
padding: 4px;
|
|
8
|
-
background-color: #fff;
|
|
9
|
-
.ant-menu {
|
|
10
|
-
border-right: none;
|
|
11
|
-
|
|
12
|
-
.ant-menu-item {
|
|
13
|
-
margin: 0;
|
|
14
|
-
height: 32px;
|
|
15
|
-
|
|
16
|
-
&.danger {
|
|
17
|
-
color: @error-color;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.ant-menu-item-active {
|
|
23
|
-
background-color: var(--ant-primary-1);;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
.jetlinks-edit-table-context-menu{
|
|
2
|
+
position: fixed;
|
|
3
|
+
box-shadow: 0 0 12px rgba(0, 0, 0 ,.2);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
width: 192px;
|
|
7
|
+
padding: 4px;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
.ant-menu {
|
|
10
|
+
border-right: none;
|
|
11
|
+
|
|
12
|
+
.ant-menu-item {
|
|
13
|
+
margin: 0;
|
|
14
|
+
height: 32px;
|
|
15
|
+
|
|
16
|
+
&.danger {
|
|
17
|
+
color: @error-color;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ant-menu-item-active {
|
|
23
|
+
background-color: var(--ant-primary-1);;
|
|
24
|
+
}
|
|
25
|
+
}
|
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 ? 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
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.j-ellipsis {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
vertical-align: bottom;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.j-ellipsis-cursor {
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.j-ellipsis-line-clamp {
|
|
11
|
-
display: -webkit-box;
|
|
12
|
-
-webkit-box-orient: vertical;
|
|
13
|
-
word-break: break-all;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.j-ellipsis-deep {
|
|
17
|
-
max-height: 380px;
|
|
18
|
-
-webkit-line-clamp: 17;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
}
|
|
1
|
+
.j-ellipsis {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
vertical-align: bottom;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.j-ellipsis-cursor {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.j-ellipsis-line-clamp {
|
|
11
|
+
display: -webkit-box;
|
|
12
|
+
-webkit-box-orient: vertical;
|
|
13
|
+
word-break: break-all;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.j-ellipsis-deep {
|
|
17
|
+
max-height: 380px;
|
|
18
|
+
-webkit-line-clamp: 17;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
}
|
|
@@ -116,11 +116,10 @@ const __sfc_main__ = Object.assign({
|
|
|
116
116
|
onSearch: search
|
|
117
117
|
}),
|
|
118
118
|
_createVNode(_component_a_button, { onClick: invert }, {
|
|
119
|
-
default: _withCtx(() =>
|
|
120
|
-
_createTextVNode("反转"
|
|
121
|
-
])
|
|
122
|
-
_: 1 /* STABLE
|
|
123
|
-
__: [0]
|
|
119
|
+
default: _withCtx(() => [
|
|
120
|
+
_createTextVNode("反转")
|
|
121
|
+
]),
|
|
122
|
+
_: 1 /* STABLE */
|
|
124
123
|
})
|
|
125
124
|
]),
|
|
126
125
|
_: 1 /* STABLE */
|
package/es/FullPage/FullPage.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
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 } from "vue";
|
|
11
|
+
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
12
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755080510765"), n = n(), _popScopeId(), n);
|
|
12
13
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
13
14
|
import { ref, inject } from 'vue';
|
|
14
15
|
import { useElementBounding } from '@vueuse/core';
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
"provide": "setup-const",
|
|
4
4
|
"reactive": "setup-const",
|
|
5
5
|
"watch": "setup-const",
|
|
6
|
+
"defineOptions": "setup-const",
|
|
6
7
|
"defaultLocal": "setup-maybe-ref",
|
|
7
8
|
"props": "setup-reactive-const",
|
|
8
9
|
"state": "setup-reactive-const"
|
|
9
10
|
} */
|
|
10
11
|
import { defineComponent as _defineComponent } from 'vue';
|
|
11
12
|
import { renderSlot as _renderSlot } from "vue";
|
|
12
|
-
import { provide, reactive, watch } from "vue";
|
|
13
|
+
import { provide, reactive, watch, } from "vue";
|
|
13
14
|
import defaultLocal from '../locale/zh-CN';
|
|
14
15
|
const __sfc_main__ = _defineComponent({
|
|
15
16
|
...{
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
7
|
var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
|
|
7
|
-
|
|
8
|
+
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; }
|
|
8
9
|
import { h, defineComponent, computed, inject, getCurrentInstance, toRefs } from "vue";
|
|
9
10
|
import { Button, Tooltip, Modal } from 'ant-design-vue/es/';
|
|
10
11
|
import "ant-design-vue/es";
|
|
@@ -76,15 +77,15 @@ var PermissionButton = defineComponent({
|
|
|
76
77
|
noPermissionTitle = props.noPermissionTitle,
|
|
77
78
|
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
78
79
|
if (popConfirm) {
|
|
79
|
-
buttonProps.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
80
|
+
buttonProps.onClick = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
80
81
|
var _props$popConfirmBefo;
|
|
81
82
|
var _popConfirm;
|
|
82
|
-
return _regeneratorRuntime.wrap(function (_context) {
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
84
|
while (1) switch (_context.prev = _context.next) {
|
|
84
85
|
case 0:
|
|
85
|
-
_context.next =
|
|
86
|
+
_context.next = 2;
|
|
86
87
|
return ((_props$popConfirmBefo = props.popConfirmBefore) === null || _props$popConfirmBefo === void 0 ? void 0 : _props$popConfirmBefo.call(props)) || popConfirm;
|
|
87
|
-
case
|
|
88
|
+
case 2:
|
|
88
89
|
_popConfirm = _context.sent;
|
|
89
90
|
if (context.components) {
|
|
90
91
|
confirm(_objectSpread(_objectSpread({}, _popConfirm), {}, {
|
|
@@ -104,7 +105,7 @@ var PermissionButton = defineComponent({
|
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
|
-
case
|
|
108
|
+
case 4:
|
|
108
109
|
case "end":
|
|
109
110
|
return _context.stop();
|
|
110
111
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode, isVNode as _isVNode, resolveDirective as _resolveDirective } from "vue";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
@@ -13,6 +13,9 @@ import { pick } from 'lodash-es';
|
|
|
13
13
|
import { defaultRouteContext, routeContextInjectKey } from '../RouteContext';
|
|
14
14
|
import { getMenuFirstChildren, getSlot } from '../util';
|
|
15
15
|
import { Layout, LayoutContent, Breadcrumb, Tabs } from 'ant-design-vue/es/';
|
|
16
|
+
function _isSlot(s) {
|
|
17
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
|
+
}
|
|
16
19
|
export var basicLayoutProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultSettingProps), siderMenuProps), baseHeaderProps), headerViewProps), {}, {
|
|
17
20
|
pure: Boolean,
|
|
18
21
|
loading: Boolean,
|
|
@@ -243,6 +246,7 @@ export default defineComponent({
|
|
|
243
246
|
return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
244
247
|
}
|
|
245
248
|
if (props.layoutType === LayoutType.LIST) {
|
|
249
|
+
var _slot;
|
|
246
250
|
var _slots$default2;
|
|
247
251
|
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
248
252
|
"class": className.value
|
|
@@ -269,13 +273,13 @@ export default defineComponent({
|
|
|
269
273
|
"onSelect": onSelect,
|
|
270
274
|
"onOpenKeys": onOpenKeys,
|
|
271
275
|
"onMenuClick": onMenuClick
|
|
272
|
-
}), null), _createVNode(Layout, null, {
|
|
276
|
+
}), null), _createVNode(Layout, null, _isSlot(_slot = _createVNode(LayoutContent, null, {
|
|
273
277
|
default: function _default() {
|
|
274
|
-
return [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
278
|
+
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
279
|
+
}
|
|
280
|
+
})) ? _slot : {
|
|
281
|
+
default: function _default() {
|
|
282
|
+
return [_slot];
|
|
279
283
|
}
|
|
280
284
|
})];
|
|
281
285
|
}
|
|
@@ -322,6 +326,7 @@ export default defineComponent({
|
|
|
322
326
|
})]);
|
|
323
327
|
} else {
|
|
324
328
|
var _slots$default4;
|
|
329
|
+
var _slot2, _slot3;
|
|
325
330
|
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
326
331
|
"class": className.value
|
|
327
332
|
}, [_createVNode(Layout, null, {
|
|
@@ -349,32 +354,32 @@ export default defineComponent({
|
|
|
349
354
|
padding: 0,
|
|
350
355
|
height: '40px'
|
|
351
356
|
}, 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
|
|
352
369
|
}, {
|
|
353
370
|
default: function _default() {
|
|
354
|
-
return [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
margin: 0
|
|
361
|
-
},
|
|
362
|
-
"onTabClick": onTabClick,
|
|
363
|
-
"onEdit": onTabEdit,
|
|
364
|
-
"activeKey": props.historyActive,
|
|
365
|
-
"onChange": onTabChange
|
|
366
|
-
}, {
|
|
367
|
-
default: function _default() {
|
|
368
|
-
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
369
|
-
return _createVNode(Tabs.TabPane, {
|
|
370
|
-
"key": item.name,
|
|
371
|
-
"tab": item.label,
|
|
372
|
-
"closable": true
|
|
373
|
-
}, null);
|
|
374
|
-
})];
|
|
375
|
-
}
|
|
371
|
+
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
372
|
+
return _createVNode(Tabs.TabPane, {
|
|
373
|
+
"key": item.name,
|
|
374
|
+
"tab": item.label,
|
|
375
|
+
"closable": true
|
|
376
|
+
}, null);
|
|
376
377
|
})];
|
|
377
378
|
}
|
|
379
|
+
})) ? _slot2 : {
|
|
380
|
+
default: function _default() {
|
|
381
|
+
return [_slot2];
|
|
382
|
+
}
|
|
378
383
|
}), _createVNode(LayoutContent, {
|
|
379
384
|
"style": {
|
|
380
385
|
flex: '1 1 0',
|
|
@@ -388,13 +393,13 @@ export default defineComponent({
|
|
|
388
393
|
"style": _objectSpread({
|
|
389
394
|
padding: '11px 24px'
|
|
390
395
|
}, props.pageFooterStyle || {})
|
|
396
|
+
}, _isSlot(_slot3 = _createVNode(Breadcrumb, {
|
|
397
|
+
"routes": breadcrumb.value.routes
|
|
391
398
|
}, {
|
|
399
|
+
itemRender: breadcrumb.value.itemRender
|
|
400
|
+
})) ? _slot3 : {
|
|
392
401
|
default: function _default() {
|
|
393
|
-
return [
|
|
394
|
-
"routes": breadcrumb.value.routes
|
|
395
|
-
}, {
|
|
396
|
-
itemRender: breadcrumb.value.itemRender
|
|
397
|
-
})];
|
|
402
|
+
return [_slot3];
|
|
398
403
|
}
|
|
399
404
|
})];
|
|
400
405
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
1
|
+
import { createVNode as _createVNode, Fragment as _Fragment, isVNode as _isVNode } 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,6 +7,9 @@ import { defineComponent, computed, toRefs } from 'vue';
|
|
|
7
7
|
import { useRouteContext } from '../RouteContext';
|
|
8
8
|
import { Layout } from 'ant-design-vue/es/';
|
|
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
|
+
}
|
|
10
13
|
export var headerViewProps = _objectSpread(_objectSpread({}, baseHeaderProps), {}, {
|
|
11
14
|
headerRender: {
|
|
12
15
|
type: [Object, Function, Boolean],
|
|
@@ -74,6 +77,7 @@ export default defineComponent({
|
|
|
74
77
|
return 0;
|
|
75
78
|
});
|
|
76
79
|
return function () {
|
|
80
|
+
var _slot;
|
|
77
81
|
return _createVNode(_Fragment, null, [needFixedHeader.value && _createVNode(Layout.Header, {
|
|
78
82
|
"style": {
|
|
79
83
|
height: "".concat(headerHeight.value, "px"),
|
|
@@ -90,9 +94,9 @@ export default defineComponent({
|
|
|
90
94
|
right: right.value
|
|
91
95
|
},
|
|
92
96
|
"class": className.value
|
|
93
|
-
}, {
|
|
97
|
+
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
94
98
|
default: function _default() {
|
|
95
|
-
return [
|
|
99
|
+
return [_slot];
|
|
96
100
|
}
|
|
97
101
|
})]);
|
|
98
102
|
};
|
|
@@ -2,7 +2,7 @@ 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 } from "vue";
|
|
5
|
+
import { createVNode as _createVNode, isVNode as _isVNode } 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
8
|
import { withInstall } from 'ant-design-vue/es/_util/type';
|
|
@@ -15,6 +15,9 @@ 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
|
+
function _isSlot(s) {
|
|
19
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
20
|
+
}
|
|
18
21
|
export var pageHeaderTabConfig = {
|
|
19
22
|
/**
|
|
20
23
|
* @name tabs 的列表
|
|
@@ -150,6 +153,7 @@ var renderFooter = function renderFooter(props) {
|
|
|
150
153
|
}, [item.tab]);
|
|
151
154
|
};
|
|
152
155
|
if (tabList && tabList.length) {
|
|
156
|
+
var _slot;
|
|
153
157
|
return _createVNode(Tabs, _objectSpread({
|
|
154
158
|
"class": "page-container-tabs",
|
|
155
159
|
"activeKey": tabActiveKey,
|
|
@@ -159,14 +163,14 @@ var renderFooter = function renderFooter(props) {
|
|
|
159
163
|
}
|
|
160
164
|
},
|
|
161
165
|
"tabBarExtraContent": tabBarExtraContent
|
|
162
|
-
}, tabProps), {
|
|
166
|
+
}, tabProps), _isSlot(_slot = tabList.map(function (item) {
|
|
167
|
+
return _createVNode(Tabs.TabPane, _objectSpread(_objectSpread({}, item), {}, {
|
|
168
|
+
"tab": tabPane(item),
|
|
169
|
+
"key": item.key
|
|
170
|
+
}), null);
|
|
171
|
+
})) ? _slot : {
|
|
163
172
|
default: function _default() {
|
|
164
|
-
return [
|
|
165
|
-
return _createVNode(Tabs.TabPane, _objectSpread(_objectSpread({}, item), {}, {
|
|
166
|
-
"tab": tabPane(item),
|
|
167
|
-
"key": item.key
|
|
168
|
-
}), null);
|
|
169
|
-
})];
|
|
173
|
+
return [_slot];
|
|
170
174
|
}
|
|
171
175
|
});
|
|
172
176
|
}
|