实现功能:当内容区只包含一个Panel时,拖动Panel标题栏可以移动Area
This commit is contained in:
@@ -110,8 +110,8 @@ const addFloatingPanel = () => {
|
|||||||
title: `面板 1`,
|
title: `面板 1`,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
width: 300, // 与Area宽度相同
|
width: 100,
|
||||||
height: 250, // 与Area高度相同
|
height: 100,
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
toolbarExpanded: false
|
toolbarExpanded: false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel absolute bg-white shadow rounded border overflow-hidden"
|
<div class="panel bg-white shadow overflow-hidden"
|
||||||
:style="{ top: y + 'px', left: x + 'px', width: width + 'px', height: height + 'px' }">
|
:style="{ width: '100%', height: '100%' }">
|
||||||
<div class="flex flex-col h-full">
|
<div class="flex flex-col h-full">
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏 -->
|
||||||
<div class="title-bar h-6 bg-[#435d9c] text-white px-2 flex items-center justify-between select-none cursor-move"
|
<div class="title-bar h-6 bg-[#435d9c] text-white px-2 flex items-center justify-between select-none cursor-move"
|
||||||
|
|||||||
Reference in New Issue
Block a user