|
10 | 10 | <el-col :offset="2" :span="6">
|
11 | 11 | <p>{{$t('example.food')}}: {{food}}</p>
|
12 | 12 | </el-col>
|
13 |
| - <el-col :span="6"> |
| 13 | + <el-col :offset="1" :span="6"> |
14 | 14 | <p>{{$t('example.counter')}}: {{num}}</p>
|
15 | 15 | </el-col>
|
16 |
| - <el-col :span="6"> |
| 16 | + <el-col :offset="1" :span="6"> |
17 | 17 | <p>{{$t('example.city')}}: {{city}}</p>
|
18 | 18 | </el-col>
|
19 | 19 | </el-row>
|
20 | 20 | <el-row>
|
21 |
| - <el-col :offset="2" :span="6"> |
| 21 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
22 | 22 | <el-select v-model="food" :placeholder="$t('example.selPh')">
|
23 | 23 | <el-option
|
24 | 24 | v-for="item in foods"
|
|
29 | 29 | </el-option>
|
30 | 30 | </el-select>
|
31 | 31 | </el-col>
|
32 |
| - <el-col :span="6"> |
| 32 | + <el-col :span="6" :xs="{span: 20, offset: 2}"> |
33 | 33 | <el-input-number v-model.number="num" :min="1" :max="10"></el-input-number>
|
34 | 34 | </el-col>
|
35 |
| - <el-col :span="8"> |
| 35 | + <el-col :span="8" :xs="{span: 20, offset: 2}"> |
36 | 36 | <el-radio-group v-model="city" @input="checkCity">
|
37 | 37 | <el-radio-button
|
38 | 38 | v-for="item in cities"
|
|
53 | 53 | <span>{{$t('example.title2')}}</span>
|
54 | 54 | </div>
|
55 | 55 | <el-row>
|
56 |
| - <el-col :offset="2" :span="6"> |
| 56 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
57 | 57 | <el-radio-group v-model="province">
|
58 | 58 | <el-radio label="3">辽宁</el-radio>
|
59 | 59 | <el-radio disabled label="6">浙江</el-radio>
|
60 | 60 | <el-radio label="9">台湾</el-radio>
|
61 | 61 | </el-radio-group>
|
62 | 62 | </el-col>
|
63 |
| - <el-col :offset="2" :span="12"> |
| 63 | + <el-col :offset="2" :span="12" :xs="{span: 20, offset: 2}"> |
64 | 64 | <el-checkbox-group v-model="district">
|
65 | 65 | <el-checkbox label="2">中山区</el-checkbox>
|
66 | 66 | <el-checkbox label="4">东城区</el-checkbox>
|
|
70 | 70 | </el-col>
|
71 | 71 | </el-row>
|
72 | 72 | <el-row>
|
73 |
| - <el-col :offset="2" :span="6"> |
| 73 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
74 | 74 | <el-input placeholder="请输入内容" v-model="website">
|
75 | 75 | <template slot="prepend">Http://</template>
|
76 | 76 | <template slot="append">.com</template>
|
77 | 77 | </el-input>
|
78 | 78 | </el-col>
|
79 |
| - <el-col :offset="2" :span="6"> |
| 79 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
80 | 80 | <el-input :placeholder="$t('example.inPh')" v-model="restaurant">
|
81 | 81 | <el-select class="input-sel" v-model="restOptions" slot="prepend" :placeholder="$t('example.selPh')">
|
82 | 82 | <el-option label="餐厅名" value="1"></el-option>
|
|
86 | 86 | <el-button slot="append" icon="search"></el-button>
|
87 | 87 | </el-input>
|
88 | 88 | </el-col>
|
89 |
| - <el-col :offset="2" :span="6"> |
| 89 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
90 | 90 | <el-select v-model="multiFood" multiple :placeholder="$t('example.selPh')">
|
91 | 91 | <el-option
|
92 | 92 | v-for="item in foods"
|
|
106 | 106 | <span>{{$t('example.title3')}}</span>
|
107 | 107 | </div>
|
108 | 108 | <el-row>
|
109 |
| - <el-col :offset="2" :span="6"> |
| 109 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
110 | 110 | <el-cascader :placeholder="$t('example.selPh')" :options="organizers" change-on-select></el-cascader>
|
111 | 111 | </el-col>
|
112 |
| - <el-col :offset="2" :span="6"> |
| 112 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
113 | 113 | Switch:
|
114 | 114 | <el-tooltip :content="'Switch value: ' + switcher" placement="top">
|
115 | 115 | <el-switch v-model="switcher" on-color="#13ce66"
|
|
118 | 118 | </el-tooltip>
|
119 | 119 | <el-switch value='0' off-value="0" disabled></el-switch>
|
120 | 120 | </el-col>
|
121 |
| - <el-col :offset="2" :span="6"> |
| 121 | + <el-col :offset="2" :span="6" :xs="{span: 20, offset: 2}"> |
122 | 122 | <el-slider v-model="slider" :max="30" :min="10" :step="5" show-stops show-input></el-slider>
|
123 | 123 | </el-col>
|
124 | 124 | </el-row>
|
@@ -206,6 +206,17 @@ export default class Demo extends Vue {
|
206 | 206 | .el-card .el-row:first-child {
|
207 | 207 | margin-top: 0px;
|
208 | 208 | }
|
| 209 | + @media (max-width: 768px) { |
| 210 | + .el-card .el-row { |
| 211 | + margin-top: 0px; |
| 212 | + .el-col{ |
| 213 | + margin-top: 20px; |
| 214 | + } |
| 215 | + &:first-child { |
| 216 | + margin-top: -20px; |
| 217 | + } |
| 218 | + } |
| 219 | + } |
209 | 220 | }
|
210 | 221 | </style>
|
211 | 222 |
|
0 commit comments