7fa943eb
梁灏
init
|
1
|
<template>
|
d6342fe1
jingsam
fixed ie bug
|
2
3
4
|
<i-button>Default</i-button>
<i-button type="primary">Primary</i-button>
<i-button type="ghost">Ghost</i-button>
|
e1596b7e
梁灏
add Button UI
|
5
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
6
7
8
|
<i-button type="primary" size="large">Large</i-button>
<i-button type="primary">Default</i-button>
<i-button type="primary" size="small">Small</i-button>
|
e1596b7e
梁灏
add Button UI
|
9
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
10
11
|
<i-button>Default</i-button>
<i-button disabled>Default(Disabled)</i-button>
|
e1596b7e
梁灏
add Button UI
|
12
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
13
14
|
<i-button type="primary">Primary</i-button>
<i-button type="primary" disabled>Primary(Disabled)</i-button>
|
e1596b7e
梁灏
add Button UI
|
15
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
16
17
|
<i-button type="ghost">Ghost</i-button>
<i-button type="ghost" disabled>Ghost(Disabled)</i-button>
|
e1596b7e
梁灏
add Button UI
|
18
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
19
20
|
<i-button type="primary" shape="circle" icon="ios-search"></i-button>
<i-button type="primary" icon="ios-search">搜索</i-button>
|
e1596b7e
梁灏
add Button UI
|
21
|
<br><br>
|
d6342fe1
jingsam
fixed ie bug
|
22
|
<i-button type="ghost" shape="circle">
|
e1596b7e
梁灏
add Button UI
|
23
|
<Icon type="search"></Icon>
|
d6342fe1
jingsam
fixed ie bug
|
24
25
|
</i-button>
<i-button type="ghost">
|
e1596b7e
梁灏
add Button UI
|
26
27
|
<Icon type="search"></Icon>
搜索
|
d6342fe1
jingsam
fixed ie bug
|
28
29
|
</i-button>
<i-button type="ghost" shape="circle" size="large">
|
e1596b7e
梁灏
add Button UI
|
30
|
<Icon type="search"></Icon>
|
d6342fe1
jingsam
fixed ie bug
|
31
32
|
</i-button>
<i-button type="ghost" shape="circle" size="small">
|
e1596b7e
梁灏
add Button UI
|
33
|
<Icon type="search"></Icon>
|
d6342fe1
jingsam
fixed ie bug
|
34
|
</i-button>
|
e1596b7e
梁灏
add Button UI
|
35
|
<br><br><br>
|
d6342fe1
jingsam
fixed ie bug
|
36
37
38
39
|
<i-button type="primary" loading>Loading...</i-button>
<i-button type="primary" loading size="large">Loading...</i-button>
<i-button type="primary" loading size="small">Loading...</i-button>
<i-button type="primary" :loading="loading" @click="toLoading">
|
e1596b7e
梁灏
add Button UI
|
40
41
|
<span v-if="!loading">Click me!</span>
<span v-else>Loading...</span>
|
d6342fe1
jingsam
fixed ie bug
|
42
43
|
</i-button>
<i-button type="primary" :loading="loading2" icon="checkmark-round" @click="toLoading2">
|
e1596b7e
梁灏
add Button UI
|
44
45
|
<span v-if="!loading2">Click me!</span>
<span v-else>Loading...</span>
|
d6342fe1
jingsam
fixed ie bug
|
46
|
</i-button>
|
e1596b7e
梁灏
add Button UI
|
47
48
|
<h4>基本</h4>
<Button-group size="large">
|
d6342fe1
jingsam
fixed ie bug
|
49
50
|
<i-button>取消</i-button>
<i-button type="primary">确定</i-button>
|
e1596b7e
梁灏
add Button UI
|
51
|
</Button-group>
|
7fa943eb
梁灏
init
|
52
|
<Button-group>
|
d6342fe1
jingsam
fixed ie bug
|
53
54
55
|
<i-button type="primary">L</i-button>
<i-button>M</i-button>
<i-button type="ghost">R</i-button>
|
e1596b7e
梁灏
add Button UI
|
56
57
58
|
</Button-group>
<h4>配合图标</h4>
<Button-group>
|
d6342fe1
jingsam
fixed ie bug
|
59
|
<i-button type="primary">
|
e1596b7e
梁灏
add Button UI
|
60
61
|
<Icon type="chevron-left"></Icon>
前进
|
d6342fe1
jingsam
fixed ie bug
|
62
63
|
</i-button>
<i-button type="primary">
|
e1596b7e
梁灏
add Button UI
|
64
65
|
后退
<Icon type="chevron-right"></Icon>
|
d6342fe1
jingsam
fixed ie bug
|
66
|
</i-button>
|
e1596b7e
梁灏
add Button UI
|
67
68
|
</Button-group>
<Button-group>
|
d6342fe1
jingsam
fixed ie bug
|
69
70
|
<i-button type="primary" icon="cloud"></i-button>
<i-button type="primary" icon="upload"></i-button>
|
7fa943eb
梁灏
init
|
71
|
</Button-group>
|
7fa943eb
梁灏
init
|
72
73
74
75
76
77
78
79
80
|
</template>
<script>
import { Button, Icon, Input, Switch, Radio, Checkbox, InputNumber, Row, Col, Page } from 'iview';
const ButtonGroup = Button.Group;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
export default {
components: {
|
d6342fe1
jingsam
fixed ie bug
|
81
|
iButton: Button,
|
7fa943eb
梁灏
init
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
ButtonGroup,
Icon,
iInput: Input,
Switch,
Radio,
RadioGroup,
Checkbox,
CheckboxGroup,
InputNumber,
Row,
iCol: Col,
Page
},
props: {
|
d6342fe1
jingsam
fixed ie bug
|
96
|
|
7fa943eb
梁灏
init
|
97
98
99
|
},
data () {
return {
|
e1596b7e
梁灏
add Button UI
|
100
101
|
loading: false,
loading2: false
|
d6342fe1
jingsam
fixed ie bug
|
102
|
}
|
7fa943eb
梁灏
init
|
103
|
},
|
7fa943eb
梁灏
init
|
104
|
methods: {
|
e1596b7e
梁灏
add Button UI
|
105
106
|
toLoading () {
this.loading = true;
|
7fa943eb
梁灏
init
|
107
|
},
|
e1596b7e
梁灏
add Button UI
|
108
109
|
toLoading2 () {
this.loading2 = true;
|
7fa943eb
梁灏
init
|
110
111
112
113
|
}
}
}
</script>
|