修改页面逻辑显示
parent
9e8e0ed704
commit
a30315cca8
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue