提交 3dc4d996 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新按钮

上级 d782f9bb
<template> <template>
<i-button :type="type" :size="size" :disabled="disabled"> <i-button :type="type" :size="size" :disabled="disabled" @click="handleClick">
<i v-if="showIcon" :class="{[iconClass ? iconClass : '']: true, 'app-button__icon': true}"></i> <i v-if="showIcon" :class="{[iconClass ? iconClass : '']: true, 'app-button__icon': true}"></i>
<span v-if="showCaption" class="app-button__caption"> <span v-if="showCaption" class="app-button__caption">
{{caption}} {{caption}}
...@@ -69,6 +69,16 @@ export default class AppButton extends Vue { ...@@ -69,6 +69,16 @@ export default class AppButton extends Vue {
* @memberof AppButton * @memberof AppButton
*/ */
@Prop({ default: true }) public showCaption!: boolean; @Prop({ default: true }) public showCaption!: boolean;
/**
* 处理按钮点击
*
* @prama
* @memberof AppButton
*/
public handleClick($event: MouseEvent) {
this.$emit('click', $event);
}
} }
</script> </script>
......
.ivu-btn {
width: 110px;
height: 34px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10px 20px;
background: var(--app-color-white);
border: 1px solid var(--app-color-blue);
border-radius: 0;
z-index: 0;
&.ivu-btn-primary {
background-color: var(--app-color-blue);
color: var(--app-color-white);
}
}
\ No newline at end of file
...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
@import './form-item.scss'; @import './form-item.scss';
@import './card.scss'; @import './card.scss';
@import './data-picker.scss'; @import './data-picker.scss';
@import './button.scss';
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册