Vue / Nuxt 的 FilePond:服务器属性动态设置?

时间:2021-07-07 12:38:55

标签: vue.js server nuxt.js filepond

小问题:

<file-pond
  name="customImage"
  ref="pond"
  label-idle="Déposez votre image ici"
  :allow-multiple="false"
  accepted-file-types="image/jpeg, image/png"
  server="http://localhost:3000'"
  :files="custom.customImage"
  @init="handleFilePondInit"
/>

是否可以动态设置服务器值? 例如:

v-server="apiUrl+'/api/v1/upload'"

1 个答案:

答案 0 :(得分:1)

试试这个

:server="`${apiUrl}/api/v1/upload`"

我正在使用 :server 但它可以写成 v-bind:serverES6 Template literals 以获得更好看的插值。

相关问题