This commit is contained in:
陆柯 2022-05-28 19:12:23 +08:00
parent 3bd1924a4d
commit 4c9f428bba

View File

@ -71,7 +71,7 @@ export default {
}
return []
},
b64u2hex(b64u){
b64t_to_hex(b64u){
if (/^[0-9a-zA-Z\._]+$/.test(b64u)){
let b64 = b64u.replace(/\./g, '+').replace(/_/g, '/')
return Buffer.from(b64, 'base64').toString('hex')
@ -96,7 +96,7 @@ export default {
<template v-else-if="type==='b64u'">
<span class="sColorCode"
v-for="(colorB64u,index) in address2colorB64u(colorText)"
:style="{background:`#${b64u2hex(colorB64u)}`}"
:style="{background:`#${b64t_to_hex(colorB64u)}`}"
:key="index">
{{colorB64u}}
</span>