Browse Source

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

* commit 'ab9c39284eeef8b6b57adc71633264a7382e04a2':
  BI-48490 refactor: 加颜色
  BI-48487 refactor: 多音字标红优化
es6
guy 5 years ago
parent
commit
b097f8b2d9
  1. 2
      karma.conf.js
  2. 4
      src/core/platform/web/jquery/fn.js
  3. 4
      src/less/lib/colors.less
  4. 2
      src/less/lib/constant.less

2
karma.conf.js

@ -58,7 +58,7 @@ module.exports = function (config) {
"src/core/alias.js": "coverage",
"src/core/base.js": "coverage",
"src/core/func/date.js": "coverage",
"src/base/**/*.js": "coverage"
"src/base/**/!(*.test).js": "coverage"
},

4
src/core/platform/web/jquery/fn.js vendored

@ -84,7 +84,9 @@ if (jQuery) {
py = BI.toUpperCase(py);
}
this.empty();
while (true) {
// BI-48487 性能: makeFirstPY出来的py中包含多音字是必要的,但虽然此方法中做了限制。但是对于一个长度为60,包含14个多音字的字符串
// 获取的的py长度将达到1966080, 远超过text的长度,到后面都是在做"".substring的无用功,所以此循环应保证py和textLeft长度不为0
while (py.length > 0 && textLeft.length > 0) {
var tidx = BI.toUpperCase(textLeft).indexOf(keyword);
var pidx = null;
if (py != null) {

4
src/less/lib/colors.less

@ -58,6 +58,10 @@
@color-bi-background-light-gray: @background-color-light-gray;
//深色主题灰色背景
@color-bi-background-light-gray-theme-dark: @background-color-light-gray-theme-dark;
//灰色背景(中)
@color-bi-background-medium-gray: @background-color-medium-gray;
//深色主题灰色背景(中)
@color-bi-background-medium-gray-theme-dark: @background-color-medium-gray-theme-dark;
//灰化背景
@color-bi-background-disabled: @background-color-disabled;
//深色主题灰化背景

2
src/less/lib/constant.less

@ -62,6 +62,8 @@
@background-color-dark: #d4dadd;
@background-color-light-gray: #f2f4f7;
@background-color-light-gray-theme-dark: #292f45;
@background-color-medium-gray: #e8eaed;
@background-color-medium-gray-theme-dark: #363e55;
@background-color-dark-gray: #d0d4da;
@background-color-dark-gray-theme-dark: #606479;
@background-color-disabled: #f2f4f7;

Loading…
Cancel
Save