From 7047583979940fd74bc3f2667cb8e7bb31786889 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 6 May 2019 14:55:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8C=89=E7=85=A7comment=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/image.less | 14 ++++++++++---- src/less/resource/font.less | 4 ++-- src/less/var.less | 2 -- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/less/image.less b/src/less/image.less index ff1228cd2..fdc867d87 100644 --- a/src/less/image.less +++ b/src/less/image.less @@ -332,8 +332,9 @@ } } +@defaultFontName: 'fineui'; // 添加字体资源 -.addFontRes(@name, @fontUrl) { +.addFontRes(@name: @defaultFontName, @fontUrl: @fontUrl) { @font-face { font-family: "@{name}"; src: url('@{fontUrl}iconfont.eot'); @@ -342,7 +343,7 @@ } // 激活字体 -.activateFont(@fonts) { +.activateFont(@fonts: false) { @baseProperty: { font-style: normal; -webkit-font-smoothing: antialiased; @@ -350,8 +351,13 @@ -moz-osx-font-smoothing: grayscale; }; - .b-font { - font-family: @fonts; + .b-font when (@fonts = false){ + font-family: @defaultFontName; + @baseProperty(); + } + + .b-font when not (@fonts = false){ + font-family: @fonts, @defaultFontName; @baseProperty(); } } diff --git a/src/less/resource/font.less b/src/less/resource/font.less index daae9cc6f..fa4f58c3b 100644 --- a/src/less/resource/font.less +++ b/src/less/resource/font.less @@ -2,8 +2,8 @@ @import "../lib/colors"; @import "../image"; -.addFontRes(@fontName, @fontUrl); -.activateFont(@fontName); +.addFontRes(); +.activateFont(); .font(close-font, @font-cross); .font-hover(close-h-font, @font-cross); diff --git a/src/less/var.less b/src/less/var.less index 0f1e41c7b..bb3fbbbb7 100644 --- a/src/less/var.less +++ b/src/less/var.less @@ -2,8 +2,6 @@ @imageUrl: 'images/1x/'; //图片的基本地址 @image2xUrl: 'images/2x/'; //2x图片的基本地址 -@fontName: 'fineui'; - @zIndex-layer: 100000; @zIndex-popover: 1000000; @zIndex-popup: 10000000;