🐛(button): 修复 disabled 属性只标注属性不生效的问题

This commit is contained in:
就眠儀式 2022-11-02 11:53:43 +08:00
parent cf254de182
commit 21d8d05032
2 changed files with 5 additions and 6 deletions

View File

@ -24,10 +24,10 @@ export interface ButtonProps {
loadingIcon?: string; loadingIcon?: string;
borderStyle?: string; borderStyle?: string;
border?: ButtonBorder; border?: ButtonBorder;
fluid?: string | boolean; fluid?: boolean;
radius?: string | boolean; radius?: boolean;
loading?: string | boolean; loading?: boolean;
disabled?: string | boolean; disabled?: boolean;
nativeType?: ButtonNativeType; nativeType?: ButtonNativeType;
} }
@ -35,7 +35,6 @@ const props = withDefaults(defineProps<ButtonProps>(), {
loadingIcon: "layui-icon-loading-one", loadingIcon: "layui-icon-loading-one",
borderStyle: "soild", borderStyle: "soild",
nativeType: "button", nativeType: "button",
disabled: false,
loading: false, loading: false,
radius: false, radius: false,
fluid: false, fluid: false,

View File

@ -99,7 +99,7 @@ export default {
<lay-button type="normal" size="lg">百搭按钮</lay-button> <lay-button type="normal" size="lg">百搭按钮</lay-button>
<lay-button type="warm" size="lg">暖色按钮</lay-button> <lay-button type="warm" size="lg">暖色按钮</lay-button>
<lay-button type="danger" size="lg">警告按钮</lay-button> <lay-button type="danger" size="lg">警告按钮</lay-button>
<lay-button type="disabled" size="lg">禁用按钮</lay-button> <lay-button disabled size="lg">禁用按钮</lay-button>
</template> </template>
<script> <script>