Blame view

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