如何使用组件上传

你好!

我想知道如何在组件中使用上传。我添加了一张图片,现在想显示它

谢谢!

这与 Category specific Disclaimer - #5 相关,但我更改了整个代码

好的,这有点尴尬,但在搜索了几周后,现在发帖的我,通过问AI找到了解决方案……:face_holding_back_tears:

在你的 CSS 中只需写:
.disclaimer {
...
  background-image: url('#{$SCSS-VARIABLE}');

SCSS_VARIABLE 的名称来自:

1 个赞

不用担心 :smile:

相关文档在这里:https://meta.discourse.org/t/include-assets-e-g-images-fonts-in-themes-and-components/62459。

请随时查看这里 :+1:
https://meta.discourse.org/c/documentation/theme-developers/127

3 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.