我想编辑sharepoint列表显示图像,并超链接到另一个网站(最终,使图像可点击-一旦点击它会移动到其他页面的用户)Something like on this picture
我设法格式列表显示图片如下,但我不能添加超链接或使其可点击
current的
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
"hideSelection": true,
"width": "355",
"height": "355",
"formatter": {
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"display": "inline-block",
"min-width": "355px",
"min-height": "355px",
"margin-right": "10px",
"box-shadow": "2px 2px 4px darkgrey"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "[$Image.serverRelativeUrl]"
},
"style": {
"height": "360px",
"max-width": "360px"
}
},
{
"elmType": "a",
"txtContent": "Click here",
"style": {
"border": "none",
"padding-top": "0px",
"color": "#0078d7",
"padding-left": "0px",
"text-align": "center",
"cursor": "pointer"
},
"attributes": {
"target": "_blank",
"href": "[$Link]"
}
}
]
}
]
}
}
字符串
我查阅了文档,但没有任何帮助
1条答案
按热度按时间mnowg1ta1#
你可以试试这个JSON:
字符串
以下是我这边的结果:Result