@deppon/deppon-template 2.4.23 → 2.5.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.
|
@@ -1432,3 +1432,99 @@ body .el-overlay-dialog {
|
|
|
1432
1432
|
fill: var(--el-color-primary, #409eff) !important;
|
|
1433
1433
|
fill-opacity: 1 !important;
|
|
1434
1434
|
}
|
|
1435
|
+
/* 边框拖拽缩放 */
|
|
1436
|
+
.pro-dialog-root--resizable.el-dialog,
|
|
1437
|
+
.el-dialog.pro-dialog-root--resizable {
|
|
1438
|
+
display: flex !important;
|
|
1439
|
+
flex-direction: column !important;
|
|
1440
|
+
overflow: hidden !important;
|
|
1441
|
+
}
|
|
1442
|
+
.pro-dialog-panel--resizable {
|
|
1443
|
+
position: relative;
|
|
1444
|
+
}
|
|
1445
|
+
.pro-dialog-resize-handles {
|
|
1446
|
+
position: absolute;
|
|
1447
|
+
inset: 0;
|
|
1448
|
+
pointer-events: none;
|
|
1449
|
+
z-index: 20;
|
|
1450
|
+
}
|
|
1451
|
+
.pro-dialog-resize-handle {
|
|
1452
|
+
position: absolute;
|
|
1453
|
+
pointer-events: auto;
|
|
1454
|
+
background: transparent;
|
|
1455
|
+
touch-action: none;
|
|
1456
|
+
}
|
|
1457
|
+
.pro-dialog-resize-handle--n {
|
|
1458
|
+
top: 0;
|
|
1459
|
+
left: 0;
|
|
1460
|
+
width: 100%;
|
|
1461
|
+
height: 8px;
|
|
1462
|
+
}
|
|
1463
|
+
.pro-dialog-resize-handle--s {
|
|
1464
|
+
left: 0;
|
|
1465
|
+
bottom: 0;
|
|
1466
|
+
width: 100%;
|
|
1467
|
+
height: 8px;
|
|
1468
|
+
}
|
|
1469
|
+
.pro-dialog-resize-handle--e {
|
|
1470
|
+
top: 0;
|
|
1471
|
+
right: 0;
|
|
1472
|
+
width: 8px;
|
|
1473
|
+
height: 100%;
|
|
1474
|
+
}
|
|
1475
|
+
.pro-dialog-resize-handle--w {
|
|
1476
|
+
top: 0;
|
|
1477
|
+
left: 0;
|
|
1478
|
+
width: 8px;
|
|
1479
|
+
height: 100%;
|
|
1480
|
+
}
|
|
1481
|
+
.pro-dialog-resize-handle--nw {
|
|
1482
|
+
top: 0;
|
|
1483
|
+
left: 0;
|
|
1484
|
+
width: 14px;
|
|
1485
|
+
height: 14px;
|
|
1486
|
+
}
|
|
1487
|
+
.pro-dialog-resize-handle--ne {
|
|
1488
|
+
top: 0;
|
|
1489
|
+
right: 0;
|
|
1490
|
+
width: 14px;
|
|
1491
|
+
height: 14px;
|
|
1492
|
+
}
|
|
1493
|
+
.pro-dialog-resize-handle--sw {
|
|
1494
|
+
left: 0;
|
|
1495
|
+
bottom: 0;
|
|
1496
|
+
width: 14px;
|
|
1497
|
+
height: 14px;
|
|
1498
|
+
}
|
|
1499
|
+
.pro-dialog-resize-handle--se {
|
|
1500
|
+
right: 0;
|
|
1501
|
+
bottom: 0;
|
|
1502
|
+
width: 14px;
|
|
1503
|
+
height: 14px;
|
|
1504
|
+
}
|
|
1505
|
+
.pro-dialog-resize-handle:hover {
|
|
1506
|
+
background: color-mix(in srgb, var(--el-color-primary, #409eff) 18%, transparent);
|
|
1507
|
+
}
|
|
1508
|
+
.pro-dialog-root--resizable .el-dialog__body {
|
|
1509
|
+
flex: 1;
|
|
1510
|
+
min-height: 0;
|
|
1511
|
+
}
|
|
1512
|
+
.pro-dialog-root--resizable .pro-dialog-content-wrapper,
|
|
1513
|
+
.pro-dialog-root--resizable .pro-dialog-default-content {
|
|
1514
|
+
flex: 1;
|
|
1515
|
+
min-height: 0;
|
|
1516
|
+
overflow: auto;
|
|
1517
|
+
}
|
|
1518
|
+
.pro-dialog-body-content--fill {
|
|
1519
|
+
flex: 1;
|
|
1520
|
+
min-height: 0;
|
|
1521
|
+
display: flex;
|
|
1522
|
+
flex-direction: column;
|
|
1523
|
+
}
|
|
1524
|
+
.pro-dialog-body-content--fill .el-scrollbar {
|
|
1525
|
+
flex: 1;
|
|
1526
|
+
min-height: 0;
|
|
1527
|
+
}
|
|
1528
|
+
.pro-dialog-body-content--fill .el-scrollbar__wrap {
|
|
1529
|
+
max-height: 100%;
|
|
1530
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import '../_virtual/_rollup-plugin-inject-process-env.js';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
4
|
import { markRaw, useSlots, ref, computed, useAttrs, onMounted, onUnmounted, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementVNode, normalizeClass, renderSlot, toDisplayString, createVNode, createCommentVNode, createElementBlock, normalizeStyle, Fragment, renderList, normalizeProps, guardReactiveProps, nextTick } from 'vue';
|
|
4
5
|
import { ElDialog, ElIcon, ElScrollbar } from '@deppon/deppon-ui';
|
|
5
6
|
import { Close } from '@deppon/deppon-ui/icons-vue';
|
|
6
7
|
|
|
7
|
-
var _excluded = ["modelValue"];
|
|
8
|
+
var _excluded = ["modelValue", "resizable", "resizeMinWidth", "resizeMinHeight", "resizeMaxWidth", "resizeMaxHeight", "resize-min-width", "resize-min-height", "resize-max-width", "resize-max-height", "class", "style", "width"];
|
|
8
9
|
var _hoisted_1 = {
|
|
9
10
|
"class": "my-header"
|
|
10
11
|
};
|
|
@@ -35,8 +36,14 @@ var script = {
|
|
|
35
36
|
var slots = useSlots();
|
|
36
37
|
|
|
37
38
|
// refs
|
|
39
|
+
var dialogComponentRef = ref(null);
|
|
38
40
|
var bodyScrollbarRef = ref(null);
|
|
39
41
|
var bodyContentInnerRef = ref(null);
|
|
42
|
+
var dialogInstanceId = "pro-dialog-".concat(Math.random().toString(36).slice(2, 9));
|
|
43
|
+
var dialogPixelWidth = ref(null);
|
|
44
|
+
var dialogPixelHeight = ref(null);
|
|
45
|
+
var resizeHandlesEl = null;
|
|
46
|
+
var resizePanelEl = null;
|
|
40
47
|
|
|
41
48
|
// 检查是否有 title slot
|
|
42
49
|
computed(function () {
|
|
@@ -86,10 +93,334 @@ var script = {
|
|
|
86
93
|
var bodyContentHeight = computed(function () {
|
|
87
94
|
return attrs.bodyContentHeight || attrs['body-content-height'] || '50vh';
|
|
88
95
|
});
|
|
96
|
+
var resizable = computed(function () {
|
|
97
|
+
return attrs.resizable === true || attrs.resizable === '';
|
|
98
|
+
});
|
|
99
|
+
var resizeMinWidth = computed(function () {
|
|
100
|
+
var _attrs$resizeMinWidth;
|
|
101
|
+
return parseSizeToPx((_attrs$resizeMinWidth = attrs.resizeMinWidth) !== null && _attrs$resizeMinWidth !== void 0 ? _attrs$resizeMinWidth : attrs['resize-min-width'], 360);
|
|
102
|
+
});
|
|
103
|
+
var resizeMinHeight = computed(function () {
|
|
104
|
+
var _attrs$resizeMinHeigh;
|
|
105
|
+
return parseSizeToPx((_attrs$resizeMinHeigh = attrs.resizeMinHeight) !== null && _attrs$resizeMinHeigh !== void 0 ? _attrs$resizeMinHeigh : attrs['resize-min-height'], 240);
|
|
106
|
+
});
|
|
107
|
+
var resizeMaxWidth = computed(function () {
|
|
108
|
+
var _attrs$resizeMaxWidth;
|
|
109
|
+
var v = (_attrs$resizeMaxWidth = attrs.resizeMaxWidth) !== null && _attrs$resizeMaxWidth !== void 0 ? _attrs$resizeMaxWidth : attrs['resize-max-width'];
|
|
110
|
+
if (v == null || v === '') {
|
|
111
|
+
return typeof window !== 'undefined' ? Math.floor(window.innerWidth * 0.96) : 1920;
|
|
112
|
+
}
|
|
113
|
+
return parseSizeToPx(v, 1920);
|
|
114
|
+
});
|
|
115
|
+
var resizeMaxHeight = computed(function () {
|
|
116
|
+
var _attrs$resizeMaxHeigh;
|
|
117
|
+
var v = (_attrs$resizeMaxHeigh = attrs.resizeMaxHeight) !== null && _attrs$resizeMaxHeigh !== void 0 ? _attrs$resizeMaxHeigh : attrs['resize-max-height'];
|
|
118
|
+
if (v == null || v === '') {
|
|
119
|
+
return typeof window !== 'undefined' ? Math.floor(window.innerHeight * 0.92) : 1080;
|
|
120
|
+
}
|
|
121
|
+
return parseSizeToPx(v, 1080);
|
|
122
|
+
});
|
|
123
|
+
var dialogRootClass = computed(function () {
|
|
124
|
+
var list = ['pro-dialog-root', "pro-dialog-root--".concat(dialogInstanceId)];
|
|
125
|
+
if (resizable.value) {
|
|
126
|
+
list.push('pro-dialog-root--resizable');
|
|
127
|
+
}
|
|
128
|
+
var extra = attrs["class"];
|
|
129
|
+
if (typeof extra === 'string' && extra) {
|
|
130
|
+
list.push(extra);
|
|
131
|
+
} else if (Array.isArray(extra)) {
|
|
132
|
+
list.push.apply(list, _toConsumableArray(extra.filter(Boolean)));
|
|
133
|
+
}
|
|
134
|
+
return list;
|
|
135
|
+
});
|
|
136
|
+
var dialogWidthProp = computed(function () {
|
|
137
|
+
if (resizable.value && dialogPixelWidth.value != null) {
|
|
138
|
+
return "".concat(dialogPixelWidth.value, "px");
|
|
139
|
+
}
|
|
140
|
+
return attrs.width;
|
|
141
|
+
});
|
|
142
|
+
var dialogRootStyle = computed(function () {
|
|
143
|
+
if (!resizable.value || dialogPixelHeight.value == null) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
height: "".concat(dialogPixelHeight.value, "px"),
|
|
148
|
+
maxHeight: "".concat(dialogPixelHeight.value, "px"),
|
|
149
|
+
display: 'flex',
|
|
150
|
+
flexDirection: 'column'
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
var bodyScrollbarStyle = computed(function () {
|
|
154
|
+
if (resizable.value) {
|
|
155
|
+
return {
|
|
156
|
+
height: '100%',
|
|
157
|
+
flex: '1',
|
|
158
|
+
minHeight: '0'
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
height: bodyContentHeight.value
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
function parseSizeToPx(value, fallback) {
|
|
166
|
+
if (value == null || value === '') {
|
|
167
|
+
return fallback;
|
|
168
|
+
}
|
|
169
|
+
if (typeof value === 'number' && !Number.isNaN(value)) {
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
172
|
+
var str = String(value).trim();
|
|
173
|
+
if (str.endsWith('px')) {
|
|
174
|
+
var _n = parseFloat(str);
|
|
175
|
+
return Number.isNaN(_n) ? fallback : _n;
|
|
176
|
+
}
|
|
177
|
+
if (str.endsWith('%') && typeof window !== 'undefined') {
|
|
178
|
+
var _n2 = parseFloat(str);
|
|
179
|
+
return Number.isNaN(_n2) ? fallback : Math.floor(window.innerWidth * _n2 / 100);
|
|
180
|
+
}
|
|
181
|
+
var n = parseFloat(str);
|
|
182
|
+
return Number.isNaN(n) ? fallback : n;
|
|
183
|
+
}
|
|
184
|
+
function parseWidthAttrToPx(widthAttr) {
|
|
185
|
+
if (widthAttr == null || widthAttr === '') {
|
|
186
|
+
return 600;
|
|
187
|
+
}
|
|
188
|
+
return parseSizeToPx(widthAttr, 600);
|
|
189
|
+
}
|
|
190
|
+
function clampSize(value, min, max) {
|
|
191
|
+
return Math.min(max, Math.max(min, value));
|
|
192
|
+
}
|
|
193
|
+
function getDialogPanelEl() {
|
|
194
|
+
var _comp$$el$querySelect, _comp$$el, _comp$$el$querySelect2;
|
|
195
|
+
var byClass = document.querySelector(".pro-dialog-root--".concat(dialogInstanceId, ".el-dialog"));
|
|
196
|
+
if (byClass) {
|
|
197
|
+
return byClass;
|
|
198
|
+
}
|
|
199
|
+
var comp = dialogComponentRef.value;
|
|
200
|
+
if (!comp) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
var exposed = comp.dialogRef;
|
|
204
|
+
if (exposed) {
|
|
205
|
+
var _exposed$value;
|
|
206
|
+
return (_exposed$value = exposed.value) !== null && _exposed$value !== void 0 ? _exposed$value : exposed;
|
|
207
|
+
}
|
|
208
|
+
return (_comp$$el$querySelect = (_comp$$el = comp.$el) === null || _comp$$el === void 0 || (_comp$$el$querySelect2 = _comp$$el.querySelector) === null || _comp$$el$querySelect2 === void 0 ? void 0 : _comp$$el$querySelect2.call(_comp$$el, '.el-dialog')) !== null && _comp$$el$querySelect !== void 0 ? _comp$$el$querySelect : null;
|
|
209
|
+
}
|
|
210
|
+
function applyDialogPixelSize(panel, width, height, position) {
|
|
211
|
+
if (!panel) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
panel.style.width = "".concat(width, "px");
|
|
215
|
+
panel.style.maxWidth = "".concat(width, "px");
|
|
216
|
+
panel.style.height = "".concat(height, "px");
|
|
217
|
+
panel.style.maxHeight = "".concat(height, "px");
|
|
218
|
+
dialogPixelWidth.value = width;
|
|
219
|
+
dialogPixelHeight.value = height;
|
|
220
|
+
if (position) {
|
|
221
|
+
panel.style.marginLeft = "".concat(position.left, "px");
|
|
222
|
+
panel.style.marginTop = "".concat(position.top, "px");
|
|
223
|
+
panel.style.marginRight = 'auto';
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function pinDialogVisualPosition(panel) {
|
|
227
|
+
var rect = panel.getBoundingClientRect();
|
|
228
|
+
panel.style.transform = 'none';
|
|
229
|
+
panel.style.marginLeft = "".concat(rect.left, "px");
|
|
230
|
+
panel.style.marginTop = "".concat(rect.top, "px");
|
|
231
|
+
panel.style.marginRight = 'auto';
|
|
232
|
+
panel.dataset.proDialogPositionPinned = '1';
|
|
233
|
+
}
|
|
234
|
+
function resetDialogPosition(panel) {
|
|
235
|
+
if (!panel) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
panel.style.removeProperty('margin-left');
|
|
239
|
+
panel.style.removeProperty('margin-top');
|
|
240
|
+
panel.style.removeProperty('margin-right');
|
|
241
|
+
panel.style.removeProperty('transform');
|
|
242
|
+
delete panel.dataset.proDialogPositionPinned;
|
|
243
|
+
}
|
|
244
|
+
function initDialogSizeFromPanel(panel) {
|
|
245
|
+
var _attrs$width;
|
|
246
|
+
var widthAttr = (_attrs$width = attrs.width) !== null && _attrs$width !== void 0 ? _attrs$width : attrs['width'];
|
|
247
|
+
var initialW = clampSize(parseWidthAttrToPx(widthAttr), resizeMinWidth.value, resizeMaxWidth.value);
|
|
248
|
+
var rectH = panel.getBoundingClientRect().height;
|
|
249
|
+
var initialH = clampSize(rectH > 0 ? Math.ceil(rectH) : resizeMinHeight.value, resizeMinHeight.value, resizeMaxHeight.value);
|
|
250
|
+
applyDialogPixelSize(panel, initialW, initialH);
|
|
251
|
+
}
|
|
252
|
+
function removeResizeHandles() {
|
|
253
|
+
var _resizeHandlesEl;
|
|
254
|
+
if ((_resizeHandlesEl = resizeHandlesEl) !== null && _resizeHandlesEl !== void 0 && _resizeHandlesEl.parentNode) {
|
|
255
|
+
resizeHandlesEl.parentNode.removeChild(resizeHandlesEl);
|
|
256
|
+
}
|
|
257
|
+
resizeHandlesEl = null;
|
|
258
|
+
resizePanelEl = null;
|
|
259
|
+
}
|
|
260
|
+
var RESIZE_EDGE_CONFIG = [{
|
|
261
|
+
dir: 'n',
|
|
262
|
+
className: 'pro-dialog-resize-handle--n',
|
|
263
|
+
cursor: 'ns-resize'
|
|
264
|
+
}, {
|
|
265
|
+
dir: 's',
|
|
266
|
+
className: 'pro-dialog-resize-handle--s',
|
|
267
|
+
cursor: 'ns-resize'
|
|
268
|
+
}, {
|
|
269
|
+
dir: 'e',
|
|
270
|
+
className: 'pro-dialog-resize-handle--e',
|
|
271
|
+
cursor: 'ew-resize'
|
|
272
|
+
}, {
|
|
273
|
+
dir: 'w',
|
|
274
|
+
className: 'pro-dialog-resize-handle--w',
|
|
275
|
+
cursor: 'ew-resize'
|
|
276
|
+
}, {
|
|
277
|
+
dir: 'nw',
|
|
278
|
+
className: 'pro-dialog-resize-handle--nw',
|
|
279
|
+
cursor: 'nwse-resize'
|
|
280
|
+
}, {
|
|
281
|
+
dir: 'ne',
|
|
282
|
+
className: 'pro-dialog-resize-handle--ne',
|
|
283
|
+
cursor: 'nesw-resize'
|
|
284
|
+
}, {
|
|
285
|
+
dir: 'sw',
|
|
286
|
+
className: 'pro-dialog-resize-handle--sw',
|
|
287
|
+
cursor: 'nesw-resize'
|
|
288
|
+
}, {
|
|
289
|
+
dir: 'se',
|
|
290
|
+
className: 'pro-dialog-resize-handle--se',
|
|
291
|
+
cursor: 'nwse-resize'
|
|
292
|
+
}];
|
|
293
|
+
function startResizePointer(e, direction) {
|
|
294
|
+
var _RESIZE_EDGE_CONFIG$f;
|
|
295
|
+
if (!resizePanelEl) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
e.stopPropagation();
|
|
300
|
+
var panel = resizePanelEl;
|
|
301
|
+
var startX = e.clientX;
|
|
302
|
+
var startY = e.clientY;
|
|
303
|
+
var startRect = panel.getBoundingClientRect();
|
|
304
|
+
var startW = startRect.width;
|
|
305
|
+
var startH = startRect.height;
|
|
306
|
+
var startLeft = startRect.left;
|
|
307
|
+
var startTop = startRect.top;
|
|
308
|
+
var affectsPosition = /[nw]/.test(direction);
|
|
309
|
+
if (affectsPosition) {
|
|
310
|
+
pinDialogVisualPosition(panel);
|
|
311
|
+
}
|
|
312
|
+
var onMove = function onMove(ev) {
|
|
313
|
+
var deltaX = ev.clientX - startX;
|
|
314
|
+
var deltaY = ev.clientY - startY;
|
|
315
|
+
var nextW = startW;
|
|
316
|
+
var nextH = startH;
|
|
317
|
+
var nextLeft = startLeft;
|
|
318
|
+
var nextTop = startTop;
|
|
319
|
+
if (direction.includes('e')) {
|
|
320
|
+
nextW = startW + deltaX;
|
|
321
|
+
}
|
|
322
|
+
if (direction.includes('w')) {
|
|
323
|
+
nextW = startW - deltaX;
|
|
324
|
+
nextLeft = startLeft + deltaX;
|
|
325
|
+
}
|
|
326
|
+
if (direction.includes('s')) {
|
|
327
|
+
nextH = startH + deltaY;
|
|
328
|
+
}
|
|
329
|
+
if (direction.includes('n')) {
|
|
330
|
+
nextH = startH - deltaY;
|
|
331
|
+
nextTop = startTop + deltaY;
|
|
332
|
+
}
|
|
333
|
+
if (direction.includes('w')) {
|
|
334
|
+
var clampedW = clampSize(nextW, resizeMinWidth.value, resizeMaxWidth.value);
|
|
335
|
+
nextLeft += nextW - clampedW;
|
|
336
|
+
nextW = clampedW;
|
|
337
|
+
} else if (direction.includes('e')) {
|
|
338
|
+
nextW = clampSize(nextW, resizeMinWidth.value, resizeMaxWidth.value);
|
|
339
|
+
}
|
|
340
|
+
if (direction.includes('n')) {
|
|
341
|
+
var clampedH = clampSize(nextH, resizeMinHeight.value, resizeMaxHeight.value);
|
|
342
|
+
nextTop += nextH - clampedH;
|
|
343
|
+
nextH = clampedH;
|
|
344
|
+
} else if (direction.includes('s')) {
|
|
345
|
+
nextH = clampSize(nextH, resizeMinHeight.value, resizeMaxHeight.value);
|
|
346
|
+
}
|
|
347
|
+
var position = affectsPosition ? {
|
|
348
|
+
left: nextLeft,
|
|
349
|
+
top: nextTop
|
|
350
|
+
} : undefined;
|
|
351
|
+
applyDialogPixelSize(panel, nextW, nextH, position);
|
|
352
|
+
};
|
|
353
|
+
var _onUp = function onUp() {
|
|
354
|
+
document.removeEventListener('pointermove', onMove);
|
|
355
|
+
document.removeEventListener('pointerup', _onUp);
|
|
356
|
+
document.body.style.removeProperty('user-select');
|
|
357
|
+
document.body.style.removeProperty('cursor');
|
|
358
|
+
};
|
|
359
|
+
document.addEventListener('pointermove', onMove);
|
|
360
|
+
document.addEventListener('pointerup', _onUp);
|
|
361
|
+
document.body.style.userSelect = 'none';
|
|
362
|
+
document.body.style.cursor = ((_RESIZE_EDGE_CONFIG$f = RESIZE_EDGE_CONFIG.find(function (item) {
|
|
363
|
+
return item.dir === direction;
|
|
364
|
+
})) === null || _RESIZE_EDGE_CONFIG$f === void 0 ? void 0 : _RESIZE_EDGE_CONFIG$f.cursor) || 'default';
|
|
365
|
+
}
|
|
366
|
+
function mountResizeHandles(panel) {
|
|
367
|
+
removeResizeHandles();
|
|
368
|
+
resizePanelEl = panel;
|
|
369
|
+
panel.classList.add('pro-dialog-panel--resizable');
|
|
370
|
+
var wrapper = document.createElement('div');
|
|
371
|
+
wrapper.className = 'pro-dialog-resize-handles';
|
|
372
|
+
RESIZE_EDGE_CONFIG.forEach(function (_ref2) {
|
|
373
|
+
var dir = _ref2.dir,
|
|
374
|
+
className = _ref2.className,
|
|
375
|
+
cursor = _ref2.cursor;
|
|
376
|
+
var handle = document.createElement('div');
|
|
377
|
+
handle.className = "pro-dialog-resize-handle ".concat(className);
|
|
378
|
+
handle.setAttribute('data-resize-dir', dir);
|
|
379
|
+
handle.style.cursor = cursor;
|
|
380
|
+
handle.addEventListener('pointerdown', function (ev) {
|
|
381
|
+
return startResizePointer(ev, dir);
|
|
382
|
+
});
|
|
383
|
+
wrapper.appendChild(handle);
|
|
384
|
+
});
|
|
385
|
+
panel.appendChild(wrapper);
|
|
386
|
+
resizeHandlesEl = wrapper;
|
|
387
|
+
}
|
|
388
|
+
function handleDialogOpened() {
|
|
389
|
+
if (!resizable.value) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
nextTick(function () {
|
|
393
|
+
var panel = getDialogPanelEl();
|
|
394
|
+
if (!panel) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
initDialogSizeFromPanel(panel);
|
|
398
|
+
mountResizeHandles(panel);
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
function handleDialogClosed() {
|
|
402
|
+
var panel = getDialogPanelEl();
|
|
403
|
+
resetDialogPosition(panel);
|
|
404
|
+
removeResizeHandles();
|
|
405
|
+
dialogPixelWidth.value = null;
|
|
406
|
+
dialogPixelHeight.value = null;
|
|
407
|
+
}
|
|
89
408
|
|
|
90
409
|
// 获取 el-dialog 的原生属性,过滤掉我们自定义的属性
|
|
91
410
|
var getDialogProps = computed(function () {
|
|
92
411
|
attrs.modelValue;
|
|
412
|
+
attrs.resizable;
|
|
413
|
+
attrs.resizeMinWidth;
|
|
414
|
+
attrs.resizeMinHeight;
|
|
415
|
+
attrs.resizeMaxWidth;
|
|
416
|
+
attrs.resizeMaxHeight;
|
|
417
|
+
attrs['resize-min-width'];
|
|
418
|
+
attrs['resize-min-height'];
|
|
419
|
+
attrs['resize-max-width'];
|
|
420
|
+
attrs['resize-max-height'];
|
|
421
|
+
attrs["class"];
|
|
422
|
+
attrs.style;
|
|
423
|
+
attrs.width;
|
|
93
424
|
var dialogAttrs = _objectWithoutProperties(attrs, _excluded);
|
|
94
425
|
return dialogAttrs;
|
|
95
426
|
});
|
|
@@ -257,14 +588,22 @@ var script = {
|
|
|
257
588
|
document.removeEventListener('pro-table-group-added', handleTableGroupAdded, true);
|
|
258
589
|
});
|
|
259
590
|
return function (_ctx, _cache) {
|
|
260
|
-
return openBlock(), createBlock(unref(ElDialog), mergeProps(
|
|
591
|
+
return openBlock(), createBlock(unref(ElDialog), mergeProps({
|
|
592
|
+
ref_key: "dialogComponentRef",
|
|
593
|
+
ref: dialogComponentRef
|
|
594
|
+
}, getDialogProps.value, {
|
|
595
|
+
"class": dialogRootClass.value,
|
|
261
596
|
"model-value": __props.modelValue,
|
|
262
|
-
|
|
597
|
+
width: dialogWidthProp.value,
|
|
598
|
+
style: dialogRootStyle.value,
|
|
599
|
+
"onUpdate:modelValue": handleUpdateModelValue,
|
|
600
|
+
onOpened: handleDialogOpened,
|
|
601
|
+
onClosed: handleDialogClosed
|
|
263
602
|
}), createSlots({
|
|
264
|
-
header: withCtx(function (
|
|
265
|
-
var close =
|
|
266
|
-
titleId =
|
|
267
|
-
titleClass =
|
|
603
|
+
header: withCtx(function (_ref3) {
|
|
604
|
+
var close = _ref3.close,
|
|
605
|
+
titleId = _ref3.titleId,
|
|
606
|
+
titleClass = _ref3.titleClass;
|
|
268
607
|
return [createElementVNode("div", _hoisted_1, [createElementVNode("div", {
|
|
269
608
|
id: titleId,
|
|
270
609
|
"class": normalizeClass(titleClass)
|
|
@@ -293,10 +632,10 @@ var script = {
|
|
|
293
632
|
}, [renderSlot(_ctx.$slots, "header-content")], 2 /* CLASS */)) : createCommentVNode("v-if", true), createCommentVNode(" 下部分 slot:可滚动 "), hasBodyContentSlot.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(ElScrollbar), {
|
|
294
633
|
ref_key: "bodyScrollbarRef",
|
|
295
634
|
ref: bodyScrollbarRef,
|
|
296
|
-
"class": "pro-dialog-body-content",
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
635
|
+
"class": normalizeClass(["pro-dialog-body-content", {
|
|
636
|
+
'pro-dialog-body-content--fill': resizable.value
|
|
637
|
+
}]),
|
|
638
|
+
style: normalizeStyle(bodyScrollbarStyle.value),
|
|
300
639
|
onProTableRowAdded: handleTableRowAdded,
|
|
301
640
|
onProTableGroupAdded: handleTableGroupAdded
|
|
302
641
|
}, {
|
|
@@ -308,7 +647,7 @@ var script = {
|
|
|
308
647
|
}, [renderSlot(_ctx.$slots, "body-content")], 512 /* NEED_PATCH */)];
|
|
309
648
|
}),
|
|
310
649
|
_: 3 /* FORWARDED */
|
|
311
|
-
}, 8 /* PROPS */, ["style"])])) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock(Fragment, {
|
|
650
|
+
}, 8 /* PROPS */, ["class", "style"])])) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock(Fragment, {
|
|
312
651
|
key: 1
|
|
313
652
|
}, [createCommentVNode(" 默认内容 slot "), createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "default")])], 64 /* STABLE_FRAGMENT */))];
|
|
314
653
|
}),
|
|
@@ -320,7 +659,7 @@ var script = {
|
|
|
320
659
|
return [renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(slotProps)))];
|
|
321
660
|
})
|
|
322
661
|
};
|
|
323
|
-
})]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["model-value"]);
|
|
662
|
+
})]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["class", "model-value", "width", "style"]);
|
|
324
663
|
};
|
|
325
664
|
}
|
|
326
665
|
};
|
|
@@ -1166,16 +1166,25 @@ body .el-overlay-dialog,
|
|
|
1166
1166
|
width: 100%;
|
|
1167
1167
|
height: 100%;
|
|
1168
1168
|
overflow: hidden;
|
|
1169
|
-
|
|
1170
|
-
--pro-layout-
|
|
1171
|
-
--pro-layout-
|
|
1169
|
+
/* 对齐 app-shell-navigation 原型:slate + indigo 壳层 */
|
|
1170
|
+
--pro-layout-shell-bg: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 45%, rgba(238, 242, 255, 0.55) 100%);
|
|
1171
|
+
--pro-layout-shell-radius: 16px;
|
|
1172
|
+
--pro-layout-shell-border: rgba(255, 255, 255, 0.65);
|
|
1173
|
+
--pro-layout-shell-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 40px -8px rgba(15, 23, 42, 0.12);
|
|
1174
|
+
/* accent 系列由 :root(App.vue)注入,组件内仅用 var(--pro-layout-accent, 回退) 消费 */
|
|
1175
|
+
--pro-layout-header-bg: rgba(255, 255, 255, 0.88);
|
|
1176
|
+
--pro-layout-tags-bar-bg: rgba(248, 250, 252, 0.92);
|
|
1177
|
+
--pro-layout-main-bg: #f8fafc;
|
|
1178
|
+
--pro-layout-text: #0f172a;
|
|
1179
|
+
--pro-layout-text-muted: #64748b;
|
|
1172
1180
|
/* 顶栏横向菜单:圆体(可通过 --pro-layout-top-menu-font-family 覆盖) */
|
|
1173
|
-
--pro-layout-top-menu-font-family: 'Yuanti SC', 'Yuanti TC', 'Hiragino Sans GB', 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
|
|
1181
|
+
--pro-layout-top-menu-font-family: 'DM Sans', 'Yuanti SC', 'Yuanti TC', 'Hiragino Sans GB', 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
|
|
1174
1182
|
--pro-layout-top-menu-active-bar-width: 28px;
|
|
1175
1183
|
--pro-layout-top-menu-active-bar-height: 3px;
|
|
1176
|
-
/* 选中态:下划线距菜单项底边的距离(绝对定位,不占文字布局) */
|
|
1177
1184
|
--pro-layout-top-menu-active-bar-offset: 4px;
|
|
1178
|
-
background:
|
|
1185
|
+
background: var(--pro-layout-shell-bg) !important;
|
|
1186
|
+
color: var(--pro-layout-text);
|
|
1187
|
+
font-family: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
|
|
1179
1188
|
}
|
|
1180
1189
|
.pro-layout__sider {
|
|
1181
1190
|
display: flex;
|
|
@@ -1183,15 +1192,16 @@ body .el-overlay-dialog,
|
|
|
1183
1192
|
z-index: 1;
|
|
1184
1193
|
flex-direction: column;
|
|
1185
1194
|
height: 100%;
|
|
1186
|
-
overflow
|
|
1187
|
-
|
|
1188
|
-
|
|
1195
|
+
overflow: hidden !important;
|
|
1196
|
+
border-radius: var(--pro-layout-shell-radius);
|
|
1197
|
+
border: 1px solid var(--pro-layout-shell-border);
|
|
1198
|
+
background: rgba(255, 255, 255, 0.92) !important;
|
|
1199
|
+
box-shadow: var(--pro-layout-shell-shadow);
|
|
1200
|
+
backdrop-filter: blur(10px);
|
|
1201
|
+
-webkit-backdrop-filter: blur(10px);
|
|
1189
1202
|
transition: width 0.3s ease, transform 0.3s ease;
|
|
1190
1203
|
flex-shrink: 0;
|
|
1191
1204
|
}
|
|
1192
|
-
.pro-layout__sider .el-scrollbar__view {
|
|
1193
|
-
overflow: visible;
|
|
1194
|
-
}
|
|
1195
1205
|
.pro-layout__sider .el-scrollbar__wrap {
|
|
1196
1206
|
overflow-x: hidden;
|
|
1197
1207
|
overflow-y: auto;
|
|
@@ -1264,52 +1274,86 @@ body .el-overlay-dialog,
|
|
|
1264
1274
|
.pro-layout__sider .pro-layout__menu-group .el-menu.el-menu--vertical .el-sub-menu__title::after {
|
|
1265
1275
|
display: none !important;
|
|
1266
1276
|
}
|
|
1277
|
+
.pro-layout__sider .el-menu-item,
|
|
1278
|
+
.pro-layout__sider .el-sub-menu__title {
|
|
1279
|
+
height: 44px !important;
|
|
1280
|
+
line-height: 44px !important;
|
|
1281
|
+
margin: 2px calc(8px + var(--pro-el-scrollbar-width, 9px)) 2px 8px !important;
|
|
1282
|
+
border-radius: 12px !important;
|
|
1283
|
+
color: var(--pro-layout-text-muted) !important;
|
|
1284
|
+
transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
|
|
1285
|
+
}
|
|
1286
|
+
.pro-layout__sider .el-menu-item.is-active {
|
|
1287
|
+
background: linear-gradient(135deg, var(--pro-layout-accent-soft, #eef2ff) 0%, var(--pro-layout-accent-muted, #e0e7ff) 100%) !important;
|
|
1288
|
+
color: var(--pro-layout-accent-dark, #4338ca) !important;
|
|
1289
|
+
font-weight: 600;
|
|
1290
|
+
box-shadow: inset 3px 0 0 0 var(--pro-layout-accent, #6366f1);
|
|
1291
|
+
}
|
|
1292
|
+
.pro-layout__sider .el-menu-item:not(.is-active):hover,
|
|
1293
|
+
.pro-layout__sider .el-sub-menu__title:hover {
|
|
1294
|
+
background-color: #f8fafc !important;
|
|
1295
|
+
color: var(--pro-layout-text) !important;
|
|
1296
|
+
}
|
|
1297
|
+
.pro-layout__sider .el-menu--inline .el-menu-item {
|
|
1298
|
+
min-height: 40px !important;
|
|
1299
|
+
height: 40px !important;
|
|
1300
|
+
line-height: 40px !important;
|
|
1301
|
+
margin: 2px 8px 2px 12px !important;
|
|
1302
|
+
border-radius: 8px !important;
|
|
1303
|
+
}
|
|
1304
|
+
.pro-layout__sider .el-sub-menu.is-active > .el-sub-menu__title {
|
|
1305
|
+
color: var(--pro-layout-accent-dark, #4338ca) !important;
|
|
1306
|
+
}
|
|
1267
1307
|
.pro-layout__sider--collapsed {
|
|
1268
1308
|
width: 64px !important;
|
|
1269
1309
|
}
|
|
1270
1310
|
.pro-layout__sider-collapse-btn {
|
|
1271
1311
|
position: absolute !important;
|
|
1272
1312
|
top: 50% !important;
|
|
1273
|
-
right: -
|
|
1313
|
+
right: -14px !important;
|
|
1274
1314
|
transform: translateY(-50%) !important;
|
|
1275
1315
|
z-index: 10 !important;
|
|
1276
|
-
background-color:
|
|
1277
|
-
border:
|
|
1278
|
-
box-shadow: 0
|
|
1279
|
-
transition: all 0.
|
|
1280
|
-
width:
|
|
1281
|
-
height:
|
|
1316
|
+
background-color: #ffffff !important;
|
|
1317
|
+
border: 1px solid rgba(226, 232, 240, 0.92) !important;
|
|
1318
|
+
box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06) !important;
|
|
1319
|
+
transition: all 0.2s ease !important;
|
|
1320
|
+
width: 36px !important;
|
|
1321
|
+
height: 36px !important;
|
|
1282
1322
|
padding: 0 !important;
|
|
1283
|
-
border-radius:
|
|
1284
|
-
color:
|
|
1285
|
-
min-width:
|
|
1286
|
-
min-height:
|
|
1323
|
+
border-radius: 50% !important;
|
|
1324
|
+
color: #64748b !important;
|
|
1325
|
+
min-width: 36px !important;
|
|
1326
|
+
min-height: 36px !important;
|
|
1287
1327
|
}
|
|
1288
1328
|
.pro-layout__sider-collapse-btn:hover {
|
|
1289
|
-
|
|
1329
|
+
border-color: var(--el-color-primary-light-7, #c7d2fe) !important;
|
|
1330
|
+
background-color: var(--pro-layout-accent-soft, #eef2ff) !important;
|
|
1331
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1290
1332
|
}
|
|
1291
1333
|
.pro-layout .el-button.pro-layout__sider-collapse-btn,
|
|
1292
1334
|
.pro-layout .pro-layout__sider-collapse-btn.el-button {
|
|
1293
1335
|
position: absolute !important;
|
|
1294
1336
|
top: 50% !important;
|
|
1295
|
-
right: -
|
|
1337
|
+
right: -14px !important;
|
|
1296
1338
|
transform: translateY(-50%) !important;
|
|
1297
1339
|
z-index: 10 !important;
|
|
1298
|
-
background-color:
|
|
1299
|
-
border:
|
|
1300
|
-
box-shadow: 0
|
|
1301
|
-
transition: all 0.
|
|
1302
|
-
width:
|
|
1303
|
-
height:
|
|
1340
|
+
background-color: #ffffff !important;
|
|
1341
|
+
border: 1px solid rgba(226, 232, 240, 0.92) !important;
|
|
1342
|
+
box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06) !important;
|
|
1343
|
+
transition: all 0.2s ease !important;
|
|
1344
|
+
width: 36px !important;
|
|
1345
|
+
height: 36px !important;
|
|
1304
1346
|
padding: 0 !important;
|
|
1305
|
-
border-radius:
|
|
1306
|
-
color:
|
|
1307
|
-
min-width:
|
|
1308
|
-
min-height:
|
|
1347
|
+
border-radius: 50% !important;
|
|
1348
|
+
color: #64748b !important;
|
|
1349
|
+
min-width: 36px !important;
|
|
1350
|
+
min-height: 36px !important;
|
|
1309
1351
|
}
|
|
1310
1352
|
.pro-layout .el-button.pro-layout__sider-collapse-btn:hover,
|
|
1311
1353
|
.pro-layout .pro-layout__sider-collapse-btn.el-button:hover {
|
|
1312
|
-
|
|
1354
|
+
border-color: var(--el-color-primary-light-7, #c7d2fe) !important;
|
|
1355
|
+
background-color: var(--pro-layout-accent-soft, #eef2ff) !important;
|
|
1356
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1313
1357
|
}
|
|
1314
1358
|
.pro-layout__logo {
|
|
1315
1359
|
display: flex;
|
|
@@ -1325,7 +1369,7 @@ body .el-overlay-dialog,
|
|
|
1325
1369
|
transition: all 0.3s ease;
|
|
1326
1370
|
}
|
|
1327
1371
|
.pro-layout__logo:hover .pro-layout__logo-text {
|
|
1328
|
-
color: var(--
|
|
1372
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1329
1373
|
}
|
|
1330
1374
|
.pro-layout__logo-full {
|
|
1331
1375
|
display: flex;
|
|
@@ -1355,10 +1399,15 @@ body .el-overlay-dialog,
|
|
|
1355
1399
|
font-family: var(--pro-font-family-logo, 'Microsoft YaHei', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', SimSun, sans-serif);
|
|
1356
1400
|
}
|
|
1357
1401
|
.pro-layout__sider-header {
|
|
1358
|
-
padding: 0
|
|
1402
|
+
padding: 0 12px;
|
|
1403
|
+
min-height: 52px;
|
|
1404
|
+
display: flex;
|
|
1405
|
+
align-items: center;
|
|
1406
|
+
border-bottom: 1px solid rgba(241, 245, 249, 0.95);
|
|
1407
|
+
background: linear-gradient(to right, #ffffff, rgba(248, 250, 252, 0.85));
|
|
1359
1408
|
}
|
|
1360
1409
|
.pro-layout__menu-search {
|
|
1361
|
-
padding: 10px
|
|
1410
|
+
padding: 10px 12px;
|
|
1362
1411
|
display: flex;
|
|
1363
1412
|
align-items: center;
|
|
1364
1413
|
}
|
|
@@ -1366,8 +1415,9 @@ body .el-overlay-dialog,
|
|
|
1366
1415
|
width: 100%;
|
|
1367
1416
|
}
|
|
1368
1417
|
.pro-layout__menu-search-input .el-input__wrapper {
|
|
1369
|
-
border-radius:
|
|
1370
|
-
|
|
1418
|
+
border-radius: 12px;
|
|
1419
|
+
border: 1px solid rgba(226, 232, 240, 0.85);
|
|
1420
|
+
background-color: rgba(248, 250, 252, 0.9) !important;
|
|
1371
1421
|
box-shadow: none;
|
|
1372
1422
|
}
|
|
1373
1423
|
.pro-layout__menu-search-input .el-input__inner {
|
|
@@ -1394,17 +1444,18 @@ body .el-overlay-dialog,
|
|
|
1394
1444
|
margin-bottom: 0;
|
|
1395
1445
|
}
|
|
1396
1446
|
.pro-layout__menu-group-header {
|
|
1397
|
-
padding: 12px
|
|
1447
|
+
padding: 10px calc(12px + var(--pro-el-scrollbar-width, 9px)) 6px 12px;
|
|
1398
1448
|
display: flex;
|
|
1399
1449
|
align-items: center;
|
|
1400
1450
|
justify-content: space-between;
|
|
1401
1451
|
position: sticky;
|
|
1402
1452
|
top: 0;
|
|
1403
|
-
z-index:
|
|
1404
|
-
background-color:
|
|
1405
|
-
border-bottom: 1px solid
|
|
1406
|
-
margin-bottom:
|
|
1407
|
-
margin-top:
|
|
1453
|
+
z-index: 3;
|
|
1454
|
+
background-color: #ffffff !important;
|
|
1455
|
+
border-bottom: 1px solid rgba(241, 245, 249, 0.95) !important;
|
|
1456
|
+
margin-bottom: 4px;
|
|
1457
|
+
margin-top: 0;
|
|
1458
|
+
box-shadow: 0 1px 0 #ffffff;
|
|
1408
1459
|
}
|
|
1409
1460
|
.pro-layout__menu-group-header-left {
|
|
1410
1461
|
display: flex;
|
|
@@ -1428,7 +1479,7 @@ body .el-overlay-dialog,
|
|
|
1428
1479
|
flex-shrink: 0;
|
|
1429
1480
|
}
|
|
1430
1481
|
.pro-layout__menu-group-toggle:hover {
|
|
1431
|
-
color: var(--
|
|
1482
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1432
1483
|
}
|
|
1433
1484
|
.pro-layout__menu-group-actions {
|
|
1434
1485
|
display: flex;
|
|
@@ -1436,18 +1487,20 @@ body .el-overlay-dialog,
|
|
|
1436
1487
|
gap: 8px;
|
|
1437
1488
|
}
|
|
1438
1489
|
.pro-layout__common-menus {
|
|
1439
|
-
padding: 12px
|
|
1440
|
-
border-bottom: 1px solid
|
|
1490
|
+
padding: 12px 12px;
|
|
1491
|
+
border-bottom: 1px solid rgba(241, 245, 249, 0.95) !important;
|
|
1441
1492
|
display: flex;
|
|
1442
1493
|
align-items: center;
|
|
1443
1494
|
}
|
|
1444
1495
|
.pro-layout__common-menus-title {
|
|
1445
|
-
font-size:
|
|
1446
|
-
|
|
1496
|
+
font-size: 12px;
|
|
1497
|
+
font-weight: 600;
|
|
1498
|
+
letter-spacing: 0.02em;
|
|
1499
|
+
color: var(--pro-layout-text-muted) !important;
|
|
1447
1500
|
margin-bottom: 8px;
|
|
1448
1501
|
}
|
|
1449
1502
|
.pro-layout__common-menus-count {
|
|
1450
|
-
color: var(--
|
|
1503
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1451
1504
|
margin-left: 4px;
|
|
1452
1505
|
}
|
|
1453
1506
|
.pro-layout__common-menus-btn {
|
|
@@ -1460,6 +1513,13 @@ body .el-overlay-dialog,
|
|
|
1460
1513
|
.pro-layout__menu-scrollbar {
|
|
1461
1514
|
flex: 1;
|
|
1462
1515
|
overflow: hidden;
|
|
1516
|
+
/* 不可设 overflow:hidden,否则分组头 position:sticky 失效 */
|
|
1517
|
+
}
|
|
1518
|
+
.pro-layout__menu-scrollbar .el-scrollbar__view {
|
|
1519
|
+
overflow: visible;
|
|
1520
|
+
}
|
|
1521
|
+
.pro-layout__menu-scrollbar .el-scrollbar__bar.is-vertical {
|
|
1522
|
+
z-index: 5;
|
|
1463
1523
|
}
|
|
1464
1524
|
.pro-layout__menu {
|
|
1465
1525
|
border-right: none;
|
|
@@ -1505,14 +1565,26 @@ body .el-overlay-dialog,
|
|
|
1505
1565
|
width: 100%;
|
|
1506
1566
|
overflow: hidden;
|
|
1507
1567
|
position: relative;
|
|
1568
|
+
padding: 16px;
|
|
1569
|
+
padding-top: 12px;
|
|
1570
|
+
gap: 16px;
|
|
1571
|
+
box-sizing: border-box;
|
|
1572
|
+
background: transparent;
|
|
1573
|
+
min-height: 0;
|
|
1508
1574
|
}
|
|
1509
1575
|
.pro-layout__header {
|
|
1510
1576
|
padding: 0 !important;
|
|
1511
1577
|
background: var(--pro-layout-header-bg) !important;
|
|
1512
1578
|
position: relative;
|
|
1513
1579
|
z-index: 100;
|
|
1514
|
-
width:
|
|
1515
|
-
|
|
1580
|
+
width: calc(68%) !important;
|
|
1581
|
+
margin: 16px 16px 0;
|
|
1582
|
+
border-radius: var(--pro-layout-shell-radius);
|
|
1583
|
+
border: 1px solid var(--pro-layout-shell-border);
|
|
1584
|
+
box-shadow: var(--pro-layout-shell-shadow);
|
|
1585
|
+
backdrop-filter: blur(12px);
|
|
1586
|
+
-webkit-backdrop-filter: blur(12px);
|
|
1587
|
+
border-bottom: none !important;
|
|
1516
1588
|
}
|
|
1517
1589
|
.pro-layout__header--fixed {
|
|
1518
1590
|
position: fixed;
|
|
@@ -1520,6 +1592,13 @@ body .el-overlay-dialog,
|
|
|
1520
1592
|
left: 0;
|
|
1521
1593
|
right: 0;
|
|
1522
1594
|
z-index: 1000;
|
|
1595
|
+
width: 100vw !important;
|
|
1596
|
+
margin: 0;
|
|
1597
|
+
border-radius: 0;
|
|
1598
|
+
border-left: none;
|
|
1599
|
+
border-right: none;
|
|
1600
|
+
border-top: none;
|
|
1601
|
+
border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
|
|
1523
1602
|
}
|
|
1524
1603
|
.pro-layout__header-content {
|
|
1525
1604
|
display: flex;
|
|
@@ -1570,36 +1649,61 @@ body .el-overlay-dialog,
|
|
|
1570
1649
|
.pro-layout__header-search {
|
|
1571
1650
|
width: 180px;
|
|
1572
1651
|
flex-shrink: 0;
|
|
1652
|
+
height: 28px;
|
|
1653
|
+
line-height: 28px;
|
|
1654
|
+
}
|
|
1655
|
+
.pro-layout__header-search .el-input {
|
|
1656
|
+
height: 28px;
|
|
1657
|
+
--el-input-height: 28px;
|
|
1573
1658
|
}
|
|
1574
1659
|
.pro-layout__header-search .el-input__wrapper {
|
|
1575
|
-
padding:
|
|
1576
|
-
height:
|
|
1660
|
+
padding: 0 10px;
|
|
1661
|
+
min-height: 28px !important;
|
|
1662
|
+
height: 28px !important;
|
|
1577
1663
|
border-radius: 8px;
|
|
1578
|
-
border
|
|
1579
|
-
|
|
1664
|
+
border: 1px solid rgba(226, 232, 240, 0.85) !important;
|
|
1665
|
+
background: rgba(248, 250, 252, 0.85) !important;
|
|
1666
|
+
box-shadow: none;
|
|
1667
|
+
box-sizing: border-box;
|
|
1580
1668
|
}
|
|
1581
1669
|
.pro-layout__header-search .el-input__inner {
|
|
1582
|
-
|
|
1670
|
+
height: 26px;
|
|
1671
|
+
line-height: 26px;
|
|
1672
|
+
font-size: 12px;
|
|
1583
1673
|
padding: 0;
|
|
1584
1674
|
}
|
|
1585
1675
|
.pro-layout__header-search .el-input__inner::placeholder {
|
|
1676
|
+
font-size: 12px;
|
|
1586
1677
|
color: var(--el-text-color-placeholder, #c0c4cc) !important;
|
|
1587
1678
|
}
|
|
1679
|
+
.pro-layout__header-search .el-input__suffix {
|
|
1680
|
+
height: 26px;
|
|
1681
|
+
display: flex;
|
|
1682
|
+
align-items: center;
|
|
1683
|
+
}
|
|
1588
1684
|
.pro-layout__header-search-icon {
|
|
1685
|
+
font-size: 14px;
|
|
1589
1686
|
color: var(--el-text-color-placeholder, #c0c4cc) !important;
|
|
1590
1687
|
}
|
|
1591
1688
|
.pro-layout__header-action-btn {
|
|
1592
|
-
|
|
1689
|
+
width: 32px !important;
|
|
1690
|
+
height: 32px !important;
|
|
1691
|
+
border-radius: 12px !important;
|
|
1692
|
+
border: 1px solid rgba(226, 232, 240, 0.85) !important;
|
|
1693
|
+
background: #ffffff !important;
|
|
1694
|
+
color: var(--pro-layout-text-muted) !important;
|
|
1593
1695
|
font-size: 18px;
|
|
1594
1696
|
}
|
|
1595
1697
|
.pro-layout__header-action-btn .el-icon {
|
|
1596
|
-
color: var(--
|
|
1698
|
+
color: var(--pro-layout-text-muted) !important;
|
|
1597
1699
|
}
|
|
1598
1700
|
.pro-layout__header-action-btn:hover {
|
|
1599
|
-
color: var(--el-
|
|
1701
|
+
border-color: var(--el-color-primary-light-7, #c7d2fe) !important;
|
|
1702
|
+
background: var(--pro-layout-accent-soft, #eef2ff) !important;
|
|
1703
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1600
1704
|
}
|
|
1601
1705
|
.pro-layout__header-action-btn:hover .el-icon {
|
|
1602
|
-
color: var(--
|
|
1706
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
1603
1707
|
}
|
|
1604
1708
|
.pro-layout__header-action-btn + .pro-layout__header-action-btn {
|
|
1605
1709
|
margin-left: 0 !important;
|
|
@@ -1614,12 +1718,14 @@ body .el-overlay-dialog,
|
|
|
1614
1718
|
display: flex;
|
|
1615
1719
|
align-items: center;
|
|
1616
1720
|
gap: 8px;
|
|
1617
|
-
padding:
|
|
1618
|
-
border-radius:
|
|
1619
|
-
|
|
1721
|
+
padding: 6px 10px;
|
|
1722
|
+
border-radius: 12px;
|
|
1723
|
+
border: 1px solid transparent;
|
|
1724
|
+
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
1620
1725
|
}
|
|
1621
1726
|
.pro-layout__header-user-info:hover {
|
|
1622
|
-
background-color: var(--
|
|
1727
|
+
background-color: var(--pro-layout-accent-soft, #eef2ff) !important;
|
|
1728
|
+
border-color: var(--el-color-primary-light-7, #c7d2fe) !important;
|
|
1623
1729
|
}
|
|
1624
1730
|
.pro-layout__header-user-avatar {
|
|
1625
1731
|
font-size: 20px;
|
|
@@ -1642,7 +1748,12 @@ body .el-overlay-dialog,
|
|
|
1642
1748
|
.pro-layout .pro-layout__header-right .pro-layout__header-search {
|
|
1643
1749
|
flex-shrink: 1;
|
|
1644
1750
|
min-width: 0;
|
|
1645
|
-
max-width:
|
|
1751
|
+
max-width: 200px;
|
|
1752
|
+
height: 28px;
|
|
1753
|
+
}
|
|
1754
|
+
.pro-layout .pro-layout__header-right .pro-layout__header-search .el-input__wrapper {
|
|
1755
|
+
min-height: 28px !important;
|
|
1756
|
+
height: 28px !important;
|
|
1646
1757
|
}
|
|
1647
1758
|
.pro-layout .pro-layout__header-right .pro-layout__header-user-name {
|
|
1648
1759
|
flex-shrink: 0;
|
|
@@ -1811,8 +1922,8 @@ body .el-overlay-dialog,
|
|
|
1811
1922
|
color: rgba(0, 0, 0, 0.92) !important;
|
|
1812
1923
|
}
|
|
1813
1924
|
.pro-layout__top-menu .el-menu-item.pro-layout__top-menu-item--lead.is-active {
|
|
1814
|
-
background: var(--
|
|
1815
|
-
color: var(--
|
|
1925
|
+
background: linear-gradient(135deg, var(--pro-layout-accent-soft, #eef2ff) 0%, var(--pro-layout-accent-muted, #e0e7ff) 100%) !important;
|
|
1926
|
+
color: var(--pro-layout-accent-dark, #4338ca) !important;
|
|
1816
1927
|
font-weight: 600 !important;
|
|
1817
1928
|
box-shadow: none !important;
|
|
1818
1929
|
}
|
|
@@ -1878,8 +1989,8 @@ body .el-overlay-dialog,
|
|
|
1878
1989
|
height: var(--pro-layout-top-menu-active-bar-height);
|
|
1879
1990
|
transform: translateX(-50%);
|
|
1880
1991
|
border-radius: 999px;
|
|
1881
|
-
background: var(--
|
|
1882
|
-
box-shadow: 0 1px 4px color-mix(in srgb, var(--
|
|
1992
|
+
background: var(--pro-layout-accent, #6366f1);
|
|
1993
|
+
box-shadow: 0 1px 4px color-mix(in srgb, var(--pro-layout-accent, #6366f1) 35%, transparent);
|
|
1883
1994
|
pointer-events: none;
|
|
1884
1995
|
z-index: 1;
|
|
1885
1996
|
}
|
|
@@ -1902,8 +2013,8 @@ body .el-overlay-dialog,
|
|
|
1902
2013
|
height: var(--pro-layout-top-menu-active-bar-height);
|
|
1903
2014
|
transform: translateX(-50%);
|
|
1904
2015
|
border-radius: 999px;
|
|
1905
|
-
background: var(--
|
|
1906
|
-
box-shadow: 0 1px 4px color-mix(in srgb, var(--
|
|
2016
|
+
background: var(--pro-layout-accent, #6366f1);
|
|
2017
|
+
box-shadow: 0 1px 4px color-mix(in srgb, var(--pro-layout-accent, #6366f1) 35%, transparent);
|
|
1907
2018
|
pointer-events: none;
|
|
1908
2019
|
z-index: 1;
|
|
1909
2020
|
}
|
|
@@ -1985,6 +2096,13 @@ body .el-overlay-dialog,
|
|
|
1985
2096
|
flex: 1 !important;
|
|
1986
2097
|
width: 0 !important;
|
|
1987
2098
|
overflow: hidden !important;
|
|
2099
|
+
border-radius: var(--pro-layout-shell-radius);
|
|
2100
|
+
border: 1px solid var(--pro-layout-shell-border);
|
|
2101
|
+
background: rgba(255, 255, 255, 0.92) !important;
|
|
2102
|
+
box-shadow: var(--pro-layout-shell-shadow);
|
|
2103
|
+
backdrop-filter: blur(8px);
|
|
2104
|
+
-webkit-backdrop-filter: blur(8px);
|
|
2105
|
+
min-height: 0;
|
|
1988
2106
|
}
|
|
1989
2107
|
.pro-layout__tags-view {
|
|
1990
2108
|
flex-shrink: 0;
|
|
@@ -1993,24 +2111,24 @@ body .el-overlay-dialog,
|
|
|
1993
2111
|
margin: 0 !important;
|
|
1994
2112
|
display: flex;
|
|
1995
2113
|
flex-direction: column;
|
|
1996
|
-
background: var(--pro-layout-
|
|
1997
|
-
border-bottom:
|
|
2114
|
+
background: var(--pro-layout-tags-bar-bg) !important;
|
|
2115
|
+
border-bottom: 1px solid rgba(241, 245, 249, 0.95) !important;
|
|
1998
2116
|
overflow: visible;
|
|
1999
2117
|
}
|
|
2000
2118
|
.pro-layout__tags-menu {
|
|
2001
|
-
--el-menu-bg-color: var(--pro-layout-
|
|
2119
|
+
--el-menu-bg-color: var(--pro-layout-tags-bar-bg) !important;
|
|
2002
2120
|
display: flex !important;
|
|
2003
2121
|
flex: 1 1 auto;
|
|
2004
2122
|
align-self: stretch;
|
|
2005
|
-
align-items:
|
|
2123
|
+
align-items: center;
|
|
2006
2124
|
flex-wrap: nowrap !important;
|
|
2007
2125
|
overflow-x: auto !important;
|
|
2008
2126
|
overflow-y: visible !important;
|
|
2009
|
-
padding:
|
|
2127
|
+
padding: 12px 16px !important;
|
|
2010
2128
|
margin: 0 !important;
|
|
2011
2129
|
border: none !important;
|
|
2012
2130
|
outline: none;
|
|
2013
|
-
background: var(--pro-layout-
|
|
2131
|
+
background: var(--pro-layout-tags-bar-bg) !important;
|
|
2014
2132
|
min-height: 100%;
|
|
2015
2133
|
width: 100%;
|
|
2016
2134
|
height: auto !important;
|
|
@@ -2022,68 +2140,50 @@ body .el-overlay-dialog,
|
|
|
2022
2140
|
}
|
|
2023
2141
|
.pro-layout__tags-menu .el-menu-item {
|
|
2024
2142
|
flex: 0 0 auto;
|
|
2025
|
-
height:
|
|
2026
|
-
line-height:
|
|
2027
|
-
margin-right:
|
|
2143
|
+
height: 32px !important;
|
|
2144
|
+
line-height: 32px !important;
|
|
2145
|
+
margin-right: 6px !important;
|
|
2028
2146
|
margin-top: 0;
|
|
2029
2147
|
margin-bottom: 0;
|
|
2030
2148
|
padding: 0 12px !important;
|
|
2031
|
-
border-radius:
|
|
2032
|
-
border:
|
|
2033
|
-
border-bottom: none !important;
|
|
2149
|
+
border-radius: 9999px !important;
|
|
2150
|
+
border: 1px solid transparent !important;
|
|
2034
2151
|
background: transparent !important;
|
|
2035
|
-
transition: color 0.
|
|
2152
|
+
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
|
2036
2153
|
position: relative;
|
|
2037
2154
|
cursor: pointer;
|
|
2038
2155
|
display: flex;
|
|
2039
2156
|
align-items: center;
|
|
2040
2157
|
}
|
|
2041
2158
|
.pro-layout__tags-menu .el-menu-item:not(.is-active):hover {
|
|
2042
|
-
background:
|
|
2159
|
+
background: rgba(241, 245, 249, 0.9) !important;
|
|
2160
|
+
border-color: rgba(226, 232, 240, 0.7) !important;
|
|
2043
2161
|
}
|
|
2044
2162
|
.pro-layout__tags-menu .el-menu-item.is-active {
|
|
2045
2163
|
z-index: 2;
|
|
2046
|
-
border:
|
|
2047
|
-
background:
|
|
2048
|
-
box-shadow:
|
|
2049
|
-
border-bottom: none !important;
|
|
2164
|
+
border: 1px solid rgba(226, 232, 240, 0.9) !important;
|
|
2165
|
+
background: #ffffff !important;
|
|
2166
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
|
|
2050
2167
|
overflow: visible;
|
|
2051
2168
|
}
|
|
2052
|
-
.pro-layout__tags-menu .el-menu-item.is-active::before
|
|
2053
|
-
content: '';
|
|
2054
|
-
position: absolute;
|
|
2055
|
-
left: -8px;
|
|
2056
|
-
bottom: 0;
|
|
2057
|
-
width: 8px;
|
|
2058
|
-
height: 8px;
|
|
2059
|
-
background: var(--pro-layout-tags-bar-bg);
|
|
2060
|
-
border-bottom-right-radius: 8px;
|
|
2061
|
-
box-shadow: 2px 2px 0 0 var(--pro-layout-main-bg);
|
|
2062
|
-
}
|
|
2169
|
+
.pro-layout__tags-menu .el-menu-item.is-active::before,
|
|
2063
2170
|
.pro-layout__tags-menu .el-menu-item.is-active::after {
|
|
2064
|
-
|
|
2065
|
-
position: absolute;
|
|
2066
|
-
right: -8px;
|
|
2067
|
-
bottom: 0;
|
|
2068
|
-
width: 8px;
|
|
2069
|
-
height: 8px;
|
|
2070
|
-
background: var(--pro-layout-tags-bar-bg);
|
|
2071
|
-
border-bottom-left-radius: 8px;
|
|
2072
|
-
box-shadow: -2px 2px 0 0 var(--pro-layout-main-bg);
|
|
2171
|
+
display: none !important;
|
|
2073
2172
|
}
|
|
2074
2173
|
.pro-layout__tags-menu .pro-layout__tag-item--affix {
|
|
2075
2174
|
padding: 0 10px !important;
|
|
2076
2175
|
min-width: 40px;
|
|
2077
2176
|
justify-content: center;
|
|
2078
|
-
border-radius:
|
|
2177
|
+
border-radius: 9999px !important;
|
|
2079
2178
|
}
|
|
2080
|
-
.pro-layout__tags-menu .pro-layout__tag-item--affix.is-active::before
|
|
2081
|
-
|
|
2179
|
+
.pro-layout__tags-menu .pro-layout__tag-item--affix.is-active::before,
|
|
2180
|
+
.pro-layout__tags-menu .pro-layout__tag-item--affix.is-active::after {
|
|
2181
|
+
display: none !important;
|
|
2082
2182
|
}
|
|
2083
2183
|
.pro-layout__tags-menu .pro-layout__tag-label {
|
|
2084
|
-
color:
|
|
2184
|
+
color: var(--pro-layout-text-muted);
|
|
2085
2185
|
font-size: 12px;
|
|
2086
|
-
font-weight:
|
|
2186
|
+
font-weight: 600;
|
|
2087
2187
|
text-decoration: none !important;
|
|
2088
2188
|
}
|
|
2089
2189
|
.pro-layout__tags-menu .pro-layout__tag-label--affix-icon {
|
|
@@ -2098,17 +2198,17 @@ body .el-overlay-dialog,
|
|
|
2098
2198
|
color: #5c6c84;
|
|
2099
2199
|
}
|
|
2100
2200
|
.pro-layout__tags-menu .pro-layout__tag-item--affix.is-active .pro-layout__tag-label--affix-icon .el-icon {
|
|
2101
|
-
color: var(--
|
|
2201
|
+
color: var(--pro-layout-accent, #6366f1);
|
|
2102
2202
|
}
|
|
2103
2203
|
.pro-layout__tags-menu .el-menu-item.is-active .pro-layout__tag-label:not(.pro-layout__tag-label--affix-icon) {
|
|
2104
|
-
color: var(--
|
|
2204
|
+
color: var(--pro-layout-accent-dark, #4338ca) !important;
|
|
2105
2205
|
font-weight: 600;
|
|
2106
2206
|
}
|
|
2107
2207
|
.pro-layout__tags-menu .el-menu-item:not(.is-active):hover .pro-layout__tag-label:not(.pro-layout__tag-label--affix-icon) {
|
|
2108
|
-
color: var(--
|
|
2208
|
+
color: var(--pro-layout-text) !important;
|
|
2109
2209
|
}
|
|
2110
2210
|
.pro-layout__tags-menu .el-menu-item:not(.is-active):hover .pro-layout__tag-label--affix-icon .el-icon {
|
|
2111
|
-
color: var(--
|
|
2211
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
2112
2212
|
}
|
|
2113
2213
|
.pro-layout__tags-menu .pro-layout__tag-actions .pro-layout__tag-icon {
|
|
2114
2214
|
color: #8a98b2;
|
|
@@ -2126,16 +2226,16 @@ body .el-overlay-dialog,
|
|
|
2126
2226
|
}
|
|
2127
2227
|
.pro-layout__tags-menu .pro-layout__tag-item:hover .pro-layout__tag-actions .pro-layout__tag-icon,
|
|
2128
2228
|
.pro-layout__tags-menu .pro-layout__tag-actions .pro-layout__tag-icon:hover {
|
|
2129
|
-
color: #
|
|
2229
|
+
color: var(--pro-layout-accent, #6366f1) !important;
|
|
2130
2230
|
}
|
|
2131
2231
|
.pro-layout__tags-menu > .el-sub-menu {
|
|
2132
2232
|
margin-left: auto !important;
|
|
2133
2233
|
position: sticky;
|
|
2134
2234
|
right: 0;
|
|
2135
2235
|
z-index: 2;
|
|
2136
|
-
border-radius:
|
|
2137
|
-
background: linear-gradient(90deg, rgba(
|
|
2138
|
-
box-shadow: -10px 0 14px -12px rgba(
|
|
2236
|
+
border-radius: 12px;
|
|
2237
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
|
|
2238
|
+
box-shadow: -10px 0 14px -12px rgba(15, 23, 42, 0.08);
|
|
2139
2239
|
}
|
|
2140
2240
|
.pro-layout__tag-item {
|
|
2141
2241
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deppon/deppon-template",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"less": "^4.2.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@deppon/deppon-assets": "2.
|
|
47
|
-
"@deppon/deppon-request": "2.
|
|
48
|
-
"@deppon/deppon-router": "2.
|
|
49
|
-
"@deppon/deppon-ui": "2.
|
|
50
|
-
"@deppon/deppon-utils": "2.
|
|
46
|
+
"@deppon/deppon-assets": "2.5.3",
|
|
47
|
+
"@deppon/deppon-request": "2.5.3",
|
|
48
|
+
"@deppon/deppon-router": "2.5.3",
|
|
49
|
+
"@deppon/deppon-ui": "2.5.3",
|
|
50
|
+
"@deppon/deppon-utils": "2.5.3",
|
|
51
51
|
"dayjs": "^1.11.10",
|
|
52
52
|
"lodash-es": "^4.17.21",
|
|
53
53
|
"mitt": "^3.0.1"
|