switch开关

... 2022-9-15 Less than 1 minute

# switch开关

值:1
颜色值:1
图标值:1
<el-row :span="24">
  <el-col :span="6">
   值:{{form}}<br/>
   <avue-switch v-model="form"  :dic="dic"></avue-switch>
  </el-col>
  <el-col :span="24"></el-col>
  <el-col :span="6">
   颜色值:{{form}}<br/>
   <avue-switch active-color="#13ce66" inactive-color="#ff4949"v-model="form"  :dic="dic"></avue-switch>
  </el-col>
  <el-col :span="24"></el-col>
  <el-col :span="6">
   图标值:{{form}}<br/>
   <avue-switch active-icon-class="el-icon-s-tools
" inactive-icon-class="el-icon-setting" v-model="form"  :dic="dic"></avue-switch>
  </el-col>
</el-row>
<script>
export default {
    data() {
      return {
        form:1,
        dic:[{
          label:'选项1',
          value:0
        },{
          label:'选项2',
          value:1
        }]
      }
    }
}
</script>

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
Expand Copy
Last update: September 15, 2022 11:06
Contributors: smallwei
您正在浏览基于 Vue 2.x 的 Avue 文档; 点击这里 查看 Vue 3.x 的升级版本