html - SPFX webpart 引用 html 中的图像
问题描述
我正在使用 SPFX 创建一个简单的 SharePoint Webpart,我想在解决方案中引用图像。我使用了这种方法:
require("@microsoft/loader-set-webpack-public-path!");
<img src="${require<string>('../../assets/logo.jpg')}" alt="My Company" />
但它不起作用。
如何做到这一点?
解决方案
推荐阅读
- amazon-web-services - 我想从python中的字典对象下面获取特定键(sp_puser,sp_pkey)的值,任何人都可以建议
- vue.js - vue 全局组件与烤肉串案例
- php - 用户 ID 删除 @ 并转换“.” 进入 ”-”
- reactjs - react typescript项目使用快照和jspdf的问题
- oracle - 如何在Oracle中重建特定表的索引?
- c++ - 使用 #pragma 去除基于 clang 检查的 clang 警告
- sql - 使用 Azure CosmosDB 的 AVG 操作优化 SQL 查询
- python - 在python中将coo格式转换为边权重
- java - 如何动态获取/设置 JRadionButtonMenuItem?
- python - ESPN Gamecast Python Webscraping