mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-02 03:38:27 +08:00
feat: 列表组件的image渲染支持url模式
This commit is contained in:
parent
6bbe489162
commit
9f41ad1811
@ -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
|
||||
// 兼容旧数据
|
||||
|
Loading…
Reference in New Issue
Block a user