From 1aa502103bd2ede3e3973745bca53f077e2157ce Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 28 Sep 2024 15:05:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E8=87=AA?= =?UTF-8?q?=E5=86=99=E5=85=AC=E5=85=B1=E7=BB=84=E4=BB=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-button.vue | 2 +- components/my-components/my-radio.vue | 35 ++++--- components/my-components/my-step.vue | 7 +- components/my-components/my-up-upload.vue | 114 ++++++++++++++-------- 4 files changed, 100 insertions(+), 58 deletions(-) diff --git a/components/my-components/my-button.vue b/components/my-components/my-button.vue index 7bb481f..ac7601b 100644 --- a/components/my-components/my-button.vue +++ b/components/my-components/my-button.vue @@ -105,7 +105,7 @@ import { computed } from 'vue'; margin: auto; } .shadow{ - box-shadow: 0 0 10px #999; + box-shadow: 0 0 10px #aaa; } .btn { font-size: 28rpx; diff --git a/components/my-components/my-radio.vue b/components/my-components/my-radio.vue index 4c49cc0..e6a6836 100644 --- a/components/my-components/my-radio.vue +++ b/components/my-components/my-radio.vue @@ -1,10 +1,11 @@ @@ -14,11 +15,11 @@ } from 'vue' import color from '@/commons/color.js' const props = defineProps({ - disabled:{ + disabled: { type: [Boolean], default: false }, - borderColor:{ + borderColor: { type: String, default: '#bbb', }, @@ -29,10 +30,10 @@ }, // v-modal modelValue: { - type: [Number,Boolean], + type: [Number, Boolean], default: false, }, - shape:{ + shape: { //circle square type: String, default: 'circle', @@ -52,18 +53,19 @@ ` } const emits = defineEmits(['update:modelValue', 'change']) + function changeVal() { - if(props.disabled){ + if (props.disabled) { return } emits('click') - let currentVal=props.modelValue - let type=typeof currentVal - if(type==='number'){ - currentVal=currentVal===0?1:0 + let currentVal = props.modelValue + let type = typeof currentVal + if (type === 'number') { + currentVal = currentVal === 0 ? 1 : 0 } - if(type==='boolean'){ - currentVal=!currentVal + if (type === 'boolean') { + currentVal = !currentVal } emits('update:modelValue', currentVal) emits('change', currentVal) @@ -75,7 +77,7 @@ .circle { background: #FFFFFF; - + &.active { background-color: $my-main-color; border-color: $my-main-color; @@ -84,7 +86,8 @@ border: 1px solid #707070; border-radius: 50%; overflow: hidden; - &.square{ + + &.square { border-radius: 8rpx; } } diff --git a/components/my-components/my-step.vue b/components/my-components/my-step.vue index 3f381cf..9474c6b 100644 --- a/components/my-components/my-step.vue +++ b/components/my-components/my-step.vue @@ -6,7 +6,7 @@ - {{item[titleKey]||''}} + {{formatTitle(item[titleKey]||'') }} {{item[contentKey]||''}} @@ -14,6 +14,7 @@