|
@@ -11,13 +11,35 @@
|
|
|
<div class="center_in_column">
|
|
|
<div class="dpjis">
|
|
|
<!-- 上 -->
|
|
|
- <div class="jAgYAh"></div>
|
|
|
+ <el-tooltip content="固定顶部" placement="left" effect="light" v-if="topFlag">
|
|
|
+ <div class="jAgYAh" @click="reversal('top')"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="cPsGLK" v-else>
|
|
|
+ <input class="bcwrvZ_input" ref="inputRef" v-model="topNumber" type="number" @blur="handleBlur"
|
|
|
+ v-if="topInput">
|
|
|
+ <p class="bcwrvZ" @dblclick="handleDoubleClick" v-else>35</p>
|
|
|
+ </div>
|
|
|
<!-- 右 -->
|
|
|
- <div class="bTzFoR"></div>
|
|
|
+ <el-tooltip content="固定右侧" placement="left" effect="light" v-if="rightFlag">
|
|
|
+ <div class="bTzFoR" @click="reversal('right')"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="gjYPCM" v-else>
|
|
|
+ <p class="cMizyy">35</p>
|
|
|
+ </div>
|
|
|
<!-- 下 -->
|
|
|
- <div class="eIwCFM"></div>
|
|
|
+ <el-tooltip content="固定底部" placement="left" effect="light" v-if="bottomFlag">
|
|
|
+ <div class="eIwCFM" @click="reversal('bottom')"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="YoRMb" v-else>
|
|
|
+ <p class="gboeoP">35</p>
|
|
|
+ </div>
|
|
|
<!-- 左 -->
|
|
|
- <div class="fVBVzi"></div>
|
|
|
+ <el-tooltip content="固定左侧" placement="left" effect="light" v-if="leftFlag">
|
|
|
+ <div class="fVBVzi" @click="reversal('left')"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="ljHwKA" v-else>
|
|
|
+ <p class="eEegxJ">35</p>
|
|
|
+ </div>
|
|
|
<!-- 视图盒子 -->
|
|
|
<div class="box_view"></div>
|
|
|
</div>
|
|
@@ -41,23 +63,77 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
+// 固定宽度
|
|
|
const fixedWidth = ref(true)
|
|
|
+// 固定高度
|
|
|
const fixedHeight = ref(true)
|
|
|
-
|
|
|
+// 固定顶部
|
|
|
+const topFlag = ref(false)
|
|
|
+const topInput = ref(false)
|
|
|
+const topNumber: any = ref(22)
|
|
|
+// 固定右侧
|
|
|
+const rightFlag = ref(true)
|
|
|
+const rightInput = ref(false)
|
|
|
+// 固定底部
|
|
|
+const bottomFlag = ref(true)
|
|
|
+const bottomFInput = ref(false)
|
|
|
+// 固定左侧
|
|
|
+const leftFlag = ref(false)
|
|
|
+const leftInput = ref(false)
|
|
|
+
|
|
|
+const inputRef = ref<HTMLInputElement | null>(null);
|
|
|
+// 双击输入框获取焦点
|
|
|
+function handleDoubleClick() {
|
|
|
+ topInput.value = true
|
|
|
+ setTimeout(() => {
|
|
|
+ if (inputRef.value) {
|
|
|
+ inputRef.value.focus();
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+// 失去焦点
|
|
|
+function handleBlur() {
|
|
|
+ topInput.value = false
|
|
|
+}
|
|
|
// 固定宽度
|
|
|
function getFixedWidth() {
|
|
|
if (fixedWidth.value) {
|
|
|
fixedWidth.value = false
|
|
|
+ rightFlag.value = false
|
|
|
+ leftFlag.value = false
|
|
|
} else {
|
|
|
fixedWidth.value = true
|
|
|
+ rightFlag.value = true
|
|
|
+ leftFlag.value = false
|
|
|
}
|
|
|
}
|
|
|
// 固定高度
|
|
|
function getFixedHeight() {
|
|
|
if (fixedHeight.value) {
|
|
|
fixedHeight.value = false
|
|
|
+ topFlag.value = false
|
|
|
+ bottomFlag.value = false
|
|
|
} else {
|
|
|
fixedHeight.value = true
|
|
|
+ topFlag.value = false
|
|
|
+ bottomFlag.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+//反转/切换
|
|
|
+function reversal(params: any) {
|
|
|
+ console.log(params, 665);
|
|
|
+ if (params == 'top') {
|
|
|
+ topFlag.value = false
|
|
|
+ bottomFlag.value = true
|
|
|
+ } else if (params == 'right') {
|
|
|
+ rightFlag.value = false
|
|
|
+ leftFlag.value = true
|
|
|
+ } else if (params == 'bottom') {
|
|
|
+ bottomFlag.value = false
|
|
|
+ topFlag.value = true
|
|
|
+ } else if (params == 'left') {
|
|
|
+ leftFlag.value = false
|
|
|
+ rightFlag.value = true
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -111,6 +187,64 @@ function getFixedHeight() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.cPsGLK {
|
|
|
+ top: 0px;
|
|
|
+ left: 79px;
|
|
|
+ width: 2px;
|
|
|
+ height: 36px;
|
|
|
+ background: rgba(15, 116, 231, 0.3);
|
|
|
+ position: absolute;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.bcwrvZ {
|
|
|
+ width: 39px;
|
|
|
+ height: 22px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ border-radius: 11px;
|
|
|
+ position: absolute;
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ align-items: center;
|
|
|
+ -webkit-box-pack: center;
|
|
|
+ justify-content: center;
|
|
|
+ top: 8px;
|
|
|
+ left: -19px;
|
|
|
+}
|
|
|
+
|
|
|
+.bcwrvZ_input {
|
|
|
+ border-radius: 11px;
|
|
|
+ width: 39px;
|
|
|
+ height: 22px;
|
|
|
+ position: absolute;
|
|
|
+ top: 8px;
|
|
|
+ left: -19px;
|
|
|
+ border: 1px solid rgb(15, 115, 230);
|
|
|
+ text-align: center;
|
|
|
+ color: rgb(15, 115, 230);
|
|
|
+}
|
|
|
+
|
|
|
+input[type="number"]::-webkit-inner-spin-button,
|
|
|
+input[type="number"]::-webkit-outer-spin-button {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+
|
|
|
+input[type="number"] {
|
|
|
+ -moz-appearance: textfield;
|
|
|
+ /* Firefox */
|
|
|
+}
|
|
|
+
|
|
|
+/* 可选:去除上下箭头 */
|
|
|
+input[type="number"] {
|
|
|
+ caret-color: rgb(15, 115, 230);
|
|
|
+}
|
|
|
+
|
|
|
+input[type="number"]:focus {
|
|
|
+ outline: none;
|
|
|
+}
|
|
|
+
|
|
|
.bTzFoR {
|
|
|
position: absolute;
|
|
|
height: 35px;
|
|
@@ -138,6 +272,32 @@ function getFixedHeight() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.gjYPCM {
|
|
|
+ top: 50px;
|
|
|
+ right: 0px;
|
|
|
+ height: 2px;
|
|
|
+ width: 53px;
|
|
|
+ background: rgba(15, 116, 231, 0.3);
|
|
|
+ position: absolute;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.cMizyy {
|
|
|
+ width: 39px;
|
|
|
+ height: 22px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ border-radius: 11px;
|
|
|
+ position: absolute;
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ align-items: center;
|
|
|
+ -webkit-box-pack: center;
|
|
|
+ justify-content: center;
|
|
|
+ top: -11px;
|
|
|
+ left: 6px;
|
|
|
+}
|
|
|
+
|
|
|
.eIwCFM {
|
|
|
position: absolute;
|
|
|
height: 21px;
|
|
@@ -165,6 +325,32 @@ function getFixedHeight() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.YoRMb {
|
|
|
+ bottom: 0px;
|
|
|
+ right: 76px;
|
|
|
+ position: absolute;
|
|
|
+ height: 36px;
|
|
|
+ width: 2px;
|
|
|
+ background: rgba(15, 116, 231, 0.3);
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.gboeoP {
|
|
|
+ width: 39px;
|
|
|
+ height: 22px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ border-radius: 11px;
|
|
|
+ position: absolute;
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ align-items: center;
|
|
|
+ -webkit-box-pack: center;
|
|
|
+ justify-content: center;
|
|
|
+ top: 8px;
|
|
|
+ left: -19px;
|
|
|
+}
|
|
|
+
|
|
|
.fVBVzi {
|
|
|
position: absolute;
|
|
|
height: 35px;
|
|
@@ -192,6 +378,32 @@ function getFixedHeight() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.ljHwKA {
|
|
|
+ top: 50px;
|
|
|
+ left: 0px;
|
|
|
+ height: 2px;
|
|
|
+ width: 53px;
|
|
|
+ background: rgba(15, 116, 231, 0.3);
|
|
|
+ position: absolute;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.eEegxJ {
|
|
|
+ width: 39px;
|
|
|
+ height: 22px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ border-radius: 11px;
|
|
|
+ position: absolute;
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ align-items: center;
|
|
|
+ -webkit-box-pack: center;
|
|
|
+ justify-content: center;
|
|
|
+ top: -11px;
|
|
|
+ left: 7px;
|
|
|
+}
|
|
|
+
|
|
|
.kdbebz {
|
|
|
width: 100px;
|
|
|
height: 100px;
|
|
@@ -330,4 +542,5 @@ function getFixedHeight() {
|
|
|
margin-top: 8px;
|
|
|
text-align: center;
|
|
|
transform: scale(0.85);
|
|
|
-}</style>
|
|
|
+}
|
|
|
+</style>
|