自定义逻辑修改
parent
fcda48c210
commit
01087ac61a
8
App.vue
8
App.vue
|
|
@ -7,12 +7,12 @@
|
|||
data: {
|
||||
// 基础配置
|
||||
// 数据接口请求地址
|
||||
// request_url: 'http://shopxo.com/',
|
||||
request_url:'https://new.shopxo.vip/',
|
||||
request_url: 'http://shopxo.com/',
|
||||
// request_url:'https://new.shopxo.vip/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
// static_url: 'http://shopxo.com/',
|
||||
static_url:'https://new.shopxo.vip/',
|
||||
static_url: 'http://shopxo.com/',
|
||||
// static_url:'https://new.shopxo.vip/',
|
||||
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
|
|
|
|||
|
|
@ -34,9 +34,14 @@
|
|||
return {
|
||||
form: {},
|
||||
com_style: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propScale(val) {
|
||||
this.scale = val;
|
||||
this.init();
|
||||
},
|
||||
propkey(val) {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -52,9 +57,9 @@
|
|||
});
|
||||
},
|
||||
get_com_style(form) {
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${ radius_computer(form.bg_radius, this.propScale) };transform: rotate(${form.icon_rotate}deg);${ padding_computer(form.icon_padding, this.propScale) };`;
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${ radius_computer(form.bg_radius, this.scale) };transform: rotate(${form.icon_rotate}deg);${ padding_computer(form.icon_padding, this.scale) };`;
|
||||
if (form.border_show == '1') {
|
||||
style += `border: ${form.border_size * this.propScale * 2 }rpx ${form.border_style} ${form.border_color};box-sizing: border-box;`;
|
||||
style += `border: ${form.border_size * this.scale * 2 }rpx ${form.border_style} ${form.border_color};box-sizing: border-box;`;
|
||||
}
|
||||
if (form.icon_location == 'center') {
|
||||
style += `justify-content: center;`;
|
||||
|
|
|
|||
|
|
@ -39,9 +39,14 @@
|
|||
img: '',
|
||||
image_style: '',
|
||||
border_style: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propScale(val) {
|
||||
this.scale = val;
|
||||
this.init();
|
||||
},
|
||||
propkey(val) {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -70,12 +75,12 @@
|
|||
}
|
||||
},
|
||||
get_image_style(form) {
|
||||
return `width: ${percentage_count(form.img_width, form.com_width)}; height: ${percentage_count(form.img_height, form.com_height)};transform: rotate(${form.img_rotate}deg); ${radius_computer(form.img_radius, this.propScale)};`;
|
||||
return `width: ${percentage_count(form.img_width, form.com_width)}; height: ${percentage_count(form.img_height, form.com_height)};transform: rotate(${form.img_rotate}deg); ${radius_computer(form.img_radius, this.scale)};`;
|
||||
},
|
||||
get_border_style(form) {
|
||||
let style = ``;
|
||||
if (form.border_show == '1') {
|
||||
style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color}; ${radius_computer(form.border_radius, this.propScale)};box-sizing: border-box;`;
|
||||
style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color}; ${radius_computer(form.border_radius, this.scale)};box-sizing: border-box;`;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -24,9 +24,14 @@
|
|||
return {
|
||||
form: {},
|
||||
border_style: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propScale(val) {
|
||||
this.scale = val;
|
||||
this.init();
|
||||
},
|
||||
propkey(val) {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -43,9 +48,9 @@
|
|||
},
|
||||
get_border_style(form) {
|
||||
if (form.line_settings === 'horizontal') {
|
||||
return `margin: 10rpx 0;border-bottom: ${form.line_size * this.propScale * 2}rpx ${form.line_style} ${form.line_color};`;
|
||||
return `margin: 10rpx 0;border-bottom: ${form.line_size * this.scale * 2}rpx ${form.line_style} ${form.line_color};`;
|
||||
} else {
|
||||
return `margin: 0 10rpx;border-right: ${form.line_size * this.propScale * 2}rpx ${form.line_style} ${form.line_color};`;
|
||||
return `margin: 0 10rpx;border-right: ${form.line_size * this.scale * 2}rpx ${form.line_style} ${form.line_color};`;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -36,9 +36,14 @@
|
|||
text_title: '',
|
||||
text_style: '',
|
||||
com_style: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propScale(val) {
|
||||
this.scale = val;
|
||||
this.init();
|
||||
},
|
||||
propkey(val) {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -55,9 +60,9 @@
|
|||
});
|
||||
},
|
||||
get_com_style(form) {
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.propScale)}; transform: rotate(${form.panel_rotate}deg);`;
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.scale)}; transform: rotate(${form.panel_rotate}deg);`;
|
||||
if (form.border_show == '1') {
|
||||
style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color};`;
|
||||
style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color};`;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,9 +43,14 @@
|
|||
text_title: '',
|
||||
text_style: '',
|
||||
com_style: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propScale(val) {
|
||||
this.scale = val;
|
||||
this.init();
|
||||
},
|
||||
propkey(val) {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -72,7 +77,7 @@
|
|||
return text;
|
||||
},
|
||||
get_text_style(form) {
|
||||
let style = `font-size: ${form.text_size * this.propScale * 2}rpx;line-height: ${form.text_size * this.propScale * 2}rpx;color: ${form.text_color}; text-align: ${form.text_location}; transform: rotate(${form.text_rotate}deg);text-decoration: ${form.text_option};${padding_computer(form.text_padding, this.propScale)};box-sizing: border-box;`;
|
||||
let style = `font-size: ${form.text_size * this.scale * 2}rpx;line-height: ${form.text_size * this.scale * 2}rpx;color: ${form.text_color}; text-align: ${form.text_location}; transform: rotate(${form.text_rotate}deg);text-decoration: ${form.text_option};${padding_computer(form.text_padding, this.scale)};box-sizing: border-box;`;
|
||||
if (form.text_weight == 'italic') {
|
||||
style += `font-style: italic`;
|
||||
} else if (form.text_weight == '500') {
|
||||
|
|
@ -81,9 +86,9 @@
|
|||
return style;
|
||||
},
|
||||
get_com_style(form) {
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.propScale)}`;
|
||||
let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.scale)}`;
|
||||
if (form.border_show == '1') {
|
||||
style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color};`;
|
||||
style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color};`;
|
||||
}
|
||||
// 是富文本并且开启了上下滚动的开关
|
||||
if (form.is_rich_text == '1' && form.is_up_down == '1') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue