You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.2 KiB
80 lines
1.2 KiB
![]()
6 days ago
|
<template>
|
||
|
<el-button
|
||
|
:type="type"
|
||
|
v-bind="$attrs"
|
||
|
:plain="plain"
|
||
|
:loading="loading"
|
||
|
:size="size"
|
||
|
:disabled="disabled"
|
||
|
@click="$emit('click')"
|
||
|
:style="{...btnstyle}"
|
||
|
>
|
||
|
<slot></slot>
|
||
|
</el-button>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'GuipButton',
|
||
|
props:{
|
||
|
type:{
|
||
|
type:String,
|
||
|
default:'primary'
|
||
|
},
|
||
|
size:{
|
||
|
type:String,
|
||
|
default:'normal'
|
||
|
},
|
||
|
// 为false 的可以不需要传参
|
||
|
plain:{
|
||
|
type:Boolean,
|
||
|
default:false
|
||
|
},
|
||
|
loading:{
|
||
|
type:Boolean,
|
||
|
default:false
|
||
|
},
|
||
|
disabled:{
|
||
|
type:Boolean,
|
||
|
default:false
|
||
|
},
|
||
|
btnstyle:Object
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
radio: ''
|
||
|
}
|
||
|
},
|
||
|
render(h) {
|
||
|
return h('el-button', {
|
||
|
attrs: this.$attrs,
|
||
|
on: {
|
||
|
click: e => this.$emit('click', e)
|
||
|
}
|
||
|
}, this.$slots.default)
|
||
|
},
|
||
|
mounted(){
|
||
|
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
<style scoped lang="scss">
|
||
|
button span{
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
.rotating-svg {
|
||
|
animation: rotate 2s linear infinite;
|
||
|
}
|
||
|
|
||
|
@keyframes rotate {
|
||
|
from {
|
||
|
transform: rotate(0deg);
|
||
|
}
|
||
|
to {
|
||
|
transform: rotate(360deg);
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
|