feat: 列表组件的image渲染支持url模式
This commit is contained in:
parent
0c87b9ecac
commit
93714457ab
@ -71,6 +71,8 @@ export const fetchConfigComponent = (dropData: ConfigType) => {
|
|||||||
*/
|
*/
|
||||||
export const fetchImages = async (targetData?: ConfigType) => {
|
export const fetchImages = async (targetData?: ConfigType) => {
|
||||||
if (!targetData) return ''
|
if (!targetData) return ''
|
||||||
|
// 判断图片是否为 url,是则直接返回该 url
|
||||||
|
if (/^(?:https?):\/\/[^\s/.?#].[^\s]*/.test(targetData.image)) return targetData.image
|
||||||
// 新数据动态处理
|
// 新数据动态处理
|
||||||
const { image, package: targetDataPackage } = targetData
|
const { image, package: targetDataPackage } = targetData
|
||||||
// 兼容旧数据
|
// 兼容旧数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user