修改魔方里的处理逻辑

v1.1.0
于肖磊 2024-10-31 09:30:29 +08:00
parent bd090f9ac8
commit 54373e8122
4 changed files with 7 additions and 16 deletions

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :style="style_container">
<div :style="style_container">
<div class="img-magic" :style="style_img_container">
<div class="w h re outer-style">
<!-- 风格9 -->
@ -108,17 +108,11 @@ const spacing = computed(() => (new_style.value?.image_spacing || 0) / 2 + 'px')
//
const content_radius = computed(() => radius_computer(new_style.value.data_radius));
//#region
const div_width = ref(0);
const div_width = ref(390);
//
const container_height = computed(() => is_number(form.value.container_height) ? form.value.container_height : div_width.value);
const container_size = computed(() => container_height.value + 'px');
const container = ref<HTMLElement | null>(null);
onMounted(() => {
if (container.value) {
div_width.value = container.value.clientWidth;
}
});
//#endregion
//#region
//

View File

@ -228,6 +228,7 @@ const style_click = (index: number) => {
form.value.style_actived = index;
selected_active.value = 0;
tabs_name.value = 'content';
handleResize();
}
//
const magic_list = (index: number) => {

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :style="style_container">
<div :style="style_container">
<div class="img-magic" :style="style_img_container">
<div class="w h re outer-style">
<!-- 风格3 -->
@ -67,17 +67,11 @@ const spacing = computed(() => new_style_spacing.value / 2 + 'px');
const content_img_radius = computed(() => radius_computer(new_style.value));
//#region
const div_width = ref(0);
const div_width = ref(390);
const container_size = computed(() => form.value.style_actived === 10 ? '100%' : container_height.value + 'px');
//
const container_height = computed(() => is_number(form.value.container_height) ? form.value.container_height : div_width.value);
const container_size_10 = computed(() => container_height.value + 'px');
const container = ref<HTMLElement | null>(null);
onMounted(() => {
if (container.value) {
div_width.value = container.value.clientWidth;
}
});
//#endregion
//#region
//

View File

@ -162,6 +162,8 @@ const style_click = (index: number) => {
cubeWidth.value = 390;
cubeHeight.value = 390;
}
} else {
handleResize();
}
}
//