Element UI <el-switch> v-model 绑定数字类型

绑定data中的number变量,
当number=1时switch开启,
当number=0时switch关闭

<el-switch
	active-value=1
	inactive-value=0
	v-model="number"/>

猜你喜欢

转载自blog.csdn.net/qq_41784169/article/details/108515473