我对Vue很了解,整个v-bind事情让我陷入了困境......
基本上,我正在尝试实现这种语法,但是使用Vue的v-bind,因为我不能在内联CSS样式中使用变量:
<div class="card" style="background-color: {{school.color}}">
Run Code Online (Sandbox Code Playgroud)
这是我的Vue语法,我从他们的文档中已经遵循,但它仍然抛出错误,我无法弄清楚为什么?显然,它必须是简单的,我还没有完全理解Vue的复杂性!
<div class="card" :style="{ background-color: school.color }">
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感激!