Javascript Quasar文件选择器更改q文件中选定文件名的文本颜色

Javascript Quasar文件选择器更改q文件中选定文件名的文本颜色,javascript,vue.js,vuejs2,quasar-framework,Javascript,Vue.js,Vuejs2,Quasar Framework,Quasar文件选择器组件,用于更改中选定文件名的文本颜色。 选择的文本文件是test.odt,如何更改其文本颜色,例如红色 <q-file standout class="registration-field text-red" bg-color="blue-2" v-model="registrationNumber" color="red" > <template v

Quasar文件选择器组件,用于更改
中选定文件名的文本颜色。

选择的文本文件是test.odt,如何更改其文本颜色,例如红色

<q-file
  standout
  class="registration-field text-red"
  bg-color="blue-2"
  v-model="registrationNumber"
  color="red"
>
  <template v-slot:prepend>
    <q-icon name="o_insert_photo" size="24px" color="blue" />
  </template>
  <template v-slot:append>
    <div class="attachment text-grey-14">File</div>
  </template>
</q-file>

文件
我尝试过使用样式道具color=“red”,但它不起作用


有人知道怎么做吗?

你可以使用
文件
槽,添加
文本红色
类,它就可以工作了

<q-file
  standout
  class="registration-field text-red"
  bg-color="blue-2"
  v-model="registrationNumber"
  color="red"
>
  <template v-slot:prepend>
    <q-icon name="photo" size="24px" color="blue"/>
  </template>
  <template v-slot:append>
    <div class="attachment text-grey-14">File</div>
  </template>
  <template v-slot:file="{ index, file }">
    <div class="ellipsis text-red relative-position">
      {{ file.name }}
    </div>

    <q-tooltip>
      {{ file.name }}
    </q-tooltip>
  </template>
</q-file>

文件
{{file.name}
{{file.name}

代码笔-

哪里是
的开始,我收到格式错误,它正在工作!!!谢谢但是我不得不删除
它会导致格式错误&我还删除了
{index}
,因为这里没有使用它。