沉浸模式下的处理

v1.2.0
于肖磊 2025-02-11 14:40:46 +08:00
parent efd15ad94d
commit b402a21bdb
3 changed files with 8 additions and 42 deletions

View File

@ -38,8 +38,8 @@
</el-form-item>
<el-form-item v-if="form.header_background_type == 'transparent' && form.immersive_style === '1'" label="安全距离">
<div class="flex-row align-c gap-10">
<el-switch v-model="form.general_safe_distance_value" active-value="1" inactive-value="0" :disabled="is_tabs_0_up"></el-switch>
<el-tooltip effect="dark" :show-after="200" :hide-after="200" content="<span>1.第一个组件包含选项卡置顶,并开启置顶,则强制开启安全距离。<br/>2.开启后第一个组件上内边距将增加顶部安全距离+导航高度</span>" raw-content placement="top">
<el-switch v-model="form.general_safe_distance_value" active-value="1" inactive-value="0"></el-switch>
<el-tooltip effect="dark" :show-after="200" :hide-after="200" content="<span>开启后第一个组件上内边距将增加顶部安全距离+导航高度</span>" raw-content placement="top">
<icon name="miaosha-hdgz" size="12" color="#999"></icon>
</el-tooltip>
</div>
@ -196,8 +196,6 @@ const location_mult_color_picker_event = (arry: color_list[], type: number) => {
form.value.location_color_list = arry;
form.value.location_direction = type.toString();
};
const is_tabs_0_up = computed(() => common_store.is_tabs_0_up );
const change_immersive_style = (val: string | number | boolean) => {
if (val === '0') {
//
@ -205,19 +203,11 @@ const change_immersive_style = (val: string | number | boolean) => {
// common_store.set_is_immersion_model(false);
return;
} else {
//
if (is_tabs_0_up.value) {
//
form.value.general_safe_distance_value = '1';
}
}
// common_store.set_is_immersion_model(true);
};
// tabs
watchEffect(() => {
if (is_tabs_0_up.value) {
form.value.general_safe_distance_value = '1';
}
});
</script>
<style lang="scss" scoped>
.styles {

View File

@ -323,30 +323,6 @@ const draggable_click = (item: componentsData) => {
}
}
};
//
const TABS_TOP_UP_ENABLED = '1';
const DEFAULT_TABS_TOP_UP = '0';
//
watchEffect(() => {
if (tabs_data.value.length > 0) {
const tabs_top_up = tabs_data.value[0]?.com_data?.content?.tabs_top_up || DEFAULT_TABS_TOP_UP;
if (tabs_top_up == TABS_TOP_UP_ENABLED) {
common_store.set_is_tabs_0_up(true);
} else {
common_store.set_is_tabs_0_up(false);
}
} else if (diy_data.value.length > 0) {
const tabs_top_up = diy_data.value[0]?.com_data?.content?.tabs_top_up || DEFAULT_TABS_TOP_UP;
if (tabs_top_up == TABS_TOP_UP_ENABLED) {
common_store.set_is_tabs_0_up(true);
} else {
common_store.set_is_tabs_0_up(false);
}
} else {
common_store.set_is_tabs_0_up(false);
}
});
//
const clone_item_com_data = (item: commonComponentData) => {
return {

View File

@ -125,7 +125,7 @@ const clear_data_event = () => {
form.value.tabs_data = [];
form.value.diy_data = [];
// false
common_store.set_is_immersion_model(false);
// common_store.set_is_immersion_model(false);
diy_data_item.value = new_tem_form.header;
};
//#region ---------------------start
@ -146,10 +146,10 @@ const init = () => {
data.diy_data = data_merge(data.diy_data);
data.tabs_data = data_merge(data.tabs_data);
//
if (data.header.com_data.style.immersive_style === '1') {
common_store.set_is_immersion_model(true);
}
// //
// if (data.header.com_data.style.immersive_style === '1') {
// common_store.set_is_immersion_model(true);
// }
form.value = data;
} else {
is_empty.value = true;