From e55218330cfde7443ca11b440e73532b546eb171 Mon Sep 17 00:00:00 2001 From: owen Date: Sat, 4 Nov 2023 22:06:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=90=A5=E9=94=80=EF=BC=9A=E8=A3=85?= =?UTF-8?q?=E4=BF=AE=E9=A1=B5=E9=9D=A2=E9=80=82=E9=85=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 2 +- .../components/s-block-item/s-block-item.vue | 2 +- sheep/components/s-block/s-block.vue | 29 ++++++++++--------- .../s-search-block/s-search-block.vue | 17 +++++------ 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 64e6e4a..50ea810 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,7 +2,7 @@ - + diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue index ee5b3fc..1b98456 100644 --- a/sheep/components/s-block-item/s-block-item.vue +++ b/sheep/components/s-block-item/s-block-item.vue @@ -6,7 +6,7 @@ - + diff --git a/sheep/components/s-block/s-block.vue b/sheep/components/s-block/s-block.vue index 529839c..19638fc 100644 --- a/sheep/components/s-block/s-block.vue +++ b/sheep/components/s-block/s-block.vue @@ -20,12 +20,12 @@ const elBackground = computed(() => { if (props.styles) { - if (props.styles.background.type == 'color') - return { background: props.styles.background.bgColor }; - if (props.styles.background.type == 'image') + if (props.styles.bgType === 'color') + return { background: props.styles.bgColor }; + if (props.styles.bgType === 'img') return { background: `url(${sheep.$url.cdn( - props.styles.background.bgImage, + props.styles.bgImage, )}) no-repeat top center / 100% auto`, }; } @@ -34,15 +34,18 @@ const elStyles = computed(() => { if (props.styles) { return { - marginTop: `${props.styles.marginTop}px`, - marginBottom: props.styles.marginBottom + 'px', - marginLeft: `${props.styles.marginLeft}px`, - marginRight: props.styles.marginRight + 'px', - 'border-top-left-radius': props.styles.borderRadiusTop + 'px', - 'border-top-right-radius': props.styles.borderRadiusTop + 'px', - 'border-bottom-left-radius': props.styles.borderRadiusBottom + 'px', - 'border-bottom-right-radius': props.styles.borderRadiusBottom + 'px', - padding: props.styles.padding + 'px', + marginTop: `${props.styles.marginTop || 0}px`, + marginBottom: `${props.styles.marginBottom || 0}px`, + marginLeft: `${props.styles.marginLeft || 0}px`, + marginRight: `${props.styles.marginRight || 0}px`, + paddingTop: `${props.styles.paddingTop || 0}px`, + paddingRight: `${props.styles.paddingRight || 0}px`, + paddingBottom: `${props.styles.paddingBottom || 0}px`, + paddingLeft: `${props.styles.paddingLeft || 0}px`, + borderTopLeftRadius: `${props.styles.borderTopLeftRadius || 0}px`, + borderTopRightRadius: `${props.styles.borderTopRightRadius || 0}px`, + borderBottomRightRadius: `${props.styles.borderBottomRightRadius || 0}px`, + borderBottomLeftRadius: `${props.styles.borderBottomLeftRadius || 0}px`, overflow: 'hidden', }; } diff --git a/sheep/components/s-search-block/s-search-block.vue b/sheep/components/s-search-block/s-search-block.vue index 5e3e08f..1e9c2b5 100644 --- a/sheep/components/s-search-block/s-search-block.vue +++ b/sheep/components/s-search-block/s-search-block.vue @@ -29,24 +29,23 @@ v-model="state.searchVal" /> - + {{ item.text }}{{ item }} - - + From 75d0f7511dc61fe87e6245d151e0664ed2223ce3 Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 5 Nov 2023 20:42:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=90=A5=E9=94=80=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=9F=8E=E8=A3=85=E4=BF=AE=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E3=80=90=E5=9B=BE=E7=89=87=E5=B1=95=E7=A4=BA=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/components/s-block-item/s-block-item.vue | 2 +- sheep/components/s-image-block/s-image-block.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue index 1b98456..dc1b4f4 100644 --- a/sheep/components/s-block-item/s-block-item.vue +++ b/sheep/components/s-block-item/s-block-item.vue @@ -1,6 +1,6 @@ diff --git a/sheep/ui/su-video/su-video.vue b/sheep/ui/su-video/su-video.vue index a1af8a5..a75a79c 100644 --- a/sheep/ui/su-video/su-video.vue +++ b/sheep/ui/su-video/su-video.vue @@ -18,6 +18,7 @@ @pause="pause" @ended="end" :poster="poster" + :autoplay="autoplay" > @@ -90,6 +91,10 @@ type: String, default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto', }, + autoplay: { + type: Boolean, + default: false, + } }); // 事件 From ee06d3396259e25782e33fd330ef64a7ea0d0673 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 6 Nov 2023 09:31:41 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=90=A5=E9=94=80=EF=BC=9A=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=95=86=E5=9F=8E=E8=A3=85=E4=BF=AE=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E3=80=90=E8=BD=AE=E6=92=AD=E5=9B=BE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/s-block-item/s-block-item.vue | 2 +- .../s-image-banner/s-image-banner.vue | 26 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue index f85700b..52c1078 100644 --- a/sheep/components/s-block-item/s-block-item.vue +++ b/sheep/components/s-block-item/s-block-item.vue @@ -1,7 +1,7 @@