element icon indicating copy to clipboard operation
element copied to clipboard

菜鸡求教:switch开关的width的属性如何设置,能给个demo吗?

Open tandajun opened this issue 10 years ago • 6 comments

<el-switch v-model="msg" width=58 change="switchAction"> </el-switch> 按照如上方法,width报错只能解析成字符串,求个demo谢谢

tandajun avatar Nov 07 '16 01:11 tandajun

<el-switch v-model="msg" :width="58" @change="switchAction"> </el-switch>

Leopoldthecoder avatar Nov 07 '16 02:11 Leopoldthecoder

我试了一下,好像还是不行,虽然没有刚才那样的报错了,但是宽度不起作用(组件宽度会变成2px)

tandajun avatar Nov 07 '16 02:11 tandajun

Element 版本是?

Leopoldthecoder avatar Nov 07 '16 02:11 Leopoldthecoder

npm安装的 ^1.0.0-rc.7

tandajun avatar Nov 07 '16 02:11 tandajun

哦 我看到更新的日志了 8修复了 我去安装新版本

tandajun avatar Nov 07 '16 02:11 tandajun

是的,rc.8 就可以了

Leopoldthecoder avatar Nov 07 '16 02:11 Leopoldthecoder