Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
968 views
in Technique[技术] by (71.8m points)

elementUI的表格最后一列加开关组件

结构:
image.png

本地静态数据:
image.png

处理事件函数:
image.png

能正常的开关,但是会报错:
image.png

解决方法:
这是组件里的相关属性设置
image.png

逻辑里面点击开关就改变状态
image.png

Data里面设置的默认值
image.png

可以正常使用了!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

this.InputData[index].isOpen = row.isOpen
this.params你有定义吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...