Преглед изворни кода

fix(login-sheet): ls-icon 颜色经 inspect() 转字符串,修复 Dart Sass str-replace 类型错误(order-detail 订单信息 section 开标签缺失另在 a1e0700d3 修复)

Xiaogang Liao пре 2 дана
родитељ
комит
4b75e28db1
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      cfc-frontend/components/login-sheet.vue

+ 4 - 1
cfc-frontend/components/login-sheet.vue

@@ -288,7 +288,10 @@ export default {
   @return $string;
 }
 @function ls-icon($color, $inner) {
-  @return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#{str-replace($color, '#', '%23')}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
+  // Dart Sass: $color 为 Color 类型,str-index/str-replace 只接受字符串。
+  // inspect() 先转 hex 字符串(如 #4f46e5),再编码 # 为 %23(SVG data-URI 合法)。
+  $hex: inspect($color);
+  @return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#{str-replace($hex, '#', '%23')}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
 }
 // 图标路径(feather 线性几何,24×24;只编码 < > 与 #,空格/单引号合法)
 $ls-i-search:   "%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E";