fix: 兼容excel颜色解析格式

This commit is contained in:
liyulin 2023-03-02 10:40:11 +08:00
parent de5ae182ce
commit 062f063803
4 changed files with 1061 additions and 992 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vue-office/examples/dist/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<script type="module" crossorigin src="/vue-office/examples/dist/assets/index-50454df1.js"></script>
<script type="module" crossorigin src="/vue-office/examples/dist/assets/index-530c0352.js"></script>
<link rel="stylesheet" href="/vue-office/examples/dist/assets/index-171e346f.css">
</head>
<body>

File diff suppressed because it is too large Load Diff

View File

@ -76,6 +76,9 @@ function transferArgbColor(originColor){
if(typeof originColor === 'object'){
return '#000000';
}
if(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(originColor)){
return originColor.startsWith('#') ? originColor : '#' + originColor;
}
originColor = originColor.trim().toLowerCase(); //去掉前后空格
let color = {};
try {