Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fui

# Conflicts:
#	dist/bundle.min.js
es6
windy 6 years ago
parent
commit
318007e952
  1. 2
      Gruntfile.js
  2. 7
      demo/css/main.css
  3. 101
      demo/js/face.js
  4. 26
      demo/js/preview.js
  5. 8
      demo/less/main.less
  6. 2
      dist/_fineui.min.js
  7. 9
      dist/bundle.css
  8. 1570
      dist/bundle.js
  9. 2
      dist/bundle.min.css
  10. 9
      dist/core.css
  11. 9
      dist/core_without_normalize.css
  12. 7
      dist/demo.css
  13. 127
      dist/demo.js
  14. 9
      dist/fineui.css
  15. 2
      dist/fineui.min.css
  16. 2
      dist/fineui.min.js
  17. 3
      dist/fix/fix.compact.js
  18. 9
      src/css/core/utils/common.css
  19. 13
      src/less/core/utils/common.less

2
Gruntfile.js

@ -101,7 +101,7 @@ module.exports = function (grunt) {
},
bundleJs: {
src: ["dist/core.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js"],
src: ["dist/core.js", "dist/fix/fix.js", "dist/fix/fix.compact.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js"],
dest: "dist/bundle.js"
},

7
demo/css/main.css

@ -42,6 +42,13 @@
body {
background-color: #fafbfc;
}
#wrapper {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.bi-theme-dark body {
background-color: #191B2B;
}

101
demo/js/face.js

@ -73,7 +73,15 @@ Demo.Face = BI.inherit(BI.Widget, {
self.activeFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
},
@ -87,7 +95,15 @@ Demo.Face = BI.inherit(BI.Widget, {
self.selectFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};
},
@ -97,11 +113,19 @@ Demo.Face = BI.inherit(BI.Widget, {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("灰色字体颜色(用于Card2):"), this._createColorPicker(function () {
items: [this._createLabel("tip提示字体颜色:"), this._createColorPicker(function () {
self.grayFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.icon_text_item",
cls: "bi-tips copy-font",
height: 40,
text: "测试提示文字"
}
}]
};
},
@ -127,28 +151,19 @@ Demo.Face = BI.inherit(BI.Widget, {
};
},
_createCard1BackgroundConfig: function () {
_createCardBackgroundConfig: function () {
var self = this;
return {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("Card1背景颜色:"), this._createColorPicker(function () {
items: [this._createLabel("Card背景颜色:"), this._createColorPicker(function () {
self.cardBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
};
},
_createCard2BackgroundConfig: function () {
var self = this;
return {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("Card2背景颜色:无颜色")]
};
},
_createHoverBackgroundColor: function () {
var self = this;
@ -160,7 +175,15 @@ Demo.Face = BI.inherit(BI.Widget, {
self.hoverBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试悬浮状态",
forceCenter: true
}
}]
};
},
@ -174,7 +197,15 @@ Demo.Face = BI.inherit(BI.Widget, {
self.activeBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
},
@ -188,7 +219,15 @@ Demo.Face = BI.inherit(BI.Widget, {
self.selectBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};
},
@ -198,7 +237,7 @@ Demo.Face = BI.inherit(BI.Widget, {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("分割线颜色(只对左边的表格有效):"), this._createColorPicker(function () {
items: [this._createLabel("分割线颜色:"), this._createColorPicker(function () {
self.slitColor = this;
}, function () {
self._runGlobalStyle();
@ -211,13 +250,12 @@ Demo.Face = BI.inherit(BI.Widget, {
type: "bi.vertical",
items: [this._createLabel("--通用配色--"),
this._createBackgroundConfig(),
this._createCardBackgroundConfig(),
this._createFontConfig(),
this._createActiveFontConfig(),
this._createSelectFontConfig(),
this._createGrayFontConfig(),
this._createDisableFontConfig(),
this._createCard1BackgroundConfig(),
this._createCard2BackgroundConfig(),
this._createHoverBackgroundColor(),
this._createActiveBackgroundColor(),
this._createSelectBackgroundColor(),
@ -563,14 +601,15 @@ Demo.Face = BI.inherit(BI.Widget, {
var maskBackgroundColor = this.maskBackgroundColor.getValue();
this._setStyle({
"#wrapper.bi-background, #wrapper .bi-background": {
"body.bi-background, body .bi-background": {
"background-color": backgroundColor,
color: fontColor
},
"#wrapper .bi-card": {
"background-color": cardBackgroundColor
"body .bi-card": {
"background-color": cardBackgroundColor,
color: fontColor
},
"#wrapper .bi-tips": {
"body .bi-tips": {
color: grayFontColor
},
"div::-webkit-scrollbar,.scrollbar-layout-main": {
@ -602,21 +641,25 @@ Demo.Face = BI.inherit(BI.Widget, {
"background-color": selectBackgroundColor + "!important",
color: selectFontColor + "!important"
},
".bi-button": {
"body .bi-button.button-common": {
"background-color": button1BackgroundColor,
"border-color": button1BackgroundColor
},
".bi-button.button-success": {
"body .bi-button.button-success": {
"background-color": button2BackgroundColor,
"border-color": button2BackgroundColor
},
".bi-button.button-warning": {
"body .bi-button.button-warning": {
"background-color": button3BackgroundColor,
"border-color": button3BackgroundColor
},
".bi-button.button-ignore": {
"body .bi-button.button-ignore": {
"background-color": button4BackgroundColor
},
// 以下是分割线颜色
"body .bi-border,body .bi-border-top,#wrapper .bi-border-bottom,body .bi-border-left,body .bi-border-right": {
"border-color": slitColor
},
".bi-collection-table-cell": {
"border-right-color": slitColor,
"border-bottom-color": slitColor

26
demo/js/preview.js

@ -30,28 +30,6 @@ Demo.Preview = BI.inherit(BI.Widget, {
type: "bi.absolute",
cls: "preview-background",
items: [{
el: {
type: "bi.left",
cls: "preview-header bi-tips",
height: 40,
items: [{
type: "bi.label",
height: 40,
text: "Card2",
hgap: 10,
textAlign: "left"
}, {
type: "bi.icon_text_item",
cls: "filter-font",
text: "测试图标",
width: 100,
height: 40
}]
},
left: 60,
right: 60,
top: 60
}, {
el: {
type: "bi.vtape",
cls: "preview-card bi-card",
@ -60,7 +38,7 @@ Demo.Preview = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "preview-title bi-border-bottom",
height: 40,
text: "Card1",
text: "Card",
hgap: 10,
textAlign: "left"
},
@ -92,7 +70,7 @@ Demo.Preview = BI.inherit(BI.Widget, {
},
left: 60,
right: 60,
top: 160,
top: 60,
bottom: 60
}]
};

8
demo/less/main.less

@ -57,6 +57,14 @@ body {
background-color: @color-bi-background-normal;
}
#wrapper {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.bi-theme-dark body {
background-color: @color-bi-background-normal-theme-dark;
}

2
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

9
dist/bundle.css vendored

@ -587,15 +587,6 @@ textarea {
.bi-list-item-border.active {
border: 1px solid #178cdf;
}
.bi-list-item-simple {
color: #c4c9d1;
}
.bi-list-item-simple .bi-input {
color: #c4c9d1;
}
.bi-list-item-simple .bi-textarea {
color: #c4c9d1;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
color: #3685f2;

1570
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

9
dist/core.css vendored

@ -587,15 +587,6 @@ textarea {
.bi-list-item-border.active {
border: 1px solid #178cdf;
}
.bi-list-item-simple {
color: #c4c9d1;
}
.bi-list-item-simple .bi-input {
color: #c4c9d1;
}
.bi-list-item-simple .bi-textarea {
color: #c4c9d1;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
color: #3685f2;

9
dist/core_without_normalize.css vendored

@ -309,15 +309,6 @@ textarea {
.bi-list-item-border.active {
border: 1px solid #178cdf;
}
.bi-list-item-simple {
color: #c4c9d1;
}
.bi-list-item-simple .bi-input {
color: #c4c9d1;
}
.bi-list-item-simple .bi-textarea {
color: #c4c9d1;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
color: #3685f2;

7
dist/demo.css vendored

@ -45,6 +45,13 @@
body {
background-color: #fafbfc;
}
#wrapper {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.bi-theme-dark body {
background-color: #191B2B;
}

127
dist/demo.js vendored

@ -8789,7 +8789,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
self.activeFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
},
@ -8803,7 +8811,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
self.selectFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};
},
@ -8813,11 +8829,19 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("灰色字体颜色(用于Card2):"), this._createColorPicker(function () {
items: [this._createLabel("tip提示字体颜色:"), this._createColorPicker(function () {
self.grayFontColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.icon_text_item",
cls: "bi-tips copy-font",
height: 40,
text: "测试提示文字"
}
}]
};
},
@ -8843,28 +8867,19 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
};
},
_createCard1BackgroundConfig: function () {
_createCardBackgroundConfig: function () {
var self = this;
return {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("Card1背景颜色:"), this._createColorPicker(function () {
items: [this._createLabel("Card背景颜色:"), this._createColorPicker(function () {
self.cardBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
};
},
_createCard2BackgroundConfig: function () {
var self = this;
return {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("Card2背景颜色:无颜色")]
};
},
_createHoverBackgroundColor: function () {
var self = this;
@ -8876,7 +8891,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
self.hoverBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试悬浮状态",
forceCenter: true
}
}]
};
},
@ -8890,7 +8913,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
self.activeBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
},
@ -8904,7 +8935,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
self.selectBackgroundColor = this;
}, function () {
self._runGlobalStyle();
})]
}), {
width: 100,
el: {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};
},
@ -8914,7 +8953,7 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.htape",
cls: "config-item bi-border-bottom",
height: 40,
items: [this._createLabel("分割线颜色(只对左边的表格有效):"), this._createColorPicker(function () {
items: [this._createLabel("分割线颜色:"), this._createColorPicker(function () {
self.slitColor = this;
}, function () {
self._runGlobalStyle();
@ -8927,13 +8966,12 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.vertical",
items: [this._createLabel("--通用配色--"),
this._createBackgroundConfig(),
this._createCardBackgroundConfig(),
this._createFontConfig(),
this._createActiveFontConfig(),
this._createSelectFontConfig(),
this._createGrayFontConfig(),
this._createDisableFontConfig(),
this._createCard1BackgroundConfig(),
this._createCard2BackgroundConfig(),
this._createHoverBackgroundColor(),
this._createActiveBackgroundColor(),
this._createSelectBackgroundColor(),
@ -9279,14 +9317,15 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
var maskBackgroundColor = this.maskBackgroundColor.getValue();
this._setStyle({
"#wrapper.bi-background, #wrapper .bi-background": {
"body.bi-background, body .bi-background": {
"background-color": backgroundColor,
color: fontColor
},
"#wrapper .bi-card": {
"background-color": cardBackgroundColor
"body .bi-card": {
"background-color": cardBackgroundColor,
color: fontColor
},
"#wrapper .bi-tips": {
"body .bi-tips": {
color: grayFontColor
},
"div::-webkit-scrollbar,.scrollbar-layout-main": {
@ -9318,21 +9357,25 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
"background-color": selectBackgroundColor + "!important",
color: selectFontColor + "!important"
},
".bi-button": {
"body .bi-button.button-common": {
"background-color": button1BackgroundColor,
"border-color": button1BackgroundColor
},
".bi-button.button-success": {
"body .bi-button.button-success": {
"background-color": button2BackgroundColor,
"border-color": button2BackgroundColor
},
".bi-button.button-warning": {
"body .bi-button.button-warning": {
"background-color": button3BackgroundColor,
"border-color": button3BackgroundColor
},
".bi-button.button-ignore": {
"body .bi-button.button-ignore": {
"background-color": button4BackgroundColor
},
// 以下是分割线颜色
"body .bi-border,body .bi-border-top,#wrapper .bi-border-bottom,body .bi-border-left,body .bi-border-right": {
"border-color": slitColor
},
".bi-collection-table-cell": {
"border-right-color": slitColor,
"border-bottom-color": slitColor
@ -11592,28 +11635,6 @@ BI.shortcut("demo.north", Demo.North);Demo.Preview = BI.inherit(BI.Widget, {
type: "bi.absolute",
cls: "preview-background",
items: [{
el: {
type: "bi.left",
cls: "preview-header bi-tips",
height: 40,
items: [{
type: "bi.label",
height: 40,
text: "Card2",
hgap: 10,
textAlign: "left"
}, {
type: "bi.icon_text_item",
cls: "filter-font",
text: "测试图标",
width: 100,
height: 40
}]
},
left: 60,
right: 60,
top: 60
}, {
el: {
type: "bi.vtape",
cls: "preview-card bi-card",
@ -11622,7 +11643,7 @@ BI.shortcut("demo.north", Demo.North);Demo.Preview = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "preview-title bi-border-bottom",
height: 40,
text: "Card1",
text: "Card",
hgap: 10,
textAlign: "left"
},
@ -11654,7 +11675,7 @@ BI.shortcut("demo.north", Demo.North);Demo.Preview = BI.inherit(BI.Widget, {
},
left: 60,
right: 60,
top: 160,
top: 60,
bottom: 60
}]
};

9
dist/fineui.css vendored

@ -587,15 +587,6 @@ textarea {
.bi-list-item-border.active {
border: 1px solid #178cdf;
}
.bi-list-item-simple {
color: #c4c9d1;
}
.bi-list-item-simple .bi-input {
color: #c4c9d1;
}
.bi-list-item-simple .bi-textarea {
color: #c4c9d1;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
color: #3685f2;

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/fix/fix.compact.js vendored

@ -64,7 +64,8 @@
if (target != null) {
return target;
}
var p = widget || context;
widget = widget || context;
var p = widget;
while (p) {
if (p.store || p.__cacheStore) {
break;

9
src/css/core/utils/common.css

@ -309,15 +309,6 @@ textarea {
.bi-list-item-border.active {
border: 1px solid #178cdf;
}
.bi-list-item-simple {
color: #c4c9d1;
}
.bi-list-item-simple .bi-input {
color: #c4c9d1;
}
.bi-list-item-simple .bi-textarea {
color: #c4c9d1;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
color: #3685f2;

13
src/less/core/utils/common.less

@ -357,15 +357,8 @@ textarea {
}
}
//极简
//极简,hover文字高亮一下
.bi-list-item-simple {
color: @color-bi-text-tips;
& .bi-input {
color: @color-bi-text-tips;
}
& .bi-textarea {
color: @color-bi-text-tips;
}
&:hover, &.hover {
color: @color-bi-text-highlight;
& .bi-input {
@ -391,7 +384,7 @@ textarea {
}
}
//文字active时变化
// 只有文字在hover和active时变化
.bi-list-item-effect {
&:hover {
color: @color-bi-text-black;
@ -623,7 +616,7 @@ textarea {
}
}
//有选中效果
// 激活和选中时背景高亮
.bi-list-item-select {
&:hover, &.hover {
color: @color-bi-text-black;

Loading…
Cancel
Save