VUE 字符串拼接 各种拼接

1. :style 同时绑定对象与属性

:style="[{color: this.color}, this.layout == 'left'? 'style1':'style2']"

2. 字符串拼接

:id="['style'+index]"

:action="path+'executeSQLscript3'"

3. 绑定数值 与字符串数值 true则加载,false则忽略

:class="{red: changeRed==n ,['layout'+layout]:true}"
发布了38 篇原创文章 · 获赞 5 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/weixin_39423672/article/details/79804732