7fa943eb
梁灏
init
|
1
2
3
4
5
6
7
8
9
10
11
|
<template>
<div :class="classes">
<slot></slot>
</div>
</template>
<script>
import { oneOf } from '../../utils/assist';
const prefixCls = 'ivu-btn-group';
export default {
|
34ee7b4a
梁灏
support Tree & ad...
|
12
|
name: 'ButtonGroup',
|
7fa943eb
梁灏
init
|
13
14
15
|
props: {
size: {
validator (value) {
|
f00a037c
梁灏
some Components's...
|
16
|
return oneOf(value, ['small', 'large', 'default']);
|
381417a8
梁灏
Update Button
|
17
18
|
},
default () {
|
fe5ffd7f
梁灏
fixed #4196 #4165
|
19
|
return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
|
7fa943eb
梁灏
init
|
20
21
|
}
},
|
f1b3ed30
梁灏
Button add circle...
|
22
23
24
25
|
shape: {
validator (value) {
return oneOf(value, ['circle', 'circle-outline']);
}
|
fd6512a9
Rijn
implemented verti...
|
26
27
28
29
|
},
vertical: {
type: Boolean,
default: false
|
f1b3ed30
梁灏
Button add circle...
|
30
|
}
|
7fa943eb
梁灏
init
|
31
32
33
34
35
36
|
},
computed: {
classes () {
return [
`${prefixCls}`,
{
|
f1b3ed30
梁灏
Button add circle...
|
37
|
[`${prefixCls}-${this.size}`]: !!this.size,
|
fd6512a9
Rijn
implemented verti...
|
38
39
|
[`${prefixCls}-${this.shape}`]: !!this.shape,
[`${prefixCls}-vertical`]: this.vertical
|
7fa943eb
梁灏
init
|
40
|
}
|
b0893113
jingsam
add eslint
|
41
|
];
|
7fa943eb
梁灏
init
|
42
43
|
}
}
|
b0893113
jingsam
add eslint
|
44
45
|
};
</script>
|