Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
971 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 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...