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;