页面设置初始化方式处理

v1.0.0
于肖磊 2024-08-28 11:22:28 +08:00
parent 1a1c93c72e
commit 207f69fdac
2 changed files with 15 additions and 9 deletions

View File

@ -1,10 +1,10 @@
<template>
<div class="model-top">
<div class="roll">
<div :class="['roll', { 'page-settings-border': showPage }]" @click="page_settings">
<div class="pt-15 pb-10 pl-25 pr-25 w">
<img class="img" src="@/assets/images/layout/main/main-top.png" />
</div>
<div :class="['model-head', ' tc', { 'page-settings-border': showPage }]" @click="page_settings">
<div class="model-head tc">
{{ props.pageData.com_data?.content?.title || '新建页面' }}
</div>
</div>
@ -26,10 +26,16 @@ const page_settings = () => {
</script>
<style lang="scss" scoped>
.model-top {
position: absolute;
top: 0;
left: 50%;
z-index: 2;
transform: translateX(-50%);
.roll {
width: 39rem;
background: #fff;
margin: 0 auto;
box-shadow: 0px 0 0px 0.2rem #fff;
// border-bottom: 0.1rem solid #f5f5f5;
}
.img {
@ -44,7 +50,7 @@ const page_settings = () => {
.page-settings-border {
// border: 0.2rem solid $cr-main;
position: relative;
box-shadow: 0px 0 0px 0.2rem $cr-main;
box-shadow: 0px 0 0px 0.2rem $cr-main !important;
z-index: 1;
box-sizing: border-box;
}

View File

@ -25,13 +25,13 @@
</div>
<div class="model">
<div class="model-content">
<!-- 页面设置 -->
<page-settings :show-page="page_data.show_tabs" :page-data="page_data" @page_settings="page_settings"></page-settings>
<!-- 拖拽区 -->
<div ref="scrollTop" class="model-drag">
<div class="seat" style="background: #fff"></div>
<!-- 页面设置 -->
<page-settings :show-page="page_data.show_tabs" :page-data="page_data" @page_settings="page_settings"></page-settings>
<div class="model-wall" :style="content_style">
<div :style="'padding-bottom:' + footer_nav_counter_store.padding_footer + 'px;'">
<div :style="'padding-top:92px;' + 'padding-bottom:' + footer_nav_counter_store.padding_footer + 'px;'">
<VueDraggable v-model="diy_data" :animation="500" :touch-start-threshold="2" group="people" class="drag-area re" ghost-class="ghost" :on-sort="on_sort" :on-start="on_start" :on-end="on_end">
<div v-for="(item, index) in diy_data" :key="item.id" :class="model_class(item)" :style="model_style(item)" @click="on_choose(index, item.show_tabs)">
<div v-if="item.show_tabs" class="plug-in-right" chosenClass="close">
@ -250,7 +250,7 @@ const model_style = computed(() => {
// window.innerHeight() - 80() - 844
const height = (window.innerHeight - 924) / 2;
let bottom = parseInt(float_bottom[item.id]) + height;
// 60 755-60 = 695
// 60 775-60 = 695
if (parseInt(float_bottom[item.id]) > 695) {
bottom = 695 + height;
}
@ -613,7 +613,7 @@ const float_bottom_change = (val: { bottom: string; location: string }, id: stri
.model-drag {
overflow-y: auto;
max-height: 75.5rem;
max-height: 84.4rem;
&::-webkit-scrollbar {
display: none;
}
@ -622,7 +622,7 @@ const float_bottom_change = (val: { bottom: string; location: string }, id: stri
background: #f5f5f5;
margin: 0 auto;
.drag-area {
min-height: 68.1rem;
min-height: 75.5rem;
}
.drag-area .float-window {
position: fixed;