Blame view

examples/routers/slider.vue 3.46 KB
5cb6ce9e   梁灏   Slider add Toolti...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  <template>
      <Form :model="formItem" :label-width="80">
          <FormItem label="Input">
              <Input v-model="formItem.input" placeholder="Enter something..."></Input>
          </FormItem>
          <FormItem label="Select">
              <Select v-model="formItem.select">
                  <Option value="beijing">New York</Option>
                  <Option value="shanghai">London</Option>
                  <Option value="shenzhen">Sydney</Option>
              </Select>
          </FormItem>
          <FormItem label="DatePicker">
              <Row>
                  <Col span="11">
                  <DatePicker type="date" placeholder="Select date" v-model="formItem.date"></DatePicker>
                  </Col>
                  <Col span="2" style="text-align: center">-</Col>
                  <Col span="11">
                  <TimePicker type="time" placeholder="Select time" v-model="formItem.time"></TimePicker>
                  </Col>
              </Row>
          </FormItem>
          <FormItem label="Radio">
              <RadioGroup v-model="formItem.radio">
                  <Radio label="male">Male</Radio>
                  <Radio label="female">Female</Radio>
              </RadioGroup>
          </FormItem>
          <FormItem label="Checkbox">
              <CheckboxGroup v-model="formItem.checkbox">
                  <Checkbox label="Eat"></Checkbox>
                  <Checkbox label="Sleep"></Checkbox>
                  <Checkbox label="Run"></Checkbox>
                  <Checkbox label="Movie"></Checkbox>
              </CheckboxGroup>
          </FormItem>
          <FormItem label="Switch">
              <i-switch v-model="formItem.switch" size="large">
                  <span slot="open">On</span>
                  <span slot="close">Off</span>
              </i-switch>
          </FormItem>
          <FormItem label="Slider">
              <Slider v-model="formItem.slider" range></Slider>
          </FormItem>
          <FormItem label="Text">
              <Input v-model="formItem.textarea" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="Enter something..."></Input>
          </FormItem>
          <FormItem>
              <Button type="primary">Submit</Button>
              <Button type="ghost" style="margin-left: 8px">Cancel</Button>
          </FormItem>
      </Form>
  </template>
  <script>
      export default {
          data () {
              return {
                  formItem: {
                      input: '',
                      select: '',
                      radio: 'male',
                      checkbox: [],
                      switch: true,
                      date: '',
                      time: '',
                      slider: [20, 50],
                      textarea: ''
                  }
              }
          }
      }
  </script>
  
2eccfc99   梁灏   fixed #2852
76
  
5cb6ce9e   梁灏   Slider add Toolti...
77
78
79
80
81
82
83
  
  <!--<template>-->
      <!--<div>-->
          <!--<Button type="primary" @click="modal1 = true">Display dialog box</Button>-->
          <!--<Modal v-model="modal1">-->
              <!--<Slider v-model="value2" range show-tip="always"></Slider>-->
          <!--</Modal>-->
2eccfc99   梁灏   fixed #2852
84
85
86
87
88
89
      <!--</div>-->
  <!--</template>-->
  <!--<script>-->
      <!--export default {-->
          <!--data () {-->
              <!--return {-->
5cb6ce9e   梁灏   Slider add Toolti...
90
91
92
                  <!--modal1: false,-->
                  <!--value2: [20, 50],-->
              <!--}-->
2eccfc99   梁灏   fixed #2852
93
94
          <!--},-->
          <!--methods: {-->
5cb6ce9e   梁灏   Slider add Toolti...
95
96
              <!--ok () {-->
                  <!--this.$Message.info('Clicked ok');-->
2eccfc99   梁灏   fixed #2852
97
              <!--},-->
5cb6ce9e   梁灏   Slider add Toolti...
98
99
              <!--cancel () {-->
                  <!--this.$Message.info('Clicked cancel');-->
2eccfc99   梁灏   fixed #2852
100
101
              <!--}-->
          <!--}-->
5cb6ce9e   梁灏   Slider add Toolti...
102
      <!--}-->
2eccfc99   梁灏   fixed #2852
103
  <!--</script>-->