Browse Source

Merge pull request #909 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '7047583979940fd74bc3f2667cb8e7bb31786889':
  fix: 按照comment修改
  doc: log
  fix: 修改方法
  BI-44549 feat: 字体资源添加函数
es6
windy 6 years ago
parent
commit
9f160efd23
  1. 11
      changelog.md
  2. 4
      dist/2.0/fineui.css
  3. 4
      dist/bundle.css
  4. 4
      dist/fineui.css
  5. 4
      dist/resource.css
  6. 4
      public/css/font.css
  7. 4
      src/css/resource/font.css
  8. 30
      src/less/image.less
  9. 15
      src/less/resource/font.less
  10. 4
      ui/css/font.css

11
changelog.md

@ -1,4 +1,15 @@
# 更新日志 # 更新日志
2.0(2019-05)
- 增加less函数: 字体资源添加函数addFontRe和字体激活函数activeFont
> @fontList: "dec", "report";
> .addFontRes("dec");
> .addFontRes("report");
> .activateFont(@fontList);
以上即可使用自定义的dec,report字体和fineui的资源字体
2.0(2019-04) 2.0(2019-04)
- 新增`bi.multi_tree_list_combo`控件, 此下拉树勾选节点时不会影响父子节点的勾选状态 - 新增`bi.multi_tree_list_combo`控件, 此下拉树勾选节点时不会影响父子节点的勾选状态
- 新增`bi.multi_tree_insert_combo`控件, 此下拉树可以插入不存在的新值 - 新增`bi.multi_tree_insert_combo`控件, 此下拉树可以插入不存在的新值

4
dist/2.0/fineui.css vendored

@ -4901,13 +4901,13 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none; _background: none;
} }
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

4
dist/bundle.css vendored

@ -4901,13 +4901,13 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none; _background: none;
} }
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

4
dist/fineui.css vendored

@ -4901,13 +4901,13 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none; _background: none;
} }
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot'); src: url('resources?path=/com/fr/web/ui/font/iconfont.eot');
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg'); src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

4
dist/resource.css vendored

@ -414,13 +414,13 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none; _background: none;
} }
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('font/iconfont.eot'); src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg'); src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

4
public/css/font.css

@ -1,11 +1,11 @@
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg'); src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

4
src/css/resource/font.css

@ -1,11 +1,11 @@
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('font/iconfont.eot'); src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg'); src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

30
src/less/image.less

@ -332,6 +332,36 @@
} }
} }
@defaultFontName: 'fineui';
// 添加字体资源
.addFontRes(@name: @defaultFontName, @fontUrl: @fontUrl) {
@font-face {
font-family: "@{name}";
src: url('@{fontUrl}iconfont.eot');
src: url('@{fontUrl}iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('@{fontUrl}iconfont.woff') format('woff'), /* chrome、firefox */ url('@{fontUrl}iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('@{fontUrl}iconfont.svg#svgFontName') format('svg'); /* iOS 4.1- */
}
}
// 激活字体
.activateFont(@fonts: false) {
@baseProperty: {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
};
.b-font when (@fonts = false){
font-family: @defaultFontName;
@baseProperty();
}
.b-font when not (@fonts = false){
font-family: @fonts, @defaultFontName;
@baseProperty();
}
}
// 默认font // 默认font
.font(@class,@content, @color: @color-bi-font-native) { .font(@class,@content, @color: @color-bi-font-native) {
@fc: "\@{content}"; @fc: "\@{content}";

15
src/less/resource/font.less

@ -2,19 +2,8 @@
@import "../lib/colors"; @import "../lib/colors";
@import "../image"; @import "../image";
@font-face { .addFontRes();
font-family: 'bi'; .activateFont();
src: url('@{fontUrl}iconfont.eot');
src: url('@{fontUrl}iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('@{fontUrl}iconfont.woff') format('woff'), /* chrome、firefox */ url('@{fontUrl}iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('@{fontUrl}iconfont.svg#svgFontName') format('svg'); /* iOS 4.1- */
}
.b-font {
font-family: "bi";
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.font(close-font, @font-cross); .font(close-font, @font-cross);
.font-hover(close-h-font, @font-cross); .font-hover(close-h-font, @font-cross);

4
ui/css/font.css

@ -1,11 +1,11 @@
@font-face { @font-face {
font-family: 'bi'; font-family: "fineui";
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot'); src: url('resources?path=/com/fr/web/ui/font/iconfont.eot');
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg'); src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {
font-family: "bi"; font-family: 'fineui';
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;

Loading…
Cancel
Save