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
364 views
in Technique[技术] by (71.8m points)

element树形控件自定义属性无法获取

业务场景是在element树形控件中要根据后台返回的某个字段做不同的样式显示,image.png 这是模拟的后台数据,要根据这个active——flag来绑定不同的class,image.png,这是绑定class的标签,页面渲染后发现并没有根据这个字段来渲染标题颜色,image.png,但是如果将node.active_flag改成node.id,就可以识别,请问这是什么原因呢?


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

1 Reply

0 votes
by (71.8m points)

自己打印了node数据,发现只要把node.active_flag改为node.data.active_flag即可


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

...