diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue index 86b3ba9f..b1af344c 100644 --- a/components/diy/carousel.vue +++ b/components/diy/carousel.vue @@ -94,6 +94,10 @@ type: Number, default: 1000000, }, + propOuterContainerPadding: { + type: Number, + default: 0, + } }, data() { return { @@ -157,7 +161,7 @@ fit = 'aspectFill'; } const { margin_left, margin_right, padding_left, padding_right } = new_style.common_style; - const width = sys_width - margin_left - margin_right - padding_left - padding_right; + const width = sys_width - margin_left - margin_right - padding_left - padding_right - this.propOuterContainerPadding; const scale = width / 390; this.setData({ form: this.propValue.content, diff --git a/components/diy/custom.vue b/components/diy/custom.vue index 2af94d2c..1069a3b2 100644 --- a/components/diy/custom.vue +++ b/components/diy/custom.vue @@ -59,6 +59,10 @@ type: Number, default: 1000000, }, + propOuterContainerPadding: { + type: Number, + default: 0, + } }, data() { return { @@ -94,7 +98,7 @@ const new_form = this.propValue.content; const new_style = this.propValue.style; const { margin_left, margin_right, padding_left, padding_right } = new_style.common_style; - const width = sys_width - margin_left - margin_right - padding_left - padding_right; + const width = sys_width - margin_left - margin_right - padding_left - padding_right - this.propOuterContainerPadding; this.setData({ form: new_form, new_style: new_style, diff --git a/components/diy/data-magic.vue b/components/diy/data-magic.vue index ad1fca2d..fd0ffb03 100644 --- a/components/diy/data-magic.vue +++ b/components/diy/data-magic.vue @@ -130,6 +130,10 @@ type: Number, default: 1000000, }, + propOuterContainerPadding: { + type: Number, + default: 0, + } }, data() { return { @@ -181,7 +185,7 @@ const container_height = !isEmpty(new_form.container_height) ? new_form.container_height : sys_width; const density = !isEmpty(new_form.magic_cube_density) ? new_form.magic_cube_density : 4; const { margin_left, margin_right, padding_left, padding_right } = new_style.common_style; - const width = sys_width - margin_left - margin_right - padding_left - padding_right; + const width = sys_width - margin_left - margin_right - padding_left - padding_right - this.propOuterContainerPadding; this.setData({ form: new_form, new_style: new_style, diff --git a/components/diy/diy.vue b/components/diy/diy.vue index ae95465e..97303258 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -6,79 +6,80 @@ - - - - - -