|
@@ -1,8 +1,333 @@
|
|
|
<template>
|
|
|
- <!-- 布局组件 -->
|
|
|
- <div>test</div>
|
|
|
+ <!-- 布局组件 -->
|
|
|
+ <div class="box_padding">
|
|
|
+ <div class="same_row_in">
|
|
|
+ <span class="default_size title_5">布局</span>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ <div class="same_row_in" style="padding: 18px 0px 13px;">
|
|
|
+ <div class="center_in_column">
|
|
|
+ <div class="dpjis">
|
|
|
+ <!-- 上 -->
|
|
|
+ <div class="jAgYAh"></div>
|
|
|
+ <!-- 右 -->
|
|
|
+ <div class="bTzFoR"></div>
|
|
|
+ <!-- 下 -->
|
|
|
+ <div class="eIwCFM"></div>
|
|
|
+ <!-- 左 -->
|
|
|
+ <div class="fVBVzi"></div>
|
|
|
+ <!-- 视图盒子 -->
|
|
|
+ <div class="box_view"></div>
|
|
|
+ </div>
|
|
|
+ <div class="iUnNSJ">靠边固定</div>
|
|
|
+ </div>
|
|
|
+ <div class="center_in_column" style="margin-left: 11px;">
|
|
|
+ <div class="kdbebz">
|
|
|
+ <el-tooltip content="固定宽度" placement="top">
|
|
|
+ <div :class="fixedWidth ? 'kEmrUa' : 'hIrtuZ'" @click="getFixedWidth"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip content="固定高度" placement="top">
|
|
|
+ <div :class="fixedHeight ? 'hXQonZ' : 'tOPsm'" @click="getFixedHeight"></div>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="iUnNSJ">固定尺寸</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts"></script>
|
|
|
+<script setup lang="ts">
|
|
|
+import { ref } from "vue";
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+const fixedWidth = ref(true)
|
|
|
+const fixedHeight = ref(true)
|
|
|
+
|
|
|
+// 固定宽度
|
|
|
+function getFixedWidth() {
|
|
|
+ if (fixedWidth.value) {
|
|
|
+ fixedWidth.value = false
|
|
|
+ } else {
|
|
|
+ fixedWidth.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+// 固定高度
|
|
|
+function getFixedHeight() {
|
|
|
+ if (fixedHeight.value) {
|
|
|
+ fixedHeight.value = false
|
|
|
+ } else {
|
|
|
+ fixedHeight.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.dpjis {
|
|
|
+ width: 159px;
|
|
|
+ height: 100px;
|
|
|
+ opacity: 0.9;
|
|
|
+ background: rgb(243, 243, 248);
|
|
|
+ border: 1px solid rgb(226, 226, 226);
|
|
|
+ border-radius: 4px;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.box_view {
|
|
|
+ width: 52px;
|
|
|
+ height: 28px;
|
|
|
+ background: rgb(255, 255, 255);
|
|
|
+ border: 1px solid rgb(15, 115, 230);
|
|
|
+ border-radius: 3px;
|
|
|
+ box-shadow: rgba(39, 56, 75, 0.1) 0px 2px 4px 0px;
|
|
|
+ position: absolute;
|
|
|
+ left: 53px;
|
|
|
+ top: 36px;
|
|
|
+}
|
|
|
+
|
|
|
+.jAgYAh {
|
|
|
+ position: absolute;
|
|
|
+ height: 21px;
|
|
|
+ width: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ left: 75px;
|
|
|
+ top: 10px;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 9px;
|
|
|
+ height: 2px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 2px;
|
|
|
+ height: 19px;
|
|
|
+ left: 4px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.bTzFoR {
|
|
|
+ position: absolute;
|
|
|
+ height: 35px;
|
|
|
+ width: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ right: 20px;
|
|
|
+ top: 35px;
|
|
|
+ transform: rotate(90deg);
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 9px;
|
|
|
+ height: 2px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 2px;
|
|
|
+ height: 33px;
|
|
|
+ left: 4px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.eIwCFM {
|
|
|
+ position: absolute;
|
|
|
+ height: 21px;
|
|
|
+ width: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ left: 75px;
|
|
|
+ bottom: 9px;
|
|
|
+ transform: rotate(180deg);
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 9px;
|
|
|
+ height: 2px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 2px;
|
|
|
+ height: 19px;
|
|
|
+ left: 4px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.fVBVzi {
|
|
|
+ position: absolute;
|
|
|
+ height: 35px;
|
|
|
+ width: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ left: 20px;
|
|
|
+ top: 35px;
|
|
|
+ transform: rotate(-90deg);
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 9px;
|
|
|
+ height: 2px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 2px;
|
|
|
+ height: 33px;
|
|
|
+ left: 4px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.kdbebz {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ opacity: 0.9;
|
|
|
+ background: rgb(255, 255, 255);
|
|
|
+ border: 1px solid rgb(226, 226, 226);
|
|
|
+ border-radius: 4px;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.kEmrUa {
|
|
|
+ position: absolute;
|
|
|
+ pointer-events: auto;
|
|
|
+ cursor: pointer;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ width: 86px;
|
|
|
+ height: 2px;
|
|
|
+ left: 6px;
|
|
|
+ top: 49px;
|
|
|
+
|
|
|
+ &::before,
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ height: 8px;
|
|
|
+ width: 2px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ top: -3px;
|
|
|
+ left: -2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ top: -3px;
|
|
|
+ right: -2px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.hIrtuZ {
|
|
|
+ position: absolute;
|
|
|
+ pointer-events: auto;
|
|
|
+ cursor: pointer;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ width: 86px;
|
|
|
+ height: 2px;
|
|
|
+ left: 6px;
|
|
|
+ top: 49px;
|
|
|
+
|
|
|
+ &::before,
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ height: 8px;
|
|
|
+ width: 2px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ top: -3px;
|
|
|
+ left: -2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ top: -3px;
|
|
|
+ right: -2px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.hXQonZ {
|
|
|
+ position: absolute;
|
|
|
+ pointer-events: auto;
|
|
|
+ cursor: pointer;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ width: 2px;
|
|
|
+ height: 86px;
|
|
|
+ left: 49px;
|
|
|
+ top: 6px;
|
|
|
+
|
|
|
+ &::before,
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ height: 2px;
|
|
|
+ width: 8px;
|
|
|
+ background: rgb(15, 115, 230);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ top: -2px;
|
|
|
+ left: -3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ bottom: -2px;
|
|
|
+ right: -3px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.tOPsm {
|
|
|
+ position: absolute;
|
|
|
+ pointer-events: auto;
|
|
|
+ cursor: pointer;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ width: 2px;
|
|
|
+ height: 86px;
|
|
|
+ left: 49px;
|
|
|
+ top: 6px;
|
|
|
+
|
|
|
+ &::before,
|
|
|
+ &::after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ height: 2px;
|
|
|
+ width: 8px;
|
|
|
+ background: rgb(199, 199, 208);
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ top: -2px;
|
|
|
+ left: -3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ bottom: -2px;
|
|
|
+ right: -3px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.iUnNSJ {
|
|
|
+ opacity: 0.5;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgb(51, 51, 51);
|
|
|
+ margin-top: 8px;
|
|
|
+ text-align: center;
|
|
|
+ transform: scale(0.85);
|
|
|
+}</style>
|