添加注释

master
于肖磊 2024-10-18 18:18:08 +08:00
parent 3fe40595e2
commit 7cb680e3af
5 changed files with 31 additions and 13 deletions

View File

@ -40,7 +40,9 @@
init() {
const new_content = this.propValue.content || {};
const new_style = this.propValue.style || {};
//
let border_content = `border-bottom-style: ${new_content?.styles || 'solid'};`;
//
let border_style = `border-bottom-width: ${new_style.line_width * 2 || 2}rpx; border-bottom-color: ${new_style.line_color || 'rgba(204, 204, 204, 1)'};`;
this.setData({
style: border_content + border_style,

View File

@ -126,12 +126,13 @@
init() {
const new_form = this.propValue.content;
const new_style = this.propValue.style;
//
const { windowWidth } = uni.getSystemInfoSync();
// 90%16
const block = (windowWidth * 0.9) / 16;
const { common_style, actived_color } = new_style;
// scaleToFill cover aspectFit contain center none
// scaleToFill fill aspectFit contain aspectFill cover
let fit = '';
if (new_form.img_fit == 'contain') {
fit = 'aspectFit';
@ -146,17 +147,18 @@
new_style: this.propValue.style,
seat_list: this.get_seat_list(new_form),
new_list: new_form.carousel_list.concat(this.get_seat_list(new_form)),
popup_width: block * 16 * 2 + 'rpx',
popup_height: block * 9 * 2 + 'rpx',
style_container: this.propIsCommon ? common_styles_computer(common_style) : '', //
style_img_container: this.propIsCommon ? common_img_computer(common_style) : '', //
popup_width: block * 16 * 2 + 'rpx', // 16:9
popup_height: block * 9 * 2 + 'rpx', //
style_container: this.propIsCommon ? common_styles_computer(common_style) : '', //
style_img_container: this.propIsCommon ? common_img_computer(common_style) : '', //
img_style: radius_computer(new_style), //
indicator_style: this.get_indicator_style(new_style), //
dot_style: `bottom: ${ (new_style.indicator_bottom + common_style.margin_bottom + common_style.padding_bottom) * (sys_width / 390) * 2 }rpx;`, //
img_fit: fit,
img_fit: fit, //
video_style: this.get_video_style(new_style), //
swiper_height: new_form.height * (sys_width / 390) * 2 + 'rpx',
swiper_height: new_form.height * (sys_width / 390) * 2 + 'rpx', //
});
//
if (new_form.carousel_type == 'card') {
this.$nextTick(() => {
this.setData({
@ -166,6 +168,7 @@
});
});
} else if (new_form.carousel_type != 'inherit') {
//
this.$nextTick(() => {
this.setData({
nextMargin: '100rpx',
@ -188,13 +191,16 @@
if (!isEmpty(indicator_radius)) {
styles += radius_computer(indicator_radius);
}
//
if (indicator_style == 'num') {
styles += `color: ${color || '#DDDDDD'};`;
styles += `font-size: ${indicator_size * 2}rpx;`;
} else if (indicator_style == 'elliptic') {
// 1:3
styles += `background: ${color || '#DDDDDD'};`;
styles += `width: ${indicator_size * 6}rpx; height: ${indicator_size * 2}rpx;`;
} else {
//
styles += `background: ${color || '#DDDDDD'};`;
styles += `width: ${indicator_size * 2}rpx; height: ${indicator_size * 2}rpx;`;
}

View File

@ -299,7 +299,11 @@
// is_search_alone_row: true,
// data_alone_row_space: 20,
});
var client_value = app.globalData.application_client_type();
var client_brand = app.globalData.application_client_brand();
if (client_value == 'h5' || client_brand == 'devtools') {
}
//
uni.setStorageSync(this.cache_key + this.tabs_home_id, this.propValue.diy_data);
},

View File

@ -60,22 +60,24 @@
},
methods: {
init() {
//
let form = this.propValue.content || {};
//
let img_url = (form.button_img || null) != null ? (form.button_img[0] || null) : null;
if (img_url != null) {
img_url = img_url.url || null;
}
this.setData({
form: form,
style: this.propValue.style,
img_url: img_url,
});
const { float_style, float_style_color, display_location, offset_number_percentage } = this.propValue.style;
//
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
//
let x = display_location == 'left' ? 10 : windowWidth - 60;
//
const y = Math.ceil(windowHeight * (1 - Number(offset_number_percentage)) - 20);
this.setData({
form: form,
style: this.propValue.style,
img_url: img_url,
content_style: float_style == 'shadow' ? `box-shadow: 0 0 40rpx ${float_style_color};border-radius: 50%;` : `background-color: ${float_style_color};border-radius: 50%;`,
x: x,
y: y
@ -83,6 +85,7 @@
},
url_open() {
const { button_jump, button_link } = this.form;
//
if (button_jump == 'link' && !isEmpty(button_link)) {
app.globalData.url_open(button_link.page);
}

View File

@ -145,13 +145,16 @@
if (!isEmpty(indicator_radius)) {
styles += radius_computer(indicator_radius);
}
//
if (indicator_style == 'num') {
styles += `color: ${color || '#DDDDDD'};`;
styles += `font-size: ${indicator_size * 2}rpx;`;
} else if (indicator_style == 'elliptic') {
// 1:3
styles += `background: ${color || '#DDDDDD'};`;
styles += `width: ${indicator_size * 6}rpx; height: ${indicator_size * 2}rpx;`;
} else {
//
styles += `background: ${color || '#DDDDDD'};`;
styles += `width: ${indicator_size * 2}rpx; height: ${indicator_size * 2}rpx;`;
}