更新micah的导入路径
This commit is contained in:
1 parent
27a746b9ba
commit
2ed68e5ee9
1 file changed
+8
-3
+8
-3
@@ -5,7 +5,7 @@ let micah = null;
|
||||
async function ensureDicebear() {
|
||||
if (!dicebear || !micah) {
|
||||
dicebear = await import('https://cdn.jsdelivr.net/npm/@dicebear/core@9.2.2/+esm');
|
||||
micah = (await import('https://cdn.jsdelivr.net/npm/@dicebear/collection@9.2.2/+esm')).micah;
|
||||
micah = await import('https://cdn.jsdelivr.net/npm/@dicebear/micah@9.2.2/+esm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,5 +13,10 @@ ensureDicebear();
|
||||
|
||||
export async function createAvatarSVG(userName) {
|
||||
await ensureDicebear();
|
||||
return dicebear.createAvatar(micah, { seed: userName, baseColor: ["f7e1c3", "f9c9b6", "f2d6cb", "f8ce8e", "eac393"],backgroundColor: ["b6e3f4","c0aede","d1d4f9"],backgroundType: ["gradientLinear","solid"] }).toString();
|
||||
}
|
||||
return dicebear.createAvatar(micah, {
|
||||
seed: userName,
|
||||
baseColor: ["f7e1c3", "f9c9b6", "f2d6cb", "f8ce8e", "eac393"],
|
||||
backgroundColor: ["b6e3f4", "c0aede", "d1d4f9"],
|
||||
backgroundType: ["gradientLinear", "solid"]
|
||||
}).toString();
|
||||
}
|
||||
Reference in new issue
Block a user