Commit 061dfa3d authored by UxieKong's avatar UxieKong Committed by GitHub

fix(color-picker): fix color-picker can't select 8-digit hex color (#20710)

parent cea8c8c7
......@@ -249,7 +249,7 @@ export default class Color {
}
} else if (value.indexOf('#') !== -1) {
const hex = value.replace('#', '').trim();
if (!/^(?:[0-9a-fA-F]{3}){1,2}$/.test(hex)) return;
if (!/^(?:[0-9a-fA-F]{3}){1,2}|[0-9a-fA-F]{8}$/.test(hex)) return;
let r, g, b;
if (hex.length === 3) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment