💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
#### 使用object与array控制class <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="vue.js"></script> <script src="node_modules/axios/dist/axios.js"></script> <script src="node_modules/lodash/lodash.js"></script> </head> <body> <style> .green{color:green;} .color{color:red;} .font{font-size:200px;} </style> <div id="hdcms"> <h1 class="green" :class="hd">后盾人</h1> <hr> <h2 :class="[success,font]">houdunren.com</h2> </div> <script> var app = new Vue({ el: '#hdcms', data: { hd:{color:true,font:true}, //对象 success:'color', font:'font' } }); </script> </body> </html>