@jetlinks-web/components 2.7.1 → 2.7.3
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 +2 -1
- package/es/CardSelect/style/index.css +24 -0
- package/es/CardSelect/style/index.less +26 -0
- package/es/CheckButton/CheckButton.js +2 -1
- package/es/CheckButton/style/index.css +37 -0
- package/es/CheckButton/style/index.less +40 -0
- package/es/DragModal/DragModal.js +1 -0
- package/es/DragModal/style/index.css +82 -0
- package/es/DragModal/style/index.less +97 -0
- package/es/Echarts/Echarts.js +2 -1
- package/es/EditTable/EditTable.js +6 -4
- package/es/EditTable/FormItem.js +1 -0
- 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 +10 -7
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.less +66 -0
- package/es/EditTable/style/form.less +33 -0
- package/es/EditTable/style/group.less +32 -0
- package/es/EditTable/style/header.less +77 -0
- package/es/EditTable/style/index.css +267 -0
- package/es/EditTable/style/index.less +41 -0
- package/es/EditTable/style/menu.less +25 -0
- package/es/EditTable/style/table.less +47 -0
- package/es/EditTable/utils.js +1 -1
- package/es/Ellipsis/style/index.css +17 -0
- package/es/Ellipsis/style/index.less +20 -0
- package/es/FullPage/FullPage.js +2 -1
- package/es/LocaleProvider/index.js +2 -1
- package/es/MonacoEditor/style/index.css +4 -0
- package/es/MonacoEditor/style/index.less +4 -0
- package/es/PermissionButton/index.js +7 -6
- package/es/ProLayout/Basic/BasicLayout.js +39 -34
- package/es/ProLayout/Basic/BasicLayout.less +66 -0
- package/es/ProLayout/Basic/Header.js +7 -3
- package/es/ProLayout/Basic/Header.less +8 -0
- package/es/ProLayout/PageContainer/index.js +12 -8
- package/es/ProLayout/PageContainer/index.less +103 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +39 -16
- package/es/ProLayout/SiderMenu/SiderMenu.js +34 -14
- package/es/ProLayout/SiderMenu/index.less +231 -0
- package/es/ProLayout/TopHeader/index.js +9 -1
- package/es/ProLayout/TopHeader/index.less +174 -0
- package/es/ProLayout/style/default.less +4 -0
- package/es/ProLayout/style/style.less +7 -0
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Content.js +2 -2
- package/es/ProTable/style/ProTable.less +141 -0
- package/es/RadioButton/RadioButton.js +1 -0
- package/es/RadioButton/style/index.css +20 -0
- package/es/RadioButton/style/index.less +19 -0
- package/es/Scrollbar/style/index.css +65 -0
- package/es/Scrollbar/style/index.less +83 -0
- package/es/Search/Advanced/SaveHistory.js +2 -1
- package/es/Search/Item.js +2 -1
- package/es/Search/style/Item.less +33 -0
- package/es/Search/style/Search.less +179 -0
- package/es/Title/style/index.css +23 -0
- package/es/Title/style/index.less +25 -0
- package/es/Title/title.js +1 -0
- package/es/style/index.css +5197 -0
- package/es/style/index.less +13 -13
- package/es/style/variable.css +4 -0
- package/es/style/variable.less +4 -0
- 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 +2 -1
- package/lib/CardSelect/style/index.css +24 -0
- package/lib/CardSelect/style/index.less +26 -0
- package/lib/CheckButton/CheckButton.js +2 -1
- package/lib/CheckButton/style/index.css +37 -0
- package/lib/CheckButton/style/index.less +40 -0
- package/lib/DragModal/DragModal.js +1 -0
- package/lib/DragModal/style/index.css +82 -0
- package/lib/DragModal/style/index.less +97 -0
- package/lib/Echarts/Echarts.js +2 -1
- package/lib/EditTable/EditTable.js +6 -4
- package/lib/EditTable/FormItem.js +1 -0
- 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 +10 -7
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.less +66 -0
- package/lib/EditTable/style/form.less +33 -0
- package/lib/EditTable/style/group.less +32 -0
- package/lib/EditTable/style/header.less +77 -0
- package/lib/EditTable/style/index.css +267 -0
- package/lib/EditTable/style/index.less +41 -0
- package/lib/EditTable/style/menu.less +25 -0
- package/lib/EditTable/style/table.less +47 -0
- package/lib/EditTable/utils.js +1 -1
- package/lib/Ellipsis/style/index.css +17 -0
- package/lib/Ellipsis/style/index.less +20 -0
- package/lib/FullPage/FullPage.js +2 -1
- package/lib/Icon/icon.js +2 -1
- package/lib/LocaleProvider/index.js +2 -1
- package/lib/MonacoEditor/style/index.css +4 -0
- package/lib/MonacoEditor/style/index.less +4 -0
- package/lib/PermissionButton/index.js +7 -6
- package/lib/ProLayout/Basic/BasicLayout.js +40 -34
- package/lib/ProLayout/Basic/BasicLayout.less +66 -0
- package/lib/ProLayout/Basic/Header.js +6 -2
- package/lib/ProLayout/Basic/Header.less +8 -0
- package/lib/ProLayout/PageContainer/index.js +11 -7
- package/lib/ProLayout/PageContainer/index.less +103 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +39 -17
- package/lib/ProLayout/SiderMenu/SiderMenu.js +35 -14
- package/lib/ProLayout/SiderMenu/index.less +231 -0
- package/lib/ProLayout/TopHeader/index.js +9 -2
- package/lib/ProLayout/TopHeader/index.less +174 -0
- package/lib/ProLayout/style/default.less +4 -0
- package/lib/ProLayout/style/style.less +7 -0
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Content.js +2 -2
- package/lib/ProTable/style/ProTable.less +141 -0
- package/lib/RadioButton/RadioButton.js +1 -0
- package/lib/RadioButton/style/index.css +20 -0
- package/lib/RadioButton/style/index.less +19 -0
- package/lib/Scrollbar/style/index.css +65 -0
- package/lib/Scrollbar/style/index.less +83 -0
- package/lib/Search/Advanced/SaveHistory.js +2 -1
- package/lib/Search/Item.js +2 -1
- package/lib/Search/style/Item.less +33 -0
- package/lib/Search/style/Search.less +179 -0
- package/lib/Title/style/index.css +23 -0
- package/lib/Title/style/index.less +25 -0
- package/lib/Title/title.js +1 -0
- package/lib/components.js +2 -1
- package/lib/index.js +2 -1
- package/lib/style/components.less +9 -0
- package/lib/style/index.css +5197 -0
- package/lib/style/index.less +13 -13
- package/lib/style/variable.css +4 -0
- package/lib/style/variable.less +4 -0
- package/package.json +172 -171
- package/es/CardSelect/style/css.js +0 -1
- package/es/CheckButton/style/css.js +0 -1
- package/es/DragModal/style/css.js +0 -1
- package/es/EditTable/style/css.js +0 -1
- package/es/Ellipsis/style/css.js +0 -1
- package/es/MonacoEditor/style/css.js +0 -1
- package/es/ProLayout/style/css.js +0 -1
- package/es/ProTable/style/css.js +0 -1
- package/es/RadioButton/style/css.js +0 -1
- package/es/Scrollbar/style/css.js +0 -1
- package/es/Search/style/css.js +0 -2
- package/es/Title/style/css.js +0 -1
- package/es/style/css.js +0 -3
- package/lib/CardSelect/style/css.js +0 -3
- package/lib/CheckButton/style/css.js +0 -3
- package/lib/DragModal/style/css.js +0 -3
- package/lib/EditTable/style/css.js +0 -3
- package/lib/Ellipsis/style/css.js +0 -3
- package/lib/MonacoEditor/style/css.js +0 -3
- package/lib/ProLayout/style/css.js +0 -3
- package/lib/ProTable/style/css.js +0 -3
- package/lib/RadioButton/style/css.js +0 -3
- package/lib/Scrollbar/style/css.js +0 -3
- package/lib/Search/style/css.js +0 -4
- package/lib/Title/style/css.js +0 -3
- package/lib/style/css.js +0 -4
|
@@ -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
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import '../style/default.less';
|
|
2
|
+
|
|
3
|
+
.@{basicLayout-prefix-cls} {
|
|
4
|
+
// BFC
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-height: 100%;
|
|
9
|
+
|
|
10
|
+
.@{ant-prefix}-layout-header {
|
|
11
|
+
&.@{ant-prefix}-pro-fixed-header {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-content {
|
|
18
|
+
position: relative;
|
|
19
|
+
margin: 24px;
|
|
20
|
+
|
|
21
|
+
.@{ant-prefix}-pro-page-container {
|
|
22
|
+
margin: -24px -24px 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-disable-margin {
|
|
26
|
+
margin: 0;
|
|
27
|
+
|
|
28
|
+
.@{ant-prefix}-pro-page-container {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> .@{ant-prefix}-layout {
|
|
34
|
+
max-height: 100%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// children should support fixed
|
|
39
|
+
.@{basicLayout-prefix-cls}-is-children.@{basicLayout-prefix-cls}-fix-siderbar {
|
|
40
|
+
height: 100vh;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
transform: rotate(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.@{basicLayout-prefix-cls}-has-header {
|
|
46
|
+
// tech-page-container
|
|
47
|
+
.tech-page-container {
|
|
48
|
+
height: calc(100vh - @pro-layout-header-height);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.@{basicLayout-prefix-cls}-is-children.@{basicLayout-prefix-cls}-has-header {
|
|
52
|
+
.tech-page-container {
|
|
53
|
+
height: calc(100vh - @pro-layout-header-height -
|
|
54
|
+
@pro-layout-header-height);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.@{basicLayout-prefix-cls}-is-children {
|
|
58
|
+
min-height: calc(100vh - @pro-layout-header-height);
|
|
59
|
+
|
|
60
|
+
&.@{basicLayout-prefix-cls}-fix-siderbar {
|
|
61
|
+
height: calc(100vh - @pro-layout-header-height);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@import '../style/default.less';
|
|
2
|
+
|
|
3
|
+
@pro-layout-page-container: ~'@{ant-prefix}-pro-page-container';
|
|
4
|
+
|
|
5
|
+
.@{pro-layout-page-container}-children-content {
|
|
6
|
+
margin: 24px 24px 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.@{pro-layout-page-container} {
|
|
10
|
+
&-warp {
|
|
11
|
+
background-color: @component-background;
|
|
12
|
+
.@{ant-prefix}-tabs-bar {
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
&-ghost {
|
|
17
|
+
.@{pro-layout-page-container}-warp {
|
|
18
|
+
background-color: @component-background;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.@{pro-layout-page-container}-main {
|
|
24
|
+
.@{pro-layout-page-container}-detail {
|
|
25
|
+
display: flex;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.@{pro-layout-page-container}-row {
|
|
29
|
+
display: flex;
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.@{pro-layout-page-container}-title-content {
|
|
34
|
+
margin-bottom: 16px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.@{pro-layout-page-container}-title,
|
|
38
|
+
.@{pro-layout-page-container}-content {
|
|
39
|
+
flex: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.@{pro-layout-page-container}-extraContent,
|
|
43
|
+
.@{pro-layout-page-container}-main {
|
|
44
|
+
flex: 0 1 auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.@{pro-layout-page-container}-main {
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.@{pro-layout-page-container}-title {
|
|
52
|
+
margin-bottom: 16px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.@{pro-layout-page-container}-logo {
|
|
56
|
+
margin-bottom: 16px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.@{pro-layout-page-container}-extraContent {
|
|
60
|
+
min-width: 242px;
|
|
61
|
+
margin-left: 88px;
|
|
62
|
+
text-align: right;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media screen and (max-width: @screen-xl) {
|
|
67
|
+
.@{pro-layout-page-container}-main {
|
|
68
|
+
.@{pro-layout-page-container}-extraContent {
|
|
69
|
+
margin-left: 44px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media screen and (max-width: @screen-lg) {
|
|
75
|
+
.@{pro-layout-page-container}-main {
|
|
76
|
+
.@{pro-layout-page-container}-extraContent {
|
|
77
|
+
margin-left: 20px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media screen and (max-width: @screen-md) {
|
|
83
|
+
.@{pro-layout-page-container}-main {
|
|
84
|
+
.@{pro-layout-page-container}-row {
|
|
85
|
+
display: block;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.@{pro-layout-page-container}-action,
|
|
89
|
+
.@{pro-layout-page-container}-extraContent {
|
|
90
|
+
margin-left: 0;
|
|
91
|
+
text-align: left;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media screen and (max-width: @screen-sm) {
|
|
97
|
+
.@{pro-layout-page-container}-detail {
|
|
98
|
+
display: block;
|
|
99
|
+
}
|
|
100
|
+
.@{pro-layout-page-container}-extraContent {
|
|
101
|
+
margin-left: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { isVNode as _isVNode } from "vue";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
@@ -11,6 +12,9 @@ import IconFont from '../../Icon';
|
|
|
11
12
|
import { regular } from '@jetlinks-web/utils';
|
|
12
13
|
import { Menu } from 'ant-design-vue/es/';
|
|
13
14
|
import { createFromIconfontCN } from '@ant-design/icons-vue';
|
|
15
|
+
function _isSlot(s) {
|
|
16
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
17
|
+
}
|
|
14
18
|
export var baseMenuProps = _objectSpread(_objectSpread({}, defaultSettingProps), {}, {
|
|
15
19
|
prefixCls: {
|
|
16
20
|
type: String,
|
|
@@ -114,7 +118,8 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
|
|
|
114
118
|
});
|
|
115
119
|
_defineProperty(this, "getSubMenuOrItem", function (item) {
|
|
116
120
|
var _item$meta, _item$meta2, _item$meta7, _item$meta8;
|
|
117
|
-
if (Array.isArray(item.children) && item.children.length > 0 && !(item
|
|
121
|
+
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)) {
|
|
122
|
+
var _slot;
|
|
118
123
|
var _item$meta3, _item$meta4, _item$meta5, _item$meta6;
|
|
119
124
|
if (_this.props.subMenuItemRender) {
|
|
120
125
|
var subMenuItemRender = withCtx(_this.props.subMenuItemRender, _this.ctx);
|
|
@@ -127,13 +132,21 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
|
|
|
127
132
|
prefixCls = _this$props.prefixCls,
|
|
128
133
|
locale = _this$props.locale;
|
|
129
134
|
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);
|
|
130
|
-
var defaultTitle = (_item$meta5 = item.meta)
|
|
135
|
+
var defaultTitle = ((_item$meta5 = item.meta) === null || _item$meta5 === void 0 ? void 0 : _item$meta5.icon) ? _createVNode("span", {
|
|
131
136
|
"class": "".concat(prefixCls, "-menu-item")
|
|
132
137
|
}, [_createVNode("span", {
|
|
133
138
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
134
|
-
},
|
|
139
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
140
|
+
default: function _default() {
|
|
141
|
+
return [menuTitle];
|
|
142
|
+
}
|
|
143
|
+
})]) : _createVNode("span", {
|
|
135
144
|
"class": "".concat(prefixCls, "-menu-item")
|
|
136
|
-
},
|
|
145
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
146
|
+
default: function _default() {
|
|
147
|
+
return [menuTitle];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
137
150
|
return _createVNode(Menu.SubMenu, {
|
|
138
151
|
"title": defaultTitle,
|
|
139
152
|
"key": item.path,
|
|
@@ -142,9 +155,9 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
|
|
|
142
155
|
"iconUrl": _this.props.iconfontUrl,
|
|
143
156
|
"icon": (_item$meta6 = item.meta) === null || _item$meta6 === void 0 ? void 0 : _item$meta6.icon
|
|
144
157
|
}, null)
|
|
145
|
-
}, {
|
|
158
|
+
}, _isSlot(_slot = _this.getNavMenuItems(item.children)) ? _slot : {
|
|
146
159
|
default: function _default() {
|
|
147
|
-
return [
|
|
160
|
+
return [_slot];
|
|
148
161
|
}
|
|
149
162
|
});
|
|
150
163
|
}
|
|
@@ -161,14 +174,15 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
|
|
|
161
174
|
"disabled": (_item$meta7 = item.meta) === null || _item$meta7 === void 0 ? void 0 : _item$meta7.disabled,
|
|
162
175
|
"danger": (_item$meta8 = item.meta) === null || _item$meta8 === void 0 ? void 0 : _item$meta8.danger,
|
|
163
176
|
"key": item.path
|
|
164
|
-
}, {
|
|
177
|
+
}, _isSlot(title) ? title : {
|
|
165
178
|
default: function _default() {
|
|
166
179
|
return [title];
|
|
167
180
|
}
|
|
168
181
|
});
|
|
169
182
|
});
|
|
170
183
|
_defineProperty(this, "getMenuItem", function (item) {
|
|
171
|
-
var
|
|
184
|
+
var _slot2;
|
|
185
|
+
var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
|
|
172
186
|
var meta = _objectSpread({}, item.meta);
|
|
173
187
|
var target = meta.target || null;
|
|
174
188
|
var hasUrl = regular.isUrl(item.path);
|
|
@@ -187,22 +201,30 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
|
|
|
187
201
|
locale = _this$props2.locale;
|
|
188
202
|
var icon = ((_item$meta9 = item.meta) === null || _item$meta9 === void 0 ? void 0 : _item$meta9.icon) && _createVNode(LazyIcon, {
|
|
189
203
|
"iconUrl": _this.props.iconfontUrl,
|
|
190
|
-
"icon": (_item$
|
|
204
|
+
"icon": (_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.icon
|
|
191
205
|
}, null) || undefined;
|
|
192
|
-
var menuTitle = locale && locale((_item$
|
|
193
|
-
var defaultTitle = (_item$
|
|
206
|
+
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);
|
|
207
|
+
var defaultTitle = ((_item$meta13 = item.meta) === null || _item$meta13 === void 0 ? void 0 : _item$meta13.icon) ? _createVNode(CustomTag, _objectSpread(_objectSpread(_objectSpread({}, attrs), props), {}, {
|
|
194
208
|
"class": "".concat(prefixCls, "-menu-item")
|
|
195
209
|
}), {
|
|
196
210
|
default: function _default() {
|
|
197
211
|
return [icon, _createVNode("span", {
|
|
198
212
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
199
|
-
},
|
|
213
|
+
}, _isSlot(menuTitle) ? menuTitle : {
|
|
214
|
+
default: function _default() {
|
|
215
|
+
return [menuTitle];
|
|
216
|
+
}
|
|
217
|
+
})];
|
|
200
218
|
}
|
|
201
219
|
}) : _createVNode(CustomTag, _objectSpread(_objectSpread(_objectSpread({}, attrs), props), {}, {
|
|
202
220
|
"class": "".concat(prefixCls, "-menu-item")
|
|
203
|
-
}), {
|
|
221
|
+
}), _isSlot(_slot2 = _createVNode("span", null, _isSlot(menuTitle) ? menuTitle : {
|
|
222
|
+
default: function _default() {
|
|
223
|
+
return [menuTitle];
|
|
224
|
+
}
|
|
225
|
+
})) ? _slot2 : {
|
|
204
226
|
default: function _default() {
|
|
205
|
-
return [
|
|
227
|
+
return [_slot2];
|
|
206
228
|
}
|
|
207
229
|
});
|
|
208
230
|
return [defaultTitle, icon];
|
|
@@ -240,6 +262,7 @@ export default defineComponent({
|
|
|
240
262
|
emit('click', args);
|
|
241
263
|
};
|
|
242
264
|
return function () {
|
|
265
|
+
var _slot3;
|
|
243
266
|
return _createVNode(Menu, _objectSpread({
|
|
244
267
|
"key": "Menu",
|
|
245
268
|
"inlineIndent": 16,
|
|
@@ -250,9 +273,9 @@ export default defineComponent({
|
|
|
250
273
|
"onOpenChange": handleOpenChange,
|
|
251
274
|
"onSelect": handleSelect,
|
|
252
275
|
"onClick": handleClick
|
|
253
|
-
}, props.menuProps), {
|
|
276
|
+
}, props.menuProps), _isSlot(_slot3 = menuUtil.getNavMenuItems(props.menuData)) ? _slot3 : {
|
|
254
277
|
default: function _default() {
|
|
255
|
-
return [
|
|
278
|
+
return [_slot3];
|
|
256
279
|
}
|
|
257
280
|
});
|
|
258
281
|
};
|