feat: 列表组件的image渲染支持url模式

This commit is contained in:
tnt group 2023-05-17 20:09:03 +08:00
parent 6bbe489162
commit 9f41ad1811

View File

@ -71,6 +71,8 @@ export const fetchConfigComponent = (dropData: ConfigType) => {
*/
export const fetchImages = async (targetData?: ConfigType) => {
if (!targetData) return ''
// 判断图片是否为 url是则直接返回该 url
if (/^(?:https?):\/\/[^\s/.?#].[^\s]*/.test(targetData.image)) return targetData.image
// 新数据动态处理
const { image, package: targetDataPackage } = targetData
// 兼容旧数据