feat: enhance WechatModal component functionality
This commit is contained in:
parent
68b5b730bd
commit
1840901294
@ -12,12 +12,16 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: true,
|
||||
validator: value => {
|
||||
if (!value) return false
|
||||
// 允许空值用于初始化状态
|
||||
if (!value) return true
|
||||
// 扩展支持的路径格式
|
||||
return (
|
||||
value.startsWith('/') ||
|
||||
value.startsWith('/') ||
|
||||
value.startsWith('http') ||
|
||||
value.startsWith('data:image') ||
|
||||
value.startsWith('@/')
|
||||
value.startsWith('@/') ||
|
||||
value.startsWith('src/') || // 添加 src/ 路径支持
|
||||
value.includes('base64') // 允许包含 base64 的字符串
|
||||
)
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user