修改页面逻辑显示

master
于肖磊 2025-09-05 10:04:16 +08:00
parent 9e8e0ed704
commit a30315cca8
3 changed files with 25 additions and 23 deletions

View File

@ -79,13 +79,11 @@
import { isEmpty, common_styles_computer, common_img_computer, gradient_handle, padding_computer, radius_computer, background_computer, border_computer, box_shadow_computer, gradient_computer, margin_computer, get_swiper_list } from '@/common/js/common/common.js';
import imageEmpty from '@/pages/diy/components/diy/modules/image-empty.vue';
import subscriptIndex from '@/pages/diy/components/diy/modules/subscript.vue';
import imgOrIconOrText from '@/pages/diy/components/diy/modules/img-or-icon-or-text.vue';
var system = app.globalData.get_system_info(null, null, true);
var sys_width = app.globalData.window_width_handle(system.windowWidth);
export default {
components: {
imageEmpty,
imgOrIconOrText,
subscriptIndex
},
props: {

View File

@ -38,7 +38,7 @@
</view>
</view>
<view class="flex-row align-c jc-e">
<imgOrIconOrText :value="propValue" type="details" />
<imgOrIconOrText :propValue="propValue" propType="details" />
</view>
</view>
</view>
@ -61,7 +61,7 @@
</view>
</view>
<view class="flex-row align-c jc-e">
<imgOrIconOrText :value="propValue" type="details" />
<imgOrIconOrText :propValue="propValue" propType="details" />
</view>
</view>
</view>

View File

@ -41,6 +41,8 @@
new_type_size: 0,
new_type_color: '',
img_style: '',
corner_marker: '',
corner_img_marker: '',
};
},
watch: {
@ -54,25 +56,27 @@
methods: {
isEmpty,
init() {
const content = this.propValue.content || {};
const new_style = this.propValue.style || {};
//
const new_type_style = new_style[`${ this.propType }_style`] || {};
this.setData({
is_show: content[`is_${ this.propType }_show`] == '1',
type_boolean: content[`${ this.propType }_type`] == 'img-icon',
type_img: content[`${ this.propType }_img`] || [],
type_icon: content[`${ this.propType }_icon`] || '',
type_text: content[`${ this.propType }_text`] || '',
//
new_type_size: new_type_style?.size || 0,
new_type_color: new_type_style?.color || '',
//
corner_marker: common_styles_computer(new_type_style),
corner_img_marker: padding_computer(new_type_style),
//
img_style: `height: ${ new_type_style.img_height }px; width: ${ new_type_style.img_width }px`,
})
if (!isEmpty(this.propType)) {
const content = this.propValue.content || {};
const new_style = this.propValue.style || {};
//
const new_type_style = new_style[`${ this.propType }_style`] || {};
this.setData({
is_show: content[`is_${ this.propType }_show`] == '1',
type_boolean: content[`${ this.propType }_type`] == 'img-icon',
type_img: content[`${ this.propType }_img`] || [],
type_icon: content[`${ this.propType }_icon`] || '',
type_text: content[`${ this.propType }_text`] || '',
//
new_type_size: new_type_style?.size || 0,
new_type_color: new_type_style?.color || '',
//
corner_marker: common_styles_computer(new_type_style),
corner_img_marker: padding_computer(new_type_style),
//
img_style: `height: ${ new_type_style.img_height }px; width: ${ new_type_style.img_width }px`,
})
}
},
},
};