How do I dynamically add the value of the a tag rel attribute?

clipboard.png

<li><a rel="nofollow" target="_blank" v-bind:href=item.link>{{item.name}}</a></li>

how does a vue project dynamically add the value of the a tag rel attribute?

Jul.19,2021

<li><a id='nofollow' target="_blank" v-bind:href=item.link>{{item.name}}</a></li>

docoment.getElementById('nofollow').setAttribute('ref','nofollow')

http://www.w3school.com.cn/js.


<li><a :rel="item.rel" target="_blank" v-bind:href="item.link">{{item.name}}</a></li>

<li><a rel={{item.rel}} target="_blank" v-bind:href=item.link>{{item.name}}</li>

can't you make it a variable?


clipboard.png

clipboard.png
has been solved. The value of the rel attribute returned by the data is Booleans,. The inter-bar judgment is fine. Thank you for your help

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8cc6-1f04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8cc6-1f04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?