@deppon/deppon-template 2.4.24 → 2.5.4
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/README.md +4 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +8 -0
- package/es/pro-dialog/ProDialog.vue.css +39 -2
- package/es/pro-field/ProField.vue.css +39 -2
- package/es/pro-field/components/DatePicker/FieldDatePicker.vue.css +39 -2
- package/es/pro-field/components/Select/FieldSelect.vue.css +39 -2
- package/es/pro-form/ProForm.vue.css +39 -2
- package/es/pro-iframe/ProIframe.vue.css +78 -0
- package/es/pro-iframe/ProIframe.vue.js +7 -0
- package/es/pro-iframe/ProIframe.vue_vue_type_script_setup_true_lang.vue.js +271 -0
- package/es/pro-iframe/ProIframe.vue_vue_type_style_index_0_id_7119d75d_scoped_true_lang.vue.js +1 -0
- package/es/pro-iframe/ProIframeRouteView.vue.js +5 -0
- package/es/pro-iframe/ProIframeRouteView.vue_vue_type_script_setup_true_lang.vue.js +85 -0
- package/es/pro-iframe/buildIframeRouteLocation.d.ts +18 -0
- package/es/pro-iframe/buildIframeRouteLocation.js +34 -0
- package/es/pro-iframe/createIframeRoute.d.ts +33 -0
- package/es/pro-iframe/createIframeRoute.js +46 -0
- package/es/pro-iframe/index.d.ts +43 -0
- package/es/pro-iframe/isInIframeEmbed.d.ts +4 -0
- package/es/pro-iframe/isInIframeEmbed.js +15 -0
- package/es/pro-iframe/resolveIframeSrc.d.ts +19 -0
- package/es/pro-iframe/resolveIframeSrc.js +177 -0
- package/es/pro-iframe/types.d.ts +60 -0
- package/es/pro-layout/ProLayout.vue.css +521 -129
- package/es/pro-layout/ProLayout.vue_vue_type_script_setup_true_lang.vue.js +747 -68
- package/es/pro-layout/ProLayoutColumnsAside.vue.css +62 -0
- package/es/pro-layout/ProLayoutColumnsAside.vue.js +7 -0
- package/es/pro-layout/ProLayoutColumnsAside.vue_vue_type_script_setup_true_lang.vue.js +86 -0
- package/es/pro-layout/ProLayoutColumnsAside.vue_vue_type_style_index_0_id_18647f64_scoped_true_lang.vue.js +1 -0
- package/es/pro-layout/ProLayoutSettingsDrawer.vue.css +140 -0
- package/es/pro-layout/ProLayoutSettingsDrawer.vue.js +7 -0
- package/es/pro-layout/ProLayoutSettingsDrawer.vue_vue_type_script_setup_true_lang.vue.js +280 -0
- package/es/pro-layout/ProLayoutSettingsDrawer.vue_vue_type_style_index_0_id_5b67a386_scoped_true_lang.vue.js +1 -0
- package/es/pro-layout/ProLayoutSettingsFab.vue.css +81 -0
- package/es/pro-layout/ProLayoutSettingsFab.vue.js +7 -0
- package/es/pro-layout/ProLayoutSettingsFab.vue_vue_type_script_setup_true_lang.vue.js +106 -0
- package/es/pro-layout/ProLayoutSettingsFab.vue_vue_type_style_index_0_id_3bf2eb6b_scoped_true_lang.vue.js +1 -0
- package/es/pro-layout/index.d.ts +51 -1
- package/es/pro-layout/index.js +3 -0
- package/es/pro-layout/pro-layout-context.d.ts +8 -0
- package/es/pro-layout/pro-layout-context.js +5 -0
- package/es/pro-layout/proLayoutGlobalColors.d.ts +16 -0
- package/es/pro-layout/proLayoutGlobalColors.js +171 -0
- package/es/pro-layout/proLayoutTheme.d.ts +29 -0
- package/es/pro-layout/proLayoutTheme.js +232 -0
- package/es/pro-layout/types.d.ts +52 -0
- package/es/pro-table/ProTable.vue.css +39 -2
- package/es/pro-table/ProTableColumn.vue.css +39 -2
- package/es/pro-table/ToolBar/ColumnSetting.vue.css +39 -2
- package/es/pro-table/ToolBar/Density.vue.css +39 -2
- package/es/pro-table/ToolBar/Fullscreen.vue.css +39 -2
- package/es/pro-table/ToolBar/index.vue.css +39 -2
- package/es/styles/index.css +39 -2
- package/package.json +6 -6
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import '../_virtual/_rollup-plugin-inject-process-env.js';
|
|
2
2
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
3
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
5
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
|
-
import
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import { useSlots, ref, computed, provide, watch, markRaw, onMounted, onUnmounted, nextTick, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementVNode, createElementBlock, renderSlot, createCommentVNode, createTextVNode, toDisplayString, createVNode, Fragment, renderList, withModifiers, resolveDynamicComponent, withDirectives, mergeProps, vShow, createSlots } from 'vue';
|
|
7
7
|
import { useRouter, useRoute } from '@deppon/deppon-router';
|
|
8
|
-
import { ElContainer, ElHeader, ElMenu, ElMenuItem, ElIcon, ElBadge, ElSubMenu, ElInput, ElButton, ElAside, ElScrollbar, ElTooltip, ElMain, ElFooter } from '@deppon/deppon-ui';
|
|
8
|
+
import { ElContainer, ElHeader, ElMenu, ElMenuItem, ElIcon, ElBadge, ElSubMenu, ElInput, ElButton, ElAside, ElScrollbar, ElTooltip, ElMain, ElFooter, ElMessage } from '@deppon/deppon-ui';
|
|
9
9
|
import { Search, Service, Bell, Close, House, Expand, Fold, ArrowRight, ArrowLeft } from '@deppon/deppon-ui/icons-vue';
|
|
10
10
|
import { isMobile as _isMobile } from '../utils/other.js';
|
|
11
|
+
import './ProLayoutColumnsAside.vue.js';
|
|
12
|
+
import './ProLayoutSettingsFab.vue.js';
|
|
13
|
+
import './ProLayoutSettingsDrawer.vue.js';
|
|
14
|
+
import { proLayoutContextKey } from './pro-layout-context.js';
|
|
15
|
+
import { buildInitialProLayoutThemeConfig, mergeProLayoutTheme, applyProLayoutGlobalColors, applyProLayoutThemeToElement, clearPersistedProLayoutTheme, DEFAULT_PRO_LAYOUT_THEME_CONFIG, persistProLayoutTheme, cloneProLayoutThemeConfig } from './proLayoutTheme.js';
|
|
16
|
+
import script$1 from './ProLayoutSettingsFab.vue_vue_type_script_setup_true_lang.vue.js';
|
|
17
|
+
import script$2 from './ProLayoutColumnsAside.vue_vue_type_script_setup_true_lang.vue.js';
|
|
18
|
+
import script$3 from './ProLayoutSettingsDrawer.vue_vue_type_script_setup_true_lang.vue.js';
|
|
11
19
|
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
20
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15
21
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
22
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
25
|
var _hoisted_1 = {
|
|
18
26
|
"class": "pro-layout__header-content"
|
|
19
27
|
};
|
|
20
28
|
var _hoisted_2 = {
|
|
29
|
+
key: 0,
|
|
21
30
|
"class": "pro-layout__header-left"
|
|
22
31
|
};
|
|
23
32
|
var _hoisted_3 = ["src", "alt"];
|
|
@@ -26,7 +35,7 @@ var _hoisted_4 = {
|
|
|
26
35
|
"class": "pro-layout__header-logo-text"
|
|
27
36
|
};
|
|
28
37
|
var _hoisted_5 = {
|
|
29
|
-
key:
|
|
38
|
+
key: 1,
|
|
30
39
|
"class": "pro-layout__top-menu"
|
|
31
40
|
};
|
|
32
41
|
var _hoisted_6 = {
|
|
@@ -54,58 +63,103 @@ var _hoisted_13 = {
|
|
|
54
63
|
key: 0,
|
|
55
64
|
"class": "pro-layout__sider-header"
|
|
56
65
|
};
|
|
57
|
-
var _hoisted_14 =
|
|
66
|
+
var _hoisted_14 = ["src", "alt"];
|
|
67
|
+
var _hoisted_15 = {
|
|
58
68
|
key: 1,
|
|
69
|
+
"class": "pro-layout__header-logo-text"
|
|
70
|
+
};
|
|
71
|
+
var _hoisted_16 = {
|
|
72
|
+
key: 2,
|
|
59
73
|
"class": "pro-layout__menu-search"
|
|
60
74
|
};
|
|
61
|
-
var
|
|
75
|
+
var _hoisted_17 = {
|
|
62
76
|
key: 0,
|
|
63
77
|
"class": "pro-layout__menu-group"
|
|
64
78
|
};
|
|
65
|
-
var
|
|
79
|
+
var _hoisted_18 = {
|
|
66
80
|
"class": "pro-layout__menu-group-header-left"
|
|
67
81
|
};
|
|
68
|
-
var
|
|
82
|
+
var _hoisted_19 = {
|
|
69
83
|
key: 1,
|
|
70
84
|
"class": "pro-layout__menu-group-title"
|
|
71
85
|
};
|
|
72
|
-
var
|
|
86
|
+
var _hoisted_20 = {
|
|
73
87
|
key: 2,
|
|
74
88
|
"class": "pro-layout__menu-group-title-char"
|
|
75
89
|
};
|
|
76
|
-
var
|
|
90
|
+
var _hoisted_21 = {
|
|
77
91
|
key: 0,
|
|
78
92
|
"class": "pro-layout__menu-group-actions"
|
|
79
93
|
};
|
|
80
|
-
var
|
|
94
|
+
var _hoisted_22 = {
|
|
81
95
|
key: 0,
|
|
82
96
|
"class": "pro-layout__menu-group-count"
|
|
83
97
|
};
|
|
84
|
-
var
|
|
98
|
+
var _hoisted_23 = {
|
|
85
99
|
"class": "pro-layout__menu-group-count-current"
|
|
86
100
|
};
|
|
87
|
-
var
|
|
101
|
+
var _hoisted_24 = {
|
|
88
102
|
"class": "pro-layout__menu-group-count-max"
|
|
89
103
|
};
|
|
90
|
-
var
|
|
104
|
+
var _hoisted_25 = {
|
|
91
105
|
key: 1,
|
|
92
106
|
"class": "pro-layout__menu-item-char"
|
|
93
107
|
};
|
|
94
|
-
var
|
|
108
|
+
var _hoisted_26 = {
|
|
95
109
|
key: 1,
|
|
96
110
|
"class": "pro-layout__menu-item-char"
|
|
97
111
|
};
|
|
98
|
-
var
|
|
112
|
+
var _hoisted_27 = {
|
|
99
113
|
key: 1,
|
|
100
114
|
"class": "pro-layout__menu-item-char"
|
|
101
115
|
};
|
|
102
|
-
var
|
|
116
|
+
var _hoisted_28 = {
|
|
117
|
+
"class": "pro-layout__header-content"
|
|
118
|
+
};
|
|
119
|
+
var _hoisted_29 = {
|
|
120
|
+
key: 0,
|
|
121
|
+
"class": "pro-layout__header-left"
|
|
122
|
+
};
|
|
123
|
+
var _hoisted_30 = ["src", "alt"];
|
|
124
|
+
var _hoisted_31 = {
|
|
125
|
+
key: 1,
|
|
126
|
+
"class": "pro-layout__header-logo-text"
|
|
127
|
+
};
|
|
128
|
+
var _hoisted_32 = {
|
|
129
|
+
key: 1,
|
|
130
|
+
"class": "pro-layout__top-menu"
|
|
131
|
+
};
|
|
132
|
+
var _hoisted_33 = {
|
|
133
|
+
"class": "pro-layout__top-menu-glass"
|
|
134
|
+
};
|
|
135
|
+
var _hoisted_34 = {
|
|
136
|
+
"class": "pro-layout__top-menu-item-label"
|
|
137
|
+
};
|
|
138
|
+
var _hoisted_35 = {
|
|
139
|
+
"class": "pro-layout__top-menu-item-text"
|
|
140
|
+
};
|
|
141
|
+
var _hoisted_36 = {
|
|
142
|
+
"class": "pro-layout__top-menu-item-label"
|
|
143
|
+
};
|
|
144
|
+
var _hoisted_37 = {
|
|
145
|
+
"class": "pro-layout__top-menu-item-text"
|
|
146
|
+
};
|
|
147
|
+
var _hoisted_38 = {
|
|
148
|
+
"class": "pro-layout__header-right"
|
|
149
|
+
};
|
|
150
|
+
var _hoisted_39 = {
|
|
151
|
+
"class": "pro-layout__header-user-name"
|
|
152
|
+
};
|
|
153
|
+
var _hoisted_40 = {
|
|
154
|
+
"class": "pro-layout__main-panel"
|
|
155
|
+
};
|
|
156
|
+
var _hoisted_41 = {
|
|
103
157
|
"class": "pro-layout__tag-label pro-layout__tag-label--affix-icon"
|
|
104
158
|
};
|
|
105
|
-
var
|
|
159
|
+
var _hoisted_42 = {
|
|
106
160
|
"class": "pro-layout__tag-label"
|
|
107
161
|
};
|
|
108
|
-
var
|
|
162
|
+
var _hoisted_43 = {
|
|
109
163
|
"class": "pro-layout__tag-actions"
|
|
110
164
|
};
|
|
111
165
|
var script = {
|
|
@@ -260,17 +314,285 @@ var script = {
|
|
|
260
314
|
tagsViewHomePath: {
|
|
261
315
|
type: String,
|
|
262
316
|
"default": '/'
|
|
317
|
+
},
|
|
318
|
+
/** 布局结构:defaults | classic | transverse | columns */
|
|
319
|
+
layoutMode: {
|
|
320
|
+
type: String,
|
|
321
|
+
"default": 'classic'
|
|
322
|
+
},
|
|
323
|
+
/** 主题配置对象,支持 v-model:theme */
|
|
324
|
+
theme: {
|
|
325
|
+
type: Object,
|
|
326
|
+
"default": null
|
|
327
|
+
},
|
|
328
|
+
/** 为 true 时从 localStorage 恢复 theme;设置抽屉点「应用」写入、点「恢复默认」清除(键名见 themePersistKey) */
|
|
329
|
+
themePersist: {
|
|
330
|
+
type: Boolean,
|
|
331
|
+
"default": false
|
|
332
|
+
},
|
|
333
|
+
themePersistKey: {
|
|
334
|
+
type: String,
|
|
335
|
+
"default": 'deppon-pro-layout-theme'
|
|
336
|
+
},
|
|
337
|
+
/** 额外写入根节点的 CSS 变量 */
|
|
338
|
+
themeCssVars: {
|
|
339
|
+
type: Object,
|
|
340
|
+
"default": function _default() {
|
|
341
|
+
return {};
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
/** 显示内置布局/主题配置抽屉 */
|
|
345
|
+
showSettingsDrawer: {
|
|
346
|
+
type: Boolean,
|
|
347
|
+
"default": false
|
|
348
|
+
},
|
|
349
|
+
settingsDrawerTitle: {
|
|
350
|
+
type: String,
|
|
351
|
+
"default": '布局与主题'
|
|
352
|
+
},
|
|
353
|
+
settingsDrawerSize: {
|
|
354
|
+
type: String,
|
|
355
|
+
"default": '320px'
|
|
356
|
+
},
|
|
357
|
+
/** 显示右侧悬浮设置按钮 */
|
|
358
|
+
showSettingsFab: {
|
|
359
|
+
type: Boolean,
|
|
360
|
+
"default": false
|
|
361
|
+
},
|
|
362
|
+
/** fixed:右侧悬浮;header:顶栏铃铛与用户区之间 */
|
|
363
|
+
settingsFabPlacement: {
|
|
364
|
+
type: String,
|
|
365
|
+
"default": 'fixed'
|
|
366
|
+
},
|
|
367
|
+
settingsFabPosition: {
|
|
368
|
+
type: String,
|
|
369
|
+
"default": 'right-center'
|
|
370
|
+
},
|
|
371
|
+
settingsFabOffset: {
|
|
372
|
+
type: Object,
|
|
373
|
+
"default": function _default() {
|
|
374
|
+
return {};
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
settingsFabStyle: {
|
|
378
|
+
type: Object,
|
|
379
|
+
"default": function _default() {
|
|
380
|
+
return {};
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
settingsFabClass: {
|
|
384
|
+
type: [String, Array, Object],
|
|
385
|
+
"default": ''
|
|
386
|
+
},
|
|
387
|
+
settingsFabSize: {
|
|
388
|
+
type: String,
|
|
389
|
+
"default": 'default'
|
|
390
|
+
},
|
|
391
|
+
settingsFabTitle: {
|
|
392
|
+
type: String,
|
|
393
|
+
"default": '布局与主题'
|
|
394
|
+
},
|
|
395
|
+
settingsFabShowIcon: {
|
|
396
|
+
type: Boolean,
|
|
397
|
+
"default": true
|
|
263
398
|
}
|
|
264
399
|
},
|
|
265
|
-
emits: ['update:collapsed', 'collapse-change', 'logo-click', 'breadcrumb-click', 'breadcrumb-close', 'phone-click', 'bell-click', 'user-command', 'menu-search', 'menu-search-click', 'header-search', 'tag-close', 'common-menu-delete'],
|
|
400
|
+
emits: ['update:collapsed', 'collapse-change', 'logo-click', 'breadcrumb-click', 'breadcrumb-close', 'phone-click', 'bell-click', 'user-command', 'menu-search', 'menu-search-click', 'header-search', 'tag-close', 'common-menu-delete', 'update:theme', 'update:layoutMode', 'theme-change', 'layout-mode-change', 'settings-fab-click', 'settings-drawer-open', 'settings-drawer-closed', 'theme-applied'],
|
|
266
401
|
setup: function setup(__props, _ref) {
|
|
267
|
-
var
|
|
402
|
+
var __expose = _ref.expose,
|
|
403
|
+
__emit = _ref.emit;
|
|
268
404
|
var slots = useSlots();
|
|
269
405
|
var router = useRouter();
|
|
270
406
|
var route = useRoute();
|
|
271
407
|
var props = __props;
|
|
272
408
|
var emit = __emit;
|
|
273
409
|
var localCollapsed = ref(props.collapsed);
|
|
410
|
+
var collapsed = computed({
|
|
411
|
+
get: function get() {
|
|
412
|
+
return props.collapsed !== undefined ? props.collapsed : localCollapsed.value;
|
|
413
|
+
},
|
|
414
|
+
set: function set(val) {
|
|
415
|
+
localCollapsed.value = val;
|
|
416
|
+
emit('update:collapsed', val);
|
|
417
|
+
emit('collapse-change', val);
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
var layoutRootRef = ref(null);
|
|
421
|
+
var settingsDrawerOpen = ref(false);
|
|
422
|
+
var activeColumnsAsideKey = ref('');
|
|
423
|
+
var themePersistEnabled = function themePersistEnabled() {
|
|
424
|
+
return props.themePersist || props.showSettingsDrawer;
|
|
425
|
+
};
|
|
426
|
+
var themeConfigState = ref(buildInitialProLayoutThemeConfig({
|
|
427
|
+
themePersist: themePersistEnabled(),
|
|
428
|
+
persistKey: props.themePersistKey,
|
|
429
|
+
layoutMode: props.layoutMode,
|
|
430
|
+
theme: props.theme
|
|
431
|
+
}));
|
|
432
|
+
var layoutModeResolved = computed(function () {
|
|
433
|
+
return themeConfigState.value.layout || props.layoutMode || 'classic';
|
|
434
|
+
});
|
|
435
|
+
var headerOnTop = computed(function () {
|
|
436
|
+
return layoutModeResolved.value !== 'defaults';
|
|
437
|
+
});
|
|
438
|
+
var isColumnsLayout = computed(function () {
|
|
439
|
+
return layoutModeResolved.value === 'columns';
|
|
440
|
+
});
|
|
441
|
+
var showSiderResolved = computed(function () {
|
|
442
|
+
if (layoutModeResolved.value === 'transverse') return false;
|
|
443
|
+
if (themeConfigState.value.isShowSider === false) return false;
|
|
444
|
+
return props.showSider;
|
|
445
|
+
});
|
|
446
|
+
var fixedHeaderResolved = computed(function () {
|
|
447
|
+
return themeConfigState.value.isFixedHeader !== undefined ? themeConfigState.value.isFixedHeader : props.fixedHeader;
|
|
448
|
+
});
|
|
449
|
+
var showTagsViewResolved = computed(function () {
|
|
450
|
+
return themeConfigState.value.isTagsView !== undefined ? themeConfigState.value.isTagsView : props.showTagsView;
|
|
451
|
+
});
|
|
452
|
+
var tagsViewStyle = computed(function () {
|
|
453
|
+
return {
|
|
454
|
+
minHeight: props.tagsViewHeight,
|
|
455
|
+
flexShrink: 0
|
|
456
|
+
};
|
|
457
|
+
});
|
|
458
|
+
var settingsFabVisible = computed(function () {
|
|
459
|
+
return props.showSettingsFab;
|
|
460
|
+
});
|
|
461
|
+
var settingsFabInHeader = computed(function () {
|
|
462
|
+
return settingsFabVisible.value && props.settingsFabPlacement === 'header';
|
|
463
|
+
});
|
|
464
|
+
var settingsFabFixedVisible = computed(function () {
|
|
465
|
+
return settingsFabVisible.value && props.settingsFabPlacement !== 'header';
|
|
466
|
+
});
|
|
467
|
+
var layoutRootClasses = computed(function () {
|
|
468
|
+
return _defineProperty(_defineProperty({
|
|
469
|
+
'pro-layout--collapsed': collapsed.value
|
|
470
|
+
}, "pro-layout--mode-".concat(layoutModeResolved.value), true), 'pro-layout--dark', Boolean(themeConfigState.value.isDark));
|
|
471
|
+
});
|
|
472
|
+
var layoutRootStyle = computed(function () {
|
|
473
|
+
return props.themeCssVars || {};
|
|
474
|
+
});
|
|
475
|
+
var columnsAsideItems = computed(function () {
|
|
476
|
+
var _props$topMenuItems;
|
|
477
|
+
if ((_props$topMenuItems = props.topMenuItems) !== null && _props$topMenuItems !== void 0 && _props$topMenuItems.length) return props.topMenuItems;
|
|
478
|
+
return (props.menuItems || []).filter(function (item) {
|
|
479
|
+
var _item$children;
|
|
480
|
+
return (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length;
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
var resolveLayoutRootEl = function resolveLayoutRootEl() {
|
|
484
|
+
var refVal = layoutRootRef.value;
|
|
485
|
+
if (!refVal) return null;
|
|
486
|
+
if (refVal instanceof HTMLElement) return refVal;
|
|
487
|
+
return refVal.$el || null;
|
|
488
|
+
};
|
|
489
|
+
var syncThemeToDom = function syncThemeToDom() {
|
|
490
|
+
var _themeConfigState$val = themeConfigState.value,
|
|
491
|
+
globalColors = _themeConfigState$val.globalColors,
|
|
492
|
+
tokens = _themeConfigState$val.tokens;
|
|
493
|
+
applyProLayoutGlobalColors(globalColors, document.documentElement);
|
|
494
|
+
var layoutEl = resolveLayoutRootEl();
|
|
495
|
+
applyProLayoutThemeToElement(layoutEl, tokens);
|
|
496
|
+
// 布局根上的 scoped 默认 --pro-layout-* 会盖住 :root 继承,须用 globalColors 再写一层
|
|
497
|
+
if (layoutEl) {
|
|
498
|
+
applyProLayoutGlobalColors(globalColors, layoutEl);
|
|
499
|
+
}
|
|
500
|
+
if (themeConfigState.value.isDark) {
|
|
501
|
+
document.documentElement.setAttribute('data-pro-layout-theme', 'dark');
|
|
502
|
+
} else {
|
|
503
|
+
document.documentElement.removeAttribute('data-pro-layout-theme');
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
var persistThemeIfNeeded = function persistThemeIfNeeded() {
|
|
507
|
+
if (themePersistEnabled()) {
|
|
508
|
+
persistProLayoutTheme(props.themePersistKey, cloneProLayoutThemeConfig(themeConfigState.value));
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
var onThemeConfigUpdate = function onThemeConfigUpdate(next) {
|
|
512
|
+
themeConfigState.value = mergeProLayoutTheme(themeConfigState.value, next);
|
|
513
|
+
if (next.layout) {
|
|
514
|
+
emit('update:layoutMode', next.layout);
|
|
515
|
+
emit('layout-mode-change', next.layout);
|
|
516
|
+
}
|
|
517
|
+
if (next.isCollapse !== undefined) {
|
|
518
|
+
collapsed.value = next.isCollapse;
|
|
519
|
+
}
|
|
520
|
+
syncThemeToDom();
|
|
521
|
+
emit('update:theme', themeConfigState.value);
|
|
522
|
+
emit('theme-change', themeConfigState.value);
|
|
523
|
+
};
|
|
524
|
+
var applyThemeConfig = function applyThemeConfig() {
|
|
525
|
+
persistThemeIfNeeded();
|
|
526
|
+
ElMessage.success('布局与主题已应用,刷新后仍会保留');
|
|
527
|
+
emit('theme-applied', themeConfigState.value);
|
|
528
|
+
};
|
|
529
|
+
var resetThemeConfig = function resetThemeConfig() {
|
|
530
|
+
clearPersistedProLayoutTheme(props.themePersistKey);
|
|
531
|
+
themeConfigState.value = mergeProLayoutTheme(DEFAULT_PRO_LAYOUT_THEME_CONFIG, {
|
|
532
|
+
layout: props.layoutMode || 'classic'
|
|
533
|
+
});
|
|
534
|
+
collapsed.value = props.collapsed;
|
|
535
|
+
syncThemeToDom();
|
|
536
|
+
emit('update:theme', themeConfigState.value);
|
|
537
|
+
emit('theme-change', themeConfigState.value);
|
|
538
|
+
};
|
|
539
|
+
var openSettingsDrawer = function openSettingsDrawer() {
|
|
540
|
+
settingsDrawerOpen.value = true;
|
|
541
|
+
emit('settings-drawer-open');
|
|
542
|
+
};
|
|
543
|
+
var closeSettingsDrawer = function closeSettingsDrawer() {
|
|
544
|
+
settingsDrawerOpen.value = false;
|
|
545
|
+
};
|
|
546
|
+
var handleSettingsFabClick = function handleSettingsFabClick(e) {
|
|
547
|
+
emit('settings-fab-click', e);
|
|
548
|
+
if (props.showSettingsDrawer) {
|
|
549
|
+
openSettingsDrawer();
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
var handleColumnsAsideSelect = function handleColumnsAsideSelect(item) {
|
|
553
|
+
activeColumnsAsideKey.value = item.path || item.key || '';
|
|
554
|
+
handleTopMenuClick(item);
|
|
555
|
+
};
|
|
556
|
+
provide(proLayoutContextKey, {
|
|
557
|
+
themeConfig: themeConfigState,
|
|
558
|
+
openSettingsDrawer: openSettingsDrawer,
|
|
559
|
+
closeSettingsDrawer: closeSettingsDrawer
|
|
560
|
+
});
|
|
561
|
+
watch(function () {
|
|
562
|
+
return props.theme;
|
|
563
|
+
}, function (val) {
|
|
564
|
+
if (val) {
|
|
565
|
+
themeConfigState.value = mergeProLayoutTheme(themeConfigState.value, val);
|
|
566
|
+
syncThemeToDom();
|
|
567
|
+
}
|
|
568
|
+
}, {
|
|
569
|
+
deep: true
|
|
570
|
+
});
|
|
571
|
+
watch(function () {
|
|
572
|
+
return props.layoutMode;
|
|
573
|
+
}, function (val) {
|
|
574
|
+
if (themePersistEnabled()) return;
|
|
575
|
+
if (val && val !== themeConfigState.value.layout) {
|
|
576
|
+
themeConfigState.value = _objectSpread(_objectSpread({}, themeConfigState.value), {}, {
|
|
577
|
+
layout: val
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
watch(themeConfigState, function () {
|
|
582
|
+
syncThemeToDom();
|
|
583
|
+
}, {
|
|
584
|
+
deep: true
|
|
585
|
+
});
|
|
586
|
+
watch(function () {
|
|
587
|
+
return props.topMenuItems;
|
|
588
|
+
}, function (items) {
|
|
589
|
+
if (!activeColumnsAsideKey.value && items !== null && items !== void 0 && items.length) {
|
|
590
|
+
var first = items[0];
|
|
591
|
+
activeColumnsAsideKey.value = first.path || first.key || '';
|
|
592
|
+
}
|
|
593
|
+
}, {
|
|
594
|
+
immediate: true
|
|
595
|
+
});
|
|
274
596
|
var isMobile = ref(false);
|
|
275
597
|
var windowWidth = ref(typeof window !== 'undefined' ? window.innerWidth : 1920);
|
|
276
598
|
var menuSearchText = ref('');
|
|
@@ -438,7 +760,7 @@ var script = {
|
|
|
438
760
|
watch(function () {
|
|
439
761
|
return route.path;
|
|
440
762
|
}, function (newPath) {
|
|
441
|
-
if (
|
|
763
|
+
if (showTagsViewResolved.value && newPath) {
|
|
442
764
|
addTag(route);
|
|
443
765
|
ensureAffixHomeTag();
|
|
444
766
|
}
|
|
@@ -487,6 +809,77 @@ var script = {
|
|
|
487
809
|
}
|
|
488
810
|
return {};
|
|
489
811
|
});
|
|
812
|
+
|
|
813
|
+
/** 侧栏折叠时可单独配置小图标:logo.collapsedSrc / logo.collapsedSize */
|
|
814
|
+
var logoCollapsedSrc = computed(function () {
|
|
815
|
+
var _props$logo$collapsed;
|
|
816
|
+
if (!props.logo || _typeof(props.logo) !== 'object') return null;
|
|
817
|
+
return props.logo.collapsedSrc || ((_props$logo$collapsed = props.logo.collapsed) === null || _props$logo$collapsed === void 0 ? void 0 : _props$logo$collapsed.src) || null;
|
|
818
|
+
});
|
|
819
|
+
var siderLogoImgSrc = computed(function () {
|
|
820
|
+
if (!logoSrc.value) return null;
|
|
821
|
+
if (collapsed.value && logoCollapsedSrc.value) return logoCollapsedSrc.value;
|
|
822
|
+
return logoSrc.value;
|
|
823
|
+
});
|
|
824
|
+
var siderLogoStyle = computed(function () {
|
|
825
|
+
var contain = {
|
|
826
|
+
objectFit: 'contain',
|
|
827
|
+
objectPosition: 'left center'
|
|
828
|
+
};
|
|
829
|
+
if (collapsed.value) {
|
|
830
|
+
var collapsedSize = _typeof(props.logo) === 'object' && props.logo.collapsedSize != null ? props.logo.collapsedSize : 28;
|
|
831
|
+
if (typeof collapsedSize === 'number') {
|
|
832
|
+
return {
|
|
833
|
+
width: "".concat(collapsedSize, "px"),
|
|
834
|
+
height: "".concat(collapsedSize, "px"),
|
|
835
|
+
maxWidth: '100%',
|
|
836
|
+
objectFit: 'contain',
|
|
837
|
+
objectPosition: 'center center'
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
if (_typeof(collapsedSize) === 'object') {
|
|
841
|
+
return {
|
|
842
|
+
width: collapsedSize.width ? "".concat(collapsedSize.width, "px") : '28px',
|
|
843
|
+
height: collapsedSize.height ? "".concat(collapsedSize.height, "px") : '28px',
|
|
844
|
+
maxWidth: '100%',
|
|
845
|
+
objectFit: 'contain',
|
|
846
|
+
objectPosition: 'center center'
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
return {
|
|
850
|
+
width: '28px',
|
|
851
|
+
height: '28px',
|
|
852
|
+
maxWidth: '100%',
|
|
853
|
+
objectFit: 'contain',
|
|
854
|
+
objectPosition: 'center center'
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
var size = _typeof(props.logo) === 'object' ? props.logo.size : null;
|
|
858
|
+
if (size && _typeof(size) === 'object') {
|
|
859
|
+
var rawW = size.width;
|
|
860
|
+
var rawH = size.height;
|
|
861
|
+
var w = typeof rawW === 'number' ? rawW : rawW ? parseInt(String(rawW), 10) : 72;
|
|
862
|
+
var h = typeof rawH === 'number' ? rawH : rawH ? parseInt(String(rawH), 10) : 20;
|
|
863
|
+
return _objectSpread(_objectSpread({}, contain), {}, {
|
|
864
|
+
width: 'auto',
|
|
865
|
+
maxWidth: "".concat(Math.min(Number.isFinite(w) ? w : 72, 72), "px"),
|
|
866
|
+
height: "".concat(Number.isFinite(h) ? h : 20, "px")
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
return _objectSpread(_objectSpread({}, contain), {}, {
|
|
870
|
+
width: 'auto',
|
|
871
|
+
maxWidth: '72px',
|
|
872
|
+
height: '20px'
|
|
873
|
+
});
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
/** defaults 布局:Logo/标题在侧栏顶部;有 sider-header 插槽时仍用插槽 */
|
|
877
|
+
var showLogoInSider = computed(function () {
|
|
878
|
+
return layoutModeResolved.value === 'defaults' && props.showLogo && props.showLogoInHeader && showSiderResolved.value && !slots['sider-header'] && Boolean(logoSrc.value || props.title);
|
|
879
|
+
});
|
|
880
|
+
var showLogoInHeaderResolved = computed(function () {
|
|
881
|
+
return props.showLogo && props.showLogoInHeader && !showLogoInSider.value;
|
|
882
|
+
});
|
|
490
883
|
var checkMobile = function checkMobile() {
|
|
491
884
|
if (!props.responsive) {
|
|
492
885
|
isMobile.value = _isMobile();
|
|
@@ -502,6 +895,10 @@ var script = {
|
|
|
502
895
|
nextTick(checkAllMenuTitleOverflow);
|
|
503
896
|
};
|
|
504
897
|
onMounted(function () {
|
|
898
|
+
if (themeConfigState.value.isCollapse !== undefined) {
|
|
899
|
+
collapsed.value = themeConfigState.value.isCollapse;
|
|
900
|
+
}
|
|
901
|
+
syncThemeToDom();
|
|
505
902
|
checkMobile();
|
|
506
903
|
handleMenuTitleResize();
|
|
507
904
|
window.addEventListener('resize', handleMenuTitleResize);
|
|
@@ -509,29 +906,32 @@ var script = {
|
|
|
509
906
|
window.addEventListener('resize', checkMobile);
|
|
510
907
|
}
|
|
511
908
|
});
|
|
909
|
+
__expose({
|
|
910
|
+
openSettingsDrawer: openSettingsDrawer,
|
|
911
|
+
closeSettingsDrawer: closeSettingsDrawer,
|
|
912
|
+
applyTheme: function applyTheme(tokens) {
|
|
913
|
+
onThemeConfigUpdate({
|
|
914
|
+
tokens: _objectSpread(_objectSpread({}, themeConfigState.value.tokens), tokens)
|
|
915
|
+
});
|
|
916
|
+
},
|
|
917
|
+
getThemeConfig: function getThemeConfig() {
|
|
918
|
+
return themeConfigState.value;
|
|
919
|
+
}
|
|
920
|
+
});
|
|
512
921
|
onUnmounted(function () {
|
|
513
922
|
window.removeEventListener('resize', handleMenuTitleResize);
|
|
514
923
|
if (props.responsive) {
|
|
515
924
|
window.removeEventListener('resize', checkMobile);
|
|
516
925
|
}
|
|
517
926
|
});
|
|
518
|
-
var collapsed = computed({
|
|
519
|
-
get: function get() {
|
|
520
|
-
return props.collapsed !== undefined ? props.collapsed : localCollapsed.value;
|
|
521
|
-
},
|
|
522
|
-
set: function set(val) {
|
|
523
|
-
localCollapsed.value = val;
|
|
524
|
-
emit('update:collapsed', val);
|
|
525
|
-
emit('collapse-change', val);
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
927
|
var toggleCollapse = function toggleCollapse() {
|
|
529
928
|
collapsed.value = !collapsed.value;
|
|
530
929
|
};
|
|
531
930
|
var bodyStyle = computed(function () {
|
|
532
931
|
var style = {};
|
|
533
|
-
|
|
534
|
-
|
|
932
|
+
var headerVisible = props.showHeader && headerOnTop.value;
|
|
933
|
+
if (headerVisible) {
|
|
934
|
+
if (fixedHeaderResolved.value) {
|
|
535
935
|
style.marginTop = props.headerHeight;
|
|
536
936
|
style.height = "calc(100vh - ".concat(props.headerHeight, ")");
|
|
537
937
|
} else {
|
|
@@ -731,20 +1131,21 @@ var script = {
|
|
|
731
1131
|
});
|
|
732
1132
|
return function (_ctx, _cache) {
|
|
733
1133
|
return openBlock(), createBlock(unref(ElContainer), {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
1134
|
+
ref_key: "layoutRootRef",
|
|
1135
|
+
ref: layoutRootRef,
|
|
1136
|
+
"class": normalizeClass(["pro-layout", layoutRootClasses.value]),
|
|
1137
|
+
style: normalizeStyle(layoutRootStyle.value)
|
|
737
1138
|
}, {
|
|
738
1139
|
"default": withCtx(function () {
|
|
739
|
-
return [__props.showHeader ? (openBlock(), createBlock(unref(ElHeader), {
|
|
1140
|
+
return [__props.showHeader && headerOnTop.value ? (openBlock(), createBlock(unref(ElHeader), {
|
|
740
1141
|
key: 0,
|
|
741
1142
|
height: __props.headerHeight,
|
|
742
1143
|
"class": normalizeClass(["pro-layout__header", {
|
|
743
|
-
'pro-layout__header--fixed':
|
|
1144
|
+
'pro-layout__header--fixed': fixedHeaderResolved.value
|
|
744
1145
|
}])
|
|
745
1146
|
}, {
|
|
746
1147
|
"default": withCtx(function () {
|
|
747
|
-
return [createElementVNode("div", _hoisted_1, [
|
|
1148
|
+
return [createElementVNode("div", _hoisted_1, [showLogoInHeaderResolved.value || unref(slots)['header-left'] ? (openBlock(), createElementBlock("div", _hoisted_2, [showLogoInHeaderResolved.value ? (openBlock(), createElementBlock("div", {
|
|
748
1149
|
key: 0,
|
|
749
1150
|
"class": "pro-layout__header-logo",
|
|
750
1151
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
@@ -757,12 +1158,12 @@ var script = {
|
|
|
757
1158
|
alt: __props.title,
|
|
758
1159
|
"class": "pro-layout__header-logo-img",
|
|
759
1160
|
style: normalizeStyle(logoStyle.value)
|
|
760
|
-
}, null, 12 /* STYLE, PROPS */, _hoisted_3)) : createCommentVNode("v-if", true), __props.title ? (openBlock(), createElementBlock("span", _hoisted_4, [_cache[
|
|
1161
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_3)) : createCommentVNode("v-if", true), __props.title ? (openBlock(), createElementBlock("span", _hoisted_4, [_cache[14] || (_cache[14] = createElementVNode("span", {
|
|
761
1162
|
"class": "pro-layout__header-logo-divider"
|
|
762
1163
|
}, null, -1 /* CACHED */)), createTextVNode(" " + toDisplayString(__props.title), 1 /* TEXT */)])) : createCommentVNode("v-if", true)];
|
|
763
1164
|
})])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "header-left", {
|
|
764
1165
|
collapsed: collapsed.value
|
|
765
|
-
})]), __props.showTopMenu && topMenuItems.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createCommentVNode(" 顶栏不用 el-menu 内置 router:与 @click handleTopMenuClick 会重复 router.push,造成卡顿 "), createVNode(unref(ElMenu), {
|
|
1166
|
+
})])) : createCommentVNode("v-if", true), __props.showTopMenu && topMenuItems.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createCommentVNode(" 顶栏不用 el-menu 内置 router:与 @click handleTopMenuClick 会重复 router.push,造成卡顿 "), createVNode(unref(ElMenu), {
|
|
766
1167
|
"default-active": activeTopMenu.value,
|
|
767
1168
|
mode: "horizontal",
|
|
768
1169
|
router: false,
|
|
@@ -781,7 +1182,7 @@ var script = {
|
|
|
781
1182
|
onClick: _cache[1] || (_cache[1] = withModifiers(function () {}, ["prevent", "stop"]))
|
|
782
1183
|
}, {
|
|
783
1184
|
"default": withCtx(function () {
|
|
784
|
-
return _toConsumableArray(_cache[
|
|
1185
|
+
return _toConsumableArray(_cache[15] || (_cache[15] = [createElementVNode("span", {
|
|
785
1186
|
"class": "pro-layout__top-menu-divider-line",
|
|
786
1187
|
"aria-hidden": "true"
|
|
787
1188
|
}, null, -1 /* CACHED */)]));
|
|
@@ -915,7 +1316,20 @@ var script = {
|
|
|
915
1316
|
})];
|
|
916
1317
|
}),
|
|
917
1318
|
_: 1 /* STABLE */
|
|
918
|
-
})) : createCommentVNode("v-if", true),
|
|
1319
|
+
})) : createCommentVNode("v-if", true), settingsFabInHeader.value ? (openBlock(), createBlock(script$1, {
|
|
1320
|
+
key: 3,
|
|
1321
|
+
placement: "header",
|
|
1322
|
+
title: __props.settingsFabTitle,
|
|
1323
|
+
"show-icon": __props.settingsFabShowIcon,
|
|
1324
|
+
"class": normalizeClass(__props.settingsFabClass),
|
|
1325
|
+
style: normalizeStyle(__props.settingsFabStyle),
|
|
1326
|
+
onClick: handleSettingsFabClick
|
|
1327
|
+
}, {
|
|
1328
|
+
"default": withCtx(function () {
|
|
1329
|
+
return [renderSlot(_ctx.$slots, "settings-fab")];
|
|
1330
|
+
}),
|
|
1331
|
+
_: 3 /* FORWARDED */
|
|
1332
|
+
}, 8 /* PROPS */, ["title", "show-icon", "class", "style"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_12, [renderSlot(_ctx.$slots, "header-right", {
|
|
919
1333
|
collapsed: collapsed.value
|
|
920
1334
|
})])])])];
|
|
921
1335
|
}),
|
|
@@ -925,8 +1339,13 @@ var script = {
|
|
|
925
1339
|
style: normalizeStyle(bodyStyle.value)
|
|
926
1340
|
}, {
|
|
927
1341
|
"default": withCtx(function () {
|
|
928
|
-
return [
|
|
1342
|
+
return [isColumnsLayout.value && columnsAsideItems.value.length > 0 ? (openBlock(), createBlock(script$2, {
|
|
929
1343
|
key: 0,
|
|
1344
|
+
items: columnsAsideItems.value,
|
|
1345
|
+
"active-key": activeColumnsAsideKey.value,
|
|
1346
|
+
onSelect: handleColumnsAsideSelect
|
|
1347
|
+
}, null, 8 /* PROPS */, ["items", "active-key"])) : createCommentVNode("v-if", true), showSiderResolved.value ? (openBlock(), createBlock(unref(ElAside), {
|
|
1348
|
+
key: 1,
|
|
930
1349
|
width: collapsed.value ? __props.siderCollapsedWidth : __props.siderWidth,
|
|
931
1350
|
"class": normalizeClass(["pro-layout__sider", {
|
|
932
1351
|
'pro-layout__sider--collapsed': collapsed.value
|
|
@@ -935,10 +1354,30 @@ var script = {
|
|
|
935
1354
|
"default": withCtx(function () {
|
|
936
1355
|
return [unref(slots)['sider-header'] ? (openBlock(), createElementBlock("div", _hoisted_13, [renderSlot(_ctx.$slots, "sider-header", {
|
|
937
1356
|
collapsed: collapsed.value
|
|
938
|
-
})])) :
|
|
1357
|
+
})])) : showLogoInSider.value ? (openBlock(), createElementBlock("div", {
|
|
1358
|
+
key: 1,
|
|
1359
|
+
"class": normalizeClass(["pro-layout__sider-logo", {
|
|
1360
|
+
'pro-layout__sider-logo--collapsed': collapsed.value
|
|
1361
|
+
}]),
|
|
1362
|
+
onClick: _cache[5] || (_cache[5] = function ($event) {
|
|
1363
|
+
return _ctx.$emit('logo-click');
|
|
1364
|
+
})
|
|
1365
|
+
}, [renderSlot(_ctx.$slots, "header-logo", {
|
|
1366
|
+
collapsed: collapsed.value
|
|
1367
|
+
}, function () {
|
|
1368
|
+
return [siderLogoImgSrc.value ? (openBlock(), createElementBlock("img", {
|
|
1369
|
+
key: 0,
|
|
1370
|
+
src: siderLogoImgSrc.value,
|
|
1371
|
+
alt: __props.title,
|
|
1372
|
+
"class": "pro-layout__header-logo-img pro-layout__sider-logo-img",
|
|
1373
|
+
style: normalizeStyle(siderLogoStyle.value)
|
|
1374
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_14)) : createCommentVNode("v-if", true), __props.title && !collapsed.value ? (openBlock(), createElementBlock("span", _hoisted_15, [_cache[16] || (_cache[16] = createElementVNode("span", {
|
|
1375
|
+
"class": "pro-layout__header-logo-divider"
|
|
1376
|
+
}, null, -1 /* CACHED */)), createTextVNode(" " + toDisplayString(__props.title), 1 /* TEXT */)])) : createCommentVNode("v-if", true)];
|
|
1377
|
+
})], 2 /* CLASS */)) : createCommentVNode("v-if", true), __props.showMenuSearch ? (openBlock(), createElementBlock("div", _hoisted_16, [!collapsed.value ? (openBlock(), createBlock(unref(ElInput), {
|
|
939
1378
|
key: 0,
|
|
940
1379
|
modelValue: menuSearchText.value,
|
|
941
|
-
"onUpdate:modelValue": _cache[
|
|
1380
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
|
|
942
1381
|
return menuSearchText.value = $event;
|
|
943
1382
|
}),
|
|
944
1383
|
placeholder: __props.menuSearchPlaceholder,
|
|
@@ -978,12 +1417,12 @@ var script = {
|
|
|
978
1417
|
return [(openBlock(true), createElementBlock(Fragment, null, renderList(menuGroups.value, function (group, groupIndex) {
|
|
979
1418
|
return openBlock(), createElementBlock(Fragment, {
|
|
980
1419
|
key: "".concat(group.type, "-").concat(groupIndex)
|
|
981
|
-
}, [group.items && group.items.length > 0 ? (openBlock(), createElementBlock("div",
|
|
1420
|
+
}, [group.items && group.items.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_17, [__props.showCommonMenus || menuGroups.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
982
1421
|
key: 0,
|
|
983
1422
|
"class": normalizeClass(["pro-layout__menu-group-header", {
|
|
984
1423
|
'pro-layout__menu-group-header--collapsed': collapsed.value
|
|
985
1424
|
}])
|
|
986
|
-
}, [createElementVNode("div",
|
|
1425
|
+
}, [createElementVNode("div", _hoisted_18, [!collapsed.value ? (openBlock(), createBlock(unref(ElIcon), {
|
|
987
1426
|
key: 0,
|
|
988
1427
|
"class": "pro-layout__menu-group-toggle",
|
|
989
1428
|
onClick: function onClick($event) {
|
|
@@ -994,7 +1433,7 @@ var script = {
|
|
|
994
1433
|
return [(openBlock(), createBlock(resolveDynamicComponent(isMenuGroupExpanded(groupIndex) ? unref(FoldIcon) : unref(ExpandIcon))))];
|
|
995
1434
|
}),
|
|
996
1435
|
_: 2 /* DYNAMIC */
|
|
997
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])) : createCommentVNode("v-if", true), !collapsed.value ? (openBlock(), createElementBlock("span",
|
|
1436
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])) : createCommentVNode("v-if", true), !collapsed.value ? (openBlock(), createElementBlock("span", _hoisted_19, toDisplayString(group.title), 1 /* TEXT */)) : (openBlock(), createElementBlock("span", _hoisted_20, toDisplayString(getFirstChar(group.title)), 1 /* TEXT */))]), !collapsed.value ? (openBlock(), createElementBlock("div", _hoisted_21, [group.type === 'common' && commonMenusCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_22, [createElementVNode("span", _hoisted_23, toDisplayString(commonMenusCount.value), 1 /* TEXT */), createElementVNode("span", _hoisted_24, "/" + toDisplayString(__props.commonMenusMax), 1 /* TEXT */)])) : createCommentVNode("v-if", true), group.type === 'common' && commonMenusCount.value > 0 ? (openBlock(), createElementBlock("span", {
|
|
998
1437
|
key: 1,
|
|
999
1438
|
"class": "pro-layout__menu-group-edit",
|
|
1000
1439
|
onClick: toggleEditMode
|
|
@@ -1059,7 +1498,7 @@ var script = {
|
|
|
1059
1498
|
return [(openBlock(), createBlock(resolveDynamicComponent(item.icon)))];
|
|
1060
1499
|
}),
|
|
1061
1500
|
_: 2 /* DYNAMIC */
|
|
1062
|
-
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !item.icon ? (openBlock(), createElementBlock("span",
|
|
1501
|
+
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !item.icon ? (openBlock(), createElementBlock("span", _hoisted_25, toDisplayString(getFirstChar(item.title || item.label)), 1 /* TEXT */)) : createCommentVNode("v-if", true)];
|
|
1063
1502
|
}),
|
|
1064
1503
|
_: 2 /* DYNAMIC */
|
|
1065
1504
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled", "class"])) : (openBlock(), createBlock(unref(ElSubMenu), {
|
|
@@ -1075,7 +1514,7 @@ var script = {
|
|
|
1075
1514
|
return [(openBlock(), createBlock(resolveDynamicComponent(item.icon)))];
|
|
1076
1515
|
}),
|
|
1077
1516
|
_: 2 /* DYNAMIC */
|
|
1078
|
-
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !item.icon ? (openBlock(), createElementBlock("span",
|
|
1517
|
+
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !item.icon ? (openBlock(), createElementBlock("span", _hoisted_26, toDisplayString(getFirstChar(item.title || item.label)), 1 /* TEXT */)) : createCommentVNode("v-if", true), !collapsed.value ? (openBlock(), createBlock(unref(ElTooltip), {
|
|
1079
1518
|
key: 2,
|
|
1080
1519
|
content: item.title || item.label,
|
|
1081
1520
|
placement: "right",
|
|
@@ -1126,7 +1565,7 @@ var script = {
|
|
|
1126
1565
|
return [(openBlock(), createBlock(resolveDynamicComponent(child.icon)))];
|
|
1127
1566
|
}),
|
|
1128
1567
|
_: 2 /* DYNAMIC */
|
|
1129
|
-
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !child.icon ? (openBlock(), createElementBlock("span",
|
|
1568
|
+
}, 1024 /* DYNAMIC_SLOTS */)) : collapsed.value && !child.icon ? (openBlock(), createElementBlock("span", _hoisted_27, toDisplayString(getFirstChar(child.title || child.label)), 1 /* TEXT */)) : createCommentVNode("v-if", true)];
|
|
1130
1569
|
}),
|
|
1131
1570
|
_: 2 /* DYNAMIC */
|
|
1132
1571
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]);
|
|
@@ -1148,22 +1587,219 @@ var script = {
|
|
|
1148
1587
|
})];
|
|
1149
1588
|
}),
|
|
1150
1589
|
_: 3 /* FORWARDED */
|
|
1151
|
-
}, 8 /* PROPS */, ["width", "class"])) : createCommentVNode("v-if", true),
|
|
1152
|
-
key:
|
|
1590
|
+
}, 8 /* PROPS */, ["width", "class"])) : createCommentVNode("v-if", true), showSiderResolved.value && __props.showCollapse ? (openBlock(), createBlock(unref(ElButton), {
|
|
1591
|
+
key: 2,
|
|
1153
1592
|
icon: collapsed.value ? unref(ArrowRight) : unref(ArrowLeft),
|
|
1154
1593
|
"class": "pro-layout__sider-collapse-btn",
|
|
1155
1594
|
style: normalizeStyle(collapseBtnStyle.value),
|
|
1156
1595
|
onClick: toggleCollapse
|
|
1157
1596
|
}, null, 8 /* PROPS */, ["icon", "style"])) : createCommentVNode("v-if", true), createVNode(unref(ElContainer), {
|
|
1158
|
-
"class": "pro-layout__content-wrapper"
|
|
1597
|
+
"class": normalizeClass(["pro-layout__content-wrapper", {
|
|
1598
|
+
'pro-layout__content-wrapper--with-inner-header': __props.showHeader && !headerOnTop.value
|
|
1599
|
+
}])
|
|
1159
1600
|
}, {
|
|
1160
1601
|
"default": withCtx(function () {
|
|
1161
|
-
return [__props.
|
|
1602
|
+
return [__props.showHeader && !headerOnTop.value ? (openBlock(), createBlock(unref(ElHeader), {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
height: __props.headerHeight,
|
|
1605
|
+
"class": normalizeClass(["pro-layout__header pro-layout__header--in-main", {
|
|
1606
|
+
'pro-layout__header--fixed': fixedHeaderResolved.value
|
|
1607
|
+
}])
|
|
1608
|
+
}, {
|
|
1609
|
+
"default": withCtx(function () {
|
|
1610
|
+
return [createElementVNode("div", _hoisted_28, [showLogoInHeaderResolved.value || unref(slots)['header-left'] ? (openBlock(), createElementBlock("div", _hoisted_29, [showLogoInHeaderResolved.value ? (openBlock(), createElementBlock("div", {
|
|
1611
|
+
key: 0,
|
|
1612
|
+
"class": "pro-layout__header-logo",
|
|
1613
|
+
onClick: _cache[7] || (_cache[7] = function ($event) {
|
|
1614
|
+
return _ctx.$emit('logo-click');
|
|
1615
|
+
})
|
|
1616
|
+
}, [renderSlot(_ctx.$slots, "header-logo", {}, function () {
|
|
1617
|
+
return [logoSrc.value ? (openBlock(), createElementBlock("img", {
|
|
1618
|
+
key: 0,
|
|
1619
|
+
src: logoSrc.value,
|
|
1620
|
+
alt: __props.title,
|
|
1621
|
+
"class": "pro-layout__header-logo-img",
|
|
1622
|
+
style: normalizeStyle(logoStyle.value)
|
|
1623
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_30)) : createCommentVNode("v-if", true), __props.title ? (openBlock(), createElementBlock("span", _hoisted_31, [_cache[17] || (_cache[17] = createElementVNode("span", {
|
|
1624
|
+
"class": "pro-layout__header-logo-divider"
|
|
1625
|
+
}, null, -1 /* CACHED */)), createTextVNode(" " + toDisplayString(__props.title), 1 /* TEXT */)])) : createCommentVNode("v-if", true)];
|
|
1626
|
+
})])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "header-left", {
|
|
1627
|
+
collapsed: collapsed.value
|
|
1628
|
+
})])) : createCommentVNode("v-if", true), __props.showTopMenu && topMenuItems.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_32, [createElementVNode("div", _hoisted_33, [createVNode(unref(ElMenu), {
|
|
1629
|
+
"default-active": activeTopMenu.value,
|
|
1630
|
+
mode: "horizontal",
|
|
1631
|
+
router: false,
|
|
1632
|
+
ellipsis: true,
|
|
1633
|
+
"class": "pro-layout__top-menu-el"
|
|
1634
|
+
}, {
|
|
1635
|
+
"default": withCtx(function () {
|
|
1636
|
+
return [(openBlock(true), createElementBlock(Fragment, null, renderList(topMenuItemsWithDividers.value, function (item, index) {
|
|
1637
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
1638
|
+
key: item.__divider ? item.key : item.path || item.key || item.label || String(index)
|
|
1639
|
+
}, [item.__divider ? (openBlock(), createBlock(unref(ElMenuItem), {
|
|
1640
|
+
key: 0,
|
|
1641
|
+
index: "__top_divider_".concat(index),
|
|
1642
|
+
disabled: "",
|
|
1643
|
+
"class": "pro-layout__top-menu-divider",
|
|
1644
|
+
onClick: _cache[8] || (_cache[8] = withModifiers(function () {}, ["prevent", "stop"]))
|
|
1645
|
+
}, {
|
|
1646
|
+
"default": withCtx(function () {
|
|
1647
|
+
return _toConsumableArray(_cache[18] || (_cache[18] = [createElementVNode("span", {
|
|
1648
|
+
"class": "pro-layout__top-menu-divider-line",
|
|
1649
|
+
"aria-hidden": "true"
|
|
1650
|
+
}, null, -1 /* CACHED */)]));
|
|
1651
|
+
}),
|
|
1652
|
+
_: 1 /* STABLE */
|
|
1653
|
+
}, 8 /* PROPS */, ["index"])) : !item.children || item.children.length === 0 ? (openBlock(), createBlock(unref(ElMenuItem), {
|
|
1654
|
+
key: 1,
|
|
1655
|
+
index: item.path || item.key,
|
|
1656
|
+
"class": normalizeClass({
|
|
1657
|
+
'pro-layout__top-menu-item--lead': isTopMenuLeadItem(index)
|
|
1658
|
+
}),
|
|
1659
|
+
onClick: function onClick($event) {
|
|
1660
|
+
return handleTopMenuClick(item);
|
|
1661
|
+
}
|
|
1662
|
+
}, {
|
|
1663
|
+
"default": withCtx(function () {
|
|
1664
|
+
return [createElementVNode("span", _hoisted_34, [item.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
1665
|
+
key: 0,
|
|
1666
|
+
"class": "pro-layout__top-menu-item-icon"
|
|
1667
|
+
}, {
|
|
1668
|
+
"default": withCtx(function () {
|
|
1669
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(item.icon)))];
|
|
1670
|
+
}),
|
|
1671
|
+
_: 2 /* DYNAMIC */
|
|
1672
|
+
}, 1024 /* DYNAMIC_SLOTS */)) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_35, toDisplayString(item.title || item.label), 1 /* TEXT */), item.badge ? (openBlock(), createBlock(unref(ElBadge), {
|
|
1673
|
+
key: 1,
|
|
1674
|
+
value: item.badge,
|
|
1675
|
+
"class": "pro-layout__top-menu-item-badge",
|
|
1676
|
+
type: item.badgeType || 'danger'
|
|
1677
|
+
}, null, 8 /* PROPS */, ["value", "type"])) : createCommentVNode("v-if", true)])];
|
|
1678
|
+
}),
|
|
1679
|
+
_: 2 /* DYNAMIC */
|
|
1680
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "class", "onClick"])) : (openBlock(), createBlock(unref(ElSubMenu), {
|
|
1681
|
+
key: 2,
|
|
1682
|
+
index: item.path || item.key,
|
|
1683
|
+
"class": normalizeClass({
|
|
1684
|
+
'pro-layout__top-menu-item--lead': isTopMenuLeadItem(index)
|
|
1685
|
+
})
|
|
1686
|
+
}, {
|
|
1687
|
+
title: withCtx(function () {
|
|
1688
|
+
return [createElementVNode("span", _hoisted_36, [item.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
1689
|
+
key: 0,
|
|
1690
|
+
"class": "pro-layout__top-menu-item-icon"
|
|
1691
|
+
}, {
|
|
1692
|
+
"default": withCtx(function () {
|
|
1693
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(item.icon)))];
|
|
1694
|
+
}),
|
|
1695
|
+
_: 2 /* DYNAMIC */
|
|
1696
|
+
}, 1024 /* DYNAMIC_SLOTS */)) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_37, toDisplayString(item.title || item.label), 1 /* TEXT */), item.badge ? (openBlock(), createBlock(unref(ElBadge), {
|
|
1697
|
+
key: 1,
|
|
1698
|
+
value: item.badge,
|
|
1699
|
+
"class": "pro-layout__top-menu-item-badge",
|
|
1700
|
+
type: item.badgeType || 'danger'
|
|
1701
|
+
}, null, 8 /* PROPS */, ["value", "type"])) : createCommentVNode("v-if", true)])];
|
|
1702
|
+
}),
|
|
1703
|
+
"default": withCtx(function () {
|
|
1704
|
+
return [(openBlock(true), createElementBlock(Fragment, null, renderList(item.children, function (child) {
|
|
1705
|
+
return openBlock(), createBlock(unref(ElMenuItem), {
|
|
1706
|
+
key: child.path || child.key,
|
|
1707
|
+
index: child.path || child.key,
|
|
1708
|
+
onClick: function onClick($event) {
|
|
1709
|
+
return handleTopMenuClick(child);
|
|
1710
|
+
}
|
|
1711
|
+
}, {
|
|
1712
|
+
"default": withCtx(function () {
|
|
1713
|
+
return [createTextVNode(toDisplayString(child.title || child.label), 1 /* TEXT */)];
|
|
1714
|
+
}),
|
|
1715
|
+
_: 2 /* DYNAMIC */
|
|
1716
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "onClick"]);
|
|
1717
|
+
}), 128 /* KEYED_FRAGMENT */))];
|
|
1718
|
+
}),
|
|
1719
|
+
_: 2 /* DYNAMIC */
|
|
1720
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "class"]))], 64 /* STABLE_FRAGMENT */);
|
|
1721
|
+
}), 128 /* KEYED_FRAGMENT */))];
|
|
1722
|
+
}),
|
|
1723
|
+
_: 1 /* STABLE */
|
|
1724
|
+
}, 8 /* PROPS */, ["default-active"])])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_38, [__props.showHeaderSearch ? (openBlock(), createBlock(unref(ElInput), {
|
|
1725
|
+
key: 0,
|
|
1726
|
+
modelValue: headerSearchText.value,
|
|
1727
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = function ($event) {
|
|
1728
|
+
return headerSearchText.value = $event;
|
|
1729
|
+
}),
|
|
1730
|
+
placeholder: __props.headerSearchPlaceholder,
|
|
1731
|
+
"class": "pro-layout__header-search",
|
|
1732
|
+
clearable: ""
|
|
1733
|
+
}, {
|
|
1734
|
+
suffix: withCtx(function () {
|
|
1735
|
+
return [createVNode(unref(ElIcon), {
|
|
1736
|
+
"class": "pro-layout__header-search-icon"
|
|
1737
|
+
}, {
|
|
1738
|
+
"default": withCtx(function () {
|
|
1739
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(unref(SearchIcon))))];
|
|
1740
|
+
}),
|
|
1741
|
+
_: 1 /* STABLE */
|
|
1742
|
+
})];
|
|
1743
|
+
}),
|
|
1744
|
+
_: 1 /* STABLE */
|
|
1745
|
+
}, 8 /* PROPS */, ["modelValue", "placeholder"])) : createCommentVNode("v-if", true), __props.showPhoneIcon ? (openBlock(), createBlock(unref(ElButton), {
|
|
1746
|
+
key: 1,
|
|
1747
|
+
text: "",
|
|
1748
|
+
circle: "",
|
|
1749
|
+
"class": "pro-layout__header-action-btn",
|
|
1750
|
+
onClick: _cache[10] || (_cache[10] = function ($event) {
|
|
1751
|
+
return _ctx.$emit('phone-click');
|
|
1752
|
+
})
|
|
1753
|
+
}, {
|
|
1754
|
+
"default": withCtx(function () {
|
|
1755
|
+
return [createVNode(unref(ElIcon), null, {
|
|
1756
|
+
"default": withCtx(function () {
|
|
1757
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(unref(PhoneIcon))))];
|
|
1758
|
+
}),
|
|
1759
|
+
_: 1 /* STABLE */
|
|
1760
|
+
})];
|
|
1761
|
+
}),
|
|
1762
|
+
_: 1 /* STABLE */
|
|
1763
|
+
})) : createCommentVNode("v-if", true), __props.showBellIcon ? (openBlock(), createBlock(unref(ElButton), {
|
|
1764
|
+
key: 2,
|
|
1765
|
+
text: "",
|
|
1766
|
+
circle: "",
|
|
1767
|
+
"class": "pro-layout__header-action-btn",
|
|
1768
|
+
onClick: _cache[11] || (_cache[11] = function ($event) {
|
|
1769
|
+
return _ctx.$emit('bell-click');
|
|
1770
|
+
})
|
|
1771
|
+
}, {
|
|
1772
|
+
"default": withCtx(function () {
|
|
1773
|
+
return [createVNode(unref(ElIcon), null, {
|
|
1774
|
+
"default": withCtx(function () {
|
|
1775
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(unref(BellIcon))))];
|
|
1776
|
+
}),
|
|
1777
|
+
_: 1 /* STABLE */
|
|
1778
|
+
})];
|
|
1779
|
+
}),
|
|
1780
|
+
_: 1 /* STABLE */
|
|
1781
|
+
})) : createCommentVNode("v-if", true), settingsFabInHeader.value ? (openBlock(), createBlock(script$1, {
|
|
1782
|
+
key: 3,
|
|
1783
|
+
placement: "header",
|
|
1784
|
+
title: __props.settingsFabTitle,
|
|
1785
|
+
"show-icon": __props.settingsFabShowIcon,
|
|
1786
|
+
"class": normalizeClass(__props.settingsFabClass),
|
|
1787
|
+
style: normalizeStyle(__props.settingsFabStyle),
|
|
1788
|
+
onClick: handleSettingsFabClick
|
|
1789
|
+
}, {
|
|
1790
|
+
"default": withCtx(function () {
|
|
1791
|
+
return [renderSlot(_ctx.$slots, "settings-fab")];
|
|
1792
|
+
}),
|
|
1793
|
+
_: 3 /* FORWARDED */
|
|
1794
|
+
}, 8 /* PROPS */, ["title", "show-icon", "class", "style"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_39, [renderSlot(_ctx.$slots, "header-right", {
|
|
1795
|
+
collapsed: collapsed.value
|
|
1796
|
+
})])])])];
|
|
1797
|
+
}),
|
|
1798
|
+
_: 3 /* FORWARDED */
|
|
1799
|
+
}, 8 /* PROPS */, ["height", "class"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_40, [showTagsViewResolved.value ? (openBlock(), createElementBlock("div", {
|
|
1162
1800
|
key: 0,
|
|
1163
1801
|
"class": "pro-layout__tags-view",
|
|
1164
|
-
style: normalizeStyle(
|
|
1165
|
-
height: __props.tagsViewHeight
|
|
1166
|
-
})
|
|
1802
|
+
style: normalizeStyle(tagsViewStyle.value)
|
|
1167
1803
|
}, [(openBlock(), createBlock(unref(ElMenu), {
|
|
1168
1804
|
key: tagsMenuKey.value,
|
|
1169
1805
|
"default-active": currentPath.value,
|
|
@@ -1178,7 +1814,7 @@ var script = {
|
|
|
1178
1814
|
"class": "pro-layout__tag-item pro-layout__tag-item--affix"
|
|
1179
1815
|
}, {
|
|
1180
1816
|
title: withCtx(function () {
|
|
1181
|
-
return [createElementVNode("span",
|
|
1817
|
+
return [createElementVNode("span", _hoisted_41, [createVNode(unref(ElIcon), null, {
|
|
1182
1818
|
"default": withCtx(function () {
|
|
1183
1819
|
return [(openBlock(), createBlock(resolveDynamicComponent(unref(HouseIcon))))];
|
|
1184
1820
|
}),
|
|
@@ -1193,7 +1829,7 @@ var script = {
|
|
|
1193
1829
|
"class": "pro-layout__tag-item"
|
|
1194
1830
|
}, {
|
|
1195
1831
|
title: withCtx(function () {
|
|
1196
|
-
return [createElementVNode("span",
|
|
1832
|
+
return [createElementVNode("span", _hoisted_42, toDisplayString(tag.title), 1 /* TEXT */), createElementVNode("div", _hoisted_43, [createVNode(unref(ElIcon), {
|
|
1197
1833
|
"class": "pro-layout__tag-icon",
|
|
1198
1834
|
onClick: withModifiers(function ($event) {
|
|
1199
1835
|
return handleTagClose(tag);
|
|
@@ -1226,16 +1862,59 @@ var script = {
|
|
|
1226
1862
|
return [renderSlot(_ctx.$slots, "footer")];
|
|
1227
1863
|
}),
|
|
1228
1864
|
_: 3 /* FORWARDED */
|
|
1229
|
-
}, 8 /* PROPS */, ["height"])) : createCommentVNode("v-if", true)];
|
|
1865
|
+
}, 8 /* PROPS */, ["height"])) : createCommentVNode("v-if", true)])];
|
|
1230
1866
|
}),
|
|
1231
1867
|
_: 3 /* FORWARDED */
|
|
1232
|
-
})];
|
|
1868
|
+
}, 8 /* PROPS */, ["class"])];
|
|
1869
|
+
}),
|
|
1870
|
+
_: 3 /* FORWARDED */
|
|
1871
|
+
}, 8 /* PROPS */, ["style"]), settingsFabFixedVisible.value ? (openBlock(), createBlock(script$1, {
|
|
1872
|
+
key: 1,
|
|
1873
|
+
visible: settingsFabFixedVisible.value,
|
|
1874
|
+
placement: "fixed",
|
|
1875
|
+
position: __props.settingsFabPosition,
|
|
1876
|
+
offset: __props.settingsFabOffset,
|
|
1877
|
+
style: normalizeStyle(__props.settingsFabStyle),
|
|
1878
|
+
"class": normalizeClass(__props.settingsFabClass),
|
|
1879
|
+
size: __props.settingsFabSize,
|
|
1880
|
+
title: __props.settingsFabTitle,
|
|
1881
|
+
"show-icon": __props.settingsFabShowIcon,
|
|
1882
|
+
onClick: handleSettingsFabClick
|
|
1883
|
+
}, {
|
|
1884
|
+
"default": withCtx(function () {
|
|
1885
|
+
return [renderSlot(_ctx.$slots, "settings-fab")];
|
|
1233
1886
|
}),
|
|
1234
1887
|
_: 3 /* FORWARDED */
|
|
1235
|
-
}, 8 /* PROPS */, ["style"])
|
|
1888
|
+
}, 8 /* PROPS */, ["visible", "position", "offset", "style", "class", "size", "title", "show-icon"])) : createCommentVNode("v-if", true), __props.showSettingsDrawer ? (openBlock(), createBlock(script$3, {
|
|
1889
|
+
key: 2,
|
|
1890
|
+
modelValue: settingsDrawerOpen.value,
|
|
1891
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = function ($event) {
|
|
1892
|
+
return settingsDrawerOpen.value = $event;
|
|
1893
|
+
}),
|
|
1894
|
+
theme: themeConfigState.value,
|
|
1895
|
+
title: __props.settingsDrawerTitle,
|
|
1896
|
+
size: __props.settingsDrawerSize,
|
|
1897
|
+
"onUpdate:theme": onThemeConfigUpdate,
|
|
1898
|
+
onApply: applyThemeConfig,
|
|
1899
|
+
onReset: resetThemeConfig,
|
|
1900
|
+
onClosed: _cache[13] || (_cache[13] = function ($event) {
|
|
1901
|
+
return _ctx.$emit('settings-drawer-closed');
|
|
1902
|
+
})
|
|
1903
|
+
}, createSlots({
|
|
1904
|
+
_: 2 /* DYNAMIC */
|
|
1905
|
+
}, [unref(slots)['settings-panel'] ? {
|
|
1906
|
+
name: "default",
|
|
1907
|
+
fn: withCtx(function () {
|
|
1908
|
+
return [renderSlot(_ctx.$slots, "settings-panel", {
|
|
1909
|
+
theme: themeConfigState.value,
|
|
1910
|
+
open: settingsDrawerOpen.value
|
|
1911
|
+
})];
|
|
1912
|
+
}),
|
|
1913
|
+
key: "0"
|
|
1914
|
+
} : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "theme", "title", "size"])) : createCommentVNode("v-if", true)];
|
|
1236
1915
|
}),
|
|
1237
1916
|
_: 3 /* FORWARDED */
|
|
1238
|
-
}, 8 /* PROPS */, ["class"]);
|
|
1917
|
+
}, 8 /* PROPS */, ["class", "style"]);
|
|
1239
1918
|
};
|
|
1240
1919
|
}
|
|
1241
1920
|
};
|