新手试炼流程优化

This commit is contained in:
kron
2025-05-31 18:39:41 +08:00
parent 50168486ba
commit 43889669d7
3 changed files with 39 additions and 15 deletions

View File

@@ -12,14 +12,26 @@ const props = defineProps({
type: Function,
default: () => {},
},
disabled: {
type: Boolean,
default: false,
},
});
</script>
<template>
<view
class="sbtn"
:style="{ width: width, borderRadius: rounded + 'px' }"
@click="onClick"
:style="{
width: width,
borderRadius: rounded + 'px',
backgroundColor: disabled ? '#757575' : '#fed847',
}"
@click="
() => {
if (!disabled) onClick();
}
"
>
<slot />
</view>
@@ -31,7 +43,6 @@ const props = defineProps({
height: 40px;
line-height: 40px;
font-weight: bold;
background-color: #fed847;
font-size: 15px;
text-align: center;
display: flex;