@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,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/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 ? 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
|
});
|
|
@@ -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/lib/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-1755080510772"), 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';
|
package/lib/Icon/icon.js
CHANGED
|
@@ -11,7 +11,8 @@ 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
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
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; }
|
|
15
16
|
var MyIcon = (0, _iconsVue.createFromIconfontCN)({
|
|
16
17
|
scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
|
|
17
18
|
});
|
|
@@ -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,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");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
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,6 +21,7 @@ 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; }
|
|
24
25
|
var definedProps = (0, _objectSpread2.default)({
|
|
25
26
|
tooltip: {
|
|
26
27
|
type: Object
|
|
@@ -83,15 +84,15 @@ var PermissionButton = (0, _vue.defineComponent)({
|
|
|
83
84
|
noPermissionTitle = props.noPermissionTitle,
|
|
84
85
|
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
85
86
|
if (popConfirm) {
|
|
86
|
-
buttonProps.onClick = /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/
|
|
87
|
+
buttonProps.onClick = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
87
88
|
var _props$popConfirmBefo;
|
|
88
89
|
var _popConfirm;
|
|
89
|
-
return
|
|
90
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
90
91
|
while (1) switch (_context.prev = _context.next) {
|
|
91
92
|
case 0:
|
|
92
|
-
_context.next =
|
|
93
|
+
_context.next = 2;
|
|
93
94
|
return ((_props$popConfirmBefo = props.popConfirmBefore) === null || _props$popConfirmBefo === void 0 ? void 0 : _props$popConfirmBefo.call(props)) || popConfirm;
|
|
94
|
-
case
|
|
95
|
+
case 2:
|
|
95
96
|
_popConfirm = _context.sent;
|
|
96
97
|
if (context.components) {
|
|
97
98
|
(0, _confirm.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _popConfirm), {}, {
|
|
@@ -111,7 +112,7 @@ var PermissionButton = (0, _vue.defineComponent)({
|
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
case
|
|
115
|
+
case 4:
|
|
115
116
|
case "end":
|
|
116
117
|
return _context.stop();
|
|
117
118
|
}
|
|
@@ -20,7 +20,11 @@ var _RouteContext = require("../RouteContext");
|
|
|
20
20
|
var _util = require("../util");
|
|
21
21
|
var _lib = require("ant-design-vue/lib/");
|
|
22
22
|
var _excluded = ["pure", "onCollapse", "onOpenKeys", "onSelect", "onMenuClick"];
|
|
23
|
-
function
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
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
|
+
}
|
|
24
28
|
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), {}, {
|
|
25
29
|
pure: Boolean,
|
|
26
30
|
loading: Boolean,
|
|
@@ -251,6 +255,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
251
255
|
return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
252
256
|
}
|
|
253
257
|
if (props.layoutType === _defaultSettings.LayoutType.LIST) {
|
|
258
|
+
var _slot;
|
|
254
259
|
var _slots$default2;
|
|
255
260
|
return (0, _vue.createVNode)(_vue.Fragment, null, [(0, _vue.createVNode)("div", {
|
|
256
261
|
"class": className.value
|
|
@@ -277,13 +282,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
277
282
|
"onSelect": onSelect,
|
|
278
283
|
"onOpenKeys": onOpenKeys,
|
|
279
284
|
"onMenuClick": onMenuClick
|
|
280
|
-
}), null), (0, _vue.createVNode)(_lib.Layout, null, {
|
|
285
|
+
}), null), (0, _vue.createVNode)(_lib.Layout, null, _isSlot(_slot = (0, _vue.createVNode)(_lib.LayoutContent, null, {
|
|
281
286
|
default: function _default() {
|
|
282
|
-
return [(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
+
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
288
|
+
}
|
|
289
|
+
})) ? _slot : {
|
|
290
|
+
default: function _default() {
|
|
291
|
+
return [_slot];
|
|
287
292
|
}
|
|
288
293
|
})];
|
|
289
294
|
}
|
|
@@ -330,6 +335,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
330
335
|
})]);
|
|
331
336
|
} else {
|
|
332
337
|
var _slots$default4;
|
|
338
|
+
var _slot2, _slot3;
|
|
333
339
|
return (0, _vue.createVNode)(_vue.Fragment, null, [(0, _vue.createVNode)("div", {
|
|
334
340
|
"class": className.value
|
|
335
341
|
}, [(0, _vue.createVNode)(_lib.Layout, null, {
|
|
@@ -357,32 +363,32 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
357
363
|
padding: 0,
|
|
358
364
|
height: '40px'
|
|
359
365
|
}, props.pageHeaderStyle || {})
|
|
366
|
+
}, _isSlot(_slot2 = (0, _vue.createVNode)(_lib.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
|
|
360
378
|
}, {
|
|
361
379
|
default: function _default() {
|
|
362
|
-
return [(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
margin: 0
|
|
369
|
-
},
|
|
370
|
-
"onTabClick": onTabClick,
|
|
371
|
-
"onEdit": onTabEdit,
|
|
372
|
-
"activeKey": props.historyActive,
|
|
373
|
-
"onChange": onTabChange
|
|
374
|
-
}, {
|
|
375
|
-
default: function _default() {
|
|
376
|
-
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
377
|
-
return (0, _vue.createVNode)(_lib.Tabs.TabPane, {
|
|
378
|
-
"key": item.name,
|
|
379
|
-
"tab": item.label,
|
|
380
|
-
"closable": true
|
|
381
|
-
}, null);
|
|
382
|
-
})];
|
|
383
|
-
}
|
|
380
|
+
return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
|
|
381
|
+
return (0, _vue.createVNode)(_lib.Tabs.TabPane, {
|
|
382
|
+
"key": item.name,
|
|
383
|
+
"tab": item.label,
|
|
384
|
+
"closable": true
|
|
385
|
+
}, null);
|
|
384
386
|
})];
|
|
385
387
|
}
|
|
388
|
+
})) ? _slot2 : {
|
|
389
|
+
default: function _default() {
|
|
390
|
+
return [_slot2];
|
|
391
|
+
}
|
|
386
392
|
}), (0, _vue.createVNode)(_lib.LayoutContent, {
|
|
387
393
|
"style": {
|
|
388
394
|
flex: '1 1 0',
|
|
@@ -396,13 +402,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
396
402
|
"style": (0, _objectSpread2.default)({
|
|
397
403
|
padding: '11px 24px'
|
|
398
404
|
}, props.pageFooterStyle || {})
|
|
405
|
+
}, _isSlot(_slot3 = (0, _vue.createVNode)(_lib.Breadcrumb, {
|
|
406
|
+
"routes": breadcrumb.value.routes
|
|
399
407
|
}, {
|
|
408
|
+
itemRender: breadcrumb.value.itemRender
|
|
409
|
+
})) ? _slot3 : {
|
|
400
410
|
default: function _default() {
|
|
401
|
-
return [
|
|
402
|
-
"routes": breadcrumb.value.routes
|
|
403
|
-
}, {
|
|
404
|
-
itemRender: breadcrumb.value.itemRender
|
|
405
|
-
})];
|
|
411
|
+
return [_slot3];
|
|
406
412
|
}
|
|
407
413
|
})];
|
|
408
414
|
}
|
|
@@ -13,6 +13,9 @@ var _vueTypes = _interopRequireDefault(require("ant-design-vue/lib/_util/vue-typ
|
|
|
13
13
|
var _RouteContext = require("../RouteContext");
|
|
14
14
|
var _lib = require("ant-design-vue/lib/");
|
|
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
|
+
}
|
|
16
19
|
var headerViewProps = exports.headerViewProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _TopHeader.baseHeaderProps), {}, {
|
|
17
20
|
headerRender: {
|
|
18
21
|
type: [Object, Function, Boolean],
|
|
@@ -80,6 +83,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
80
83
|
return 0;
|
|
81
84
|
});
|
|
82
85
|
return function () {
|
|
86
|
+
var _slot;
|
|
83
87
|
return (0, _vue.createVNode)(_vue.Fragment, null, [needFixedHeader.value && (0, _vue.createVNode)(_lib.Layout.Header, {
|
|
84
88
|
"style": {
|
|
85
89
|
height: "".concat(headerHeight.value, "px"),
|
|
@@ -96,9 +100,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
96
100
|
right: right.value
|
|
97
101
|
},
|
|
98
102
|
"class": className.value
|
|
99
|
-
}, {
|
|
103
|
+
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
100
104
|
default: function _default() {
|
|
101
|
-
return [
|
|
105
|
+
return [_slot];
|
|
102
106
|
}
|
|
103
107
|
})]);
|
|
104
108
|
};
|
|
@@ -19,6 +19,9 @@ require("ant-design-vue/lib/_util/vue-types");
|
|
|
19
19
|
var _defaultSettings = require("../defaultSettings");
|
|
20
20
|
var _LocaleReciver = require("../../LocaleReciver");
|
|
21
21
|
var _excluded = ["title", "tabList", "tabActiveKey", "content", "pageHeaderRender", "header", "extraContent", "prefixedClassName", "prefixCls", "fixedHeader", "showBack"];
|
|
22
|
+
function _isSlot(s) {
|
|
23
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
24
|
+
}
|
|
22
25
|
var pageHeaderTabConfig = exports.pageHeaderTabConfig = {
|
|
23
26
|
/**
|
|
24
27
|
* @name tabs 的列表
|
|
@@ -154,6 +157,7 @@ var renderFooter = function renderFooter(props) {
|
|
|
154
157
|
}, [item.tab]);
|
|
155
158
|
};
|
|
156
159
|
if (tabList && tabList.length) {
|
|
160
|
+
var _slot;
|
|
157
161
|
return (0, _vue.createVNode)(_lib.Tabs, (0, _objectSpread2.default)({
|
|
158
162
|
"class": "page-container-tabs",
|
|
159
163
|
"activeKey": tabActiveKey,
|
|
@@ -163,14 +167,14 @@ var renderFooter = function renderFooter(props) {
|
|
|
163
167
|
}
|
|
164
168
|
},
|
|
165
169
|
"tabBarExtraContent": tabBarExtraContent
|
|
166
|
-
}, tabProps), {
|
|
170
|
+
}, tabProps), _isSlot(_slot = tabList.map(function (item) {
|
|
171
|
+
return (0, _vue.createVNode)(_lib.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
172
|
+
"tab": tabPane(item),
|
|
173
|
+
"key": item.key
|
|
174
|
+
}), null);
|
|
175
|
+
})) ? _slot : {
|
|
167
176
|
default: function _default() {
|
|
168
|
-
return [
|
|
169
|
-
return (0, _vue.createVNode)(_lib.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
170
|
-
"tab": tabPane(item),
|
|
171
|
-
"key": item.key
|
|
172
|
-
}), null);
|
|
173
|
-
})];
|
|
177
|
+
return [_slot];
|
|
174
178
|
}
|
|
175
179
|
});
|
|
176
180
|
}
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.baseMenuProps = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _vue = require("vue");
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
var _vue = require("vue");
|
|
13
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
14
|
var _defaultSettings = require("../defaultSettings");
|
|
15
15
|
var _RouteContext = require("../RouteContext");
|
|
@@ -17,6 +17,9 @@ var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
|
17
17
|
var _utils = require("@jetlinks-web/utils");
|
|
18
18
|
var _lib = require("ant-design-vue/lib/");
|
|
19
19
|
var _iconsVue = require("@ant-design/icons-vue/lib/icons");
|
|
20
|
+
function _isSlot(s) {
|
|
21
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
22
|
+
}
|
|
20
23
|
var baseMenuProps = exports.baseMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
|
|
21
24
|
prefixCls: {
|
|
22
25
|
type: String,
|
|
@@ -120,7 +123,8 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
120
123
|
});
|
|
121
124
|
(0, _defineProperty2.default)(this, "getSubMenuOrItem", function (item) {
|
|
122
125
|
var _item$meta, _item$meta2, _item$meta7, _item$meta8;
|
|
123
|
-
if (Array.isArray(item.children) && item.children.length > 0 && !(item
|
|
126
|
+
if (Array.isArray(item.children) && item.children.length > 0 && !(item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.hideInMenu) && !(item === null || item === void 0 ? void 0 : (_item$meta2 = item.meta) === null || _item$meta2 === void 0 ? void 0 : _item$meta2.hideChildrenInMenu)) {
|
|
127
|
+
var _slot;
|
|
124
128
|
var _item$meta3, _item$meta4, _item$meta5, _item$meta6;
|
|
125
129
|
if (_this.props.subMenuItemRender) {
|
|
126
130
|
var subMenuItemRender = (0, _vue.withCtx)(_this.props.subMenuItemRender, _this.ctx);
|
|
@@ -133,13 +137,21 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
133
137
|
prefixCls = _this$props.prefixCls,
|
|
134
138
|
locale = _this$props.locale;
|
|
135
139
|
var menuTitle = locale && locale((_item$meta3 = item.meta) === null || _item$meta3 === void 0 ? void 0 : _item$meta3.title) || ((_item$meta4 = item.meta) === null || _item$meta4 === void 0 ? void 0 : _item$meta4.title);
|
|
136
|
-
var defaultTitle = (_item$meta5 = item.meta)
|
|
140
|
+
var defaultTitle = ((_item$meta5 = item.meta) === null || _item$meta5 === void 0 ? void 0 : _item$meta5.icon) ? (0, _vue.createVNode)("span", {
|
|
137
141
|
"class": "".concat(prefixCls, "-menu-item")
|
|
138
142
|
}, [(0, _vue.createVNode)("span", {
|
|
139
143
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
140
|
-
},
|
|
144
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
145
|
+
default: function _default() {
|
|
146
|
+
return [menuTitle];
|
|
147
|
+
}
|
|
148
|
+
})]) : (0, _vue.createVNode)("span", {
|
|
141
149
|
"class": "".concat(prefixCls, "-menu-item")
|
|
142
|
-
},
|
|
150
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
151
|
+
default: function _default() {
|
|
152
|
+
return [menuTitle];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
143
155
|
return (0, _vue.createVNode)(_lib.Menu.SubMenu, {
|
|
144
156
|
"title": defaultTitle,
|
|
145
157
|
"key": item.path,
|
|
@@ -148,9 +160,9 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
148
160
|
"iconUrl": _this.props.iconfontUrl,
|
|
149
161
|
"icon": (_item$meta6 = item.meta) === null || _item$meta6 === void 0 ? void 0 : _item$meta6.icon
|
|
150
162
|
}, null)
|
|
151
|
-
}, {
|
|
163
|
+
}, _isSlot(_slot = _this.getNavMenuItems(item.children)) ? _slot : {
|
|
152
164
|
default: function _default() {
|
|
153
|
-
return [
|
|
165
|
+
return [_slot];
|
|
154
166
|
}
|
|
155
167
|
});
|
|
156
168
|
}
|
|
@@ -167,14 +179,15 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
167
179
|
"disabled": (_item$meta7 = item.meta) === null || _item$meta7 === void 0 ? void 0 : _item$meta7.disabled,
|
|
168
180
|
"danger": (_item$meta8 = item.meta) === null || _item$meta8 === void 0 ? void 0 : _item$meta8.danger,
|
|
169
181
|
"key": item.path
|
|
170
|
-
}, {
|
|
182
|
+
}, _isSlot(title) ? title : {
|
|
171
183
|
default: function _default() {
|
|
172
184
|
return [title];
|
|
173
185
|
}
|
|
174
186
|
});
|
|
175
187
|
});
|
|
176
188
|
(0, _defineProperty2.default)(this, "getMenuItem", function (item) {
|
|
177
|
-
var
|
|
189
|
+
var _slot2;
|
|
190
|
+
var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
|
|
178
191
|
var meta = (0, _objectSpread2.default)({}, item.meta);
|
|
179
192
|
var target = meta.target || null;
|
|
180
193
|
var hasUrl = _utils.regular.isUrl(item.path);
|
|
@@ -193,22 +206,30 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
193
206
|
locale = _this$props2.locale;
|
|
194
207
|
var icon = ((_item$meta9 = item.meta) === null || _item$meta9 === void 0 ? void 0 : _item$meta9.icon) && (0, _vue.createVNode)(LazyIcon, {
|
|
195
208
|
"iconUrl": _this.props.iconfontUrl,
|
|
196
|
-
"icon": (_item$
|
|
209
|
+
"icon": (_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.icon
|
|
197
210
|
}, null) || undefined;
|
|
198
|
-
var menuTitle = locale && locale((_item$
|
|
199
|
-
var defaultTitle = (_item$
|
|
211
|
+
var menuTitle = locale && locale((_item$meta11 = item.meta) === null || _item$meta11 === void 0 ? void 0 : _item$meta11.title) || ((_item$meta12 = item.meta) === null || _item$meta12 === void 0 ? void 0 : _item$meta12.title);
|
|
212
|
+
var defaultTitle = ((_item$meta13 = item.meta) === null || _item$meta13 === void 0 ? void 0 : _item$meta13.icon) ? (0, _vue.createVNode)(CustomTag, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, attrs), props), {}, {
|
|
200
213
|
"class": "".concat(prefixCls, "-menu-item")
|
|
201
214
|
}), {
|
|
202
215
|
default: function _default() {
|
|
203
216
|
return [icon, (0, _vue.createVNode)("span", {
|
|
204
217
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
205
|
-
},
|
|
218
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
219
|
+
default: function _default() {
|
|
220
|
+
return [menuTitle];
|
|
221
|
+
}
|
|
222
|
+
})];
|
|
206
223
|
}
|
|
207
224
|
}) : (0, _vue.createVNode)(CustomTag, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, attrs), props), {}, {
|
|
208
225
|
"class": "".concat(prefixCls, "-menu-item")
|
|
209
|
-
}), {
|
|
226
|
+
}), _isSlot(_slot2 = (0, _vue.createVNode)("span", null, _isSlot(menuTitle) ? menuTitle : {
|
|
227
|
+
default: function _default() {
|
|
228
|
+
return [menuTitle];
|
|
229
|
+
}
|
|
230
|
+
})) ? _slot2 : {
|
|
210
231
|
default: function _default() {
|
|
211
|
-
return [
|
|
232
|
+
return [_slot2];
|
|
212
233
|
}
|
|
213
234
|
});
|
|
214
235
|
return [defaultTitle, icon];
|
|
@@ -246,6 +267,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
246
267
|
emit('click', args);
|
|
247
268
|
};
|
|
248
269
|
return function () {
|
|
270
|
+
var _slot3;
|
|
249
271
|
return (0, _vue.createVNode)(_lib.Menu, (0, _objectSpread2.default)({
|
|
250
272
|
"key": "Menu",
|
|
251
273
|
"inlineIndent": 16,
|
|
@@ -256,9 +278,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
256
278
|
"onOpenChange": handleOpenChange,
|
|
257
279
|
"onSelect": handleSelect,
|
|
258
280
|
"onClick": handleClick
|
|
259
|
-
}, props.menuProps), {
|
|
281
|
+
}, props.menuProps), _isSlot(_slot3 = menuUtil.getNavMenuItems(props.menuData)) ? _slot3 : {
|
|
260
282
|
default: function _default() {
|
|
261
|
-
return [
|
|
283
|
+
return [_slot3];
|
|
262
284
|
}
|
|
263
285
|
});
|
|
264
286
|
};
|