You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
312 B
13 lines
312 B
// @ts-nocheck
|
|
// 未完成
|
|
export function base64ToArrayBuffer(base64 : string) {
|
|
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || [];
|
|
if (!format) {
|
|
new Error('ERROR_BASE64SRC_PARSE')
|
|
}
|
|
if(uni.base64ToArrayBuffer) {
|
|
return uni.base64ToArrayBuffer(bodyData)
|
|
} else {
|
|
|
|
}
|
|
} |