From 2484a623896fef61ed87ca822ddc511de9b91bfb Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 31 Jul 2019 10:32:08 +0800 Subject: [PATCH 1/7] =?UTF-8?q?BI-48769=20refactor:=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.css | 60 +++++++++++++++++++++++++------------- dist/bundle.css | 60 +++++++++++++++++++++++++------------- dist/fineui.css | 60 +++++++++++++++++++++++++------------- dist/resource.css | 60 +++++++++++++++++++++++++------------- public/css/app.css | 60 +++++++++++++++++++++++++------------- src/css/resource/app.css | 60 +++++++++++++++++++++++++------------- src/less/lib/constant.less | 4 ++- src/less/resource/app.less | 34 ++++++++++++++------- ui/css/app.css | 60 +++++++++++++++++++++++++------------- 9 files changed, 307 insertions(+), 151 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index a5abef2e2..fe85e67a0 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -4664,44 +4664,64 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } .bi-farbtastic .wheel { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center; diff --git a/dist/bundle.css b/dist/bundle.css index a5abef2e2..fe85e67a0 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -4664,44 +4664,64 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } .bi-farbtastic .wheel { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center; diff --git a/dist/fineui.css b/dist/fineui.css index 4888b6cb5..004dc488e 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -4664,44 +4664,64 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } .bi-farbtastic .wheel { background: url('resources?path=/com/fr/web/ui/images/1x/background/wheel.png') no-repeat center center; diff --git a/dist/resource.css b/dist/resource.css index e7e2dab5d..6526b80ee 100644 --- a/dist/resource.css +++ b/dist/resource.css @@ -30,44 +30,64 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } .bi-farbtastic .wheel { background: url('images/1x/background/wheel.png') no-repeat center center; diff --git a/public/css/app.css b/public/css/app.css index 5f2aefb36..1f111b949 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -30,42 +30,62 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } diff --git a/src/css/resource/app.css b/src/css/resource/app.css index 5f2aefb36..1f111b949 100644 --- a/src/css/resource/app.css +++ b/src/css/resource/app.css @@ -30,42 +30,62 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index 439dbef69..958f83f57 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -102,7 +102,9 @@ @border-color-disabled-theme-dark: #606479; //scroll color -@scroll-color: #20263b; +@scroll-color: #232e40; @scroll-color-theme-dark: #ffffff; +@scroll-thumb-color: #232e40; +@scroll-thumb-color-theme-dark: #232e40; @water-mark-color-theme-dark: #878d9f; diff --git a/src/less/resource/app.less b/src/less/resource/app.less index c0d43653b..60b4ed1d5 100644 --- a/src/less/resource/app.less +++ b/src/less/resource/app.less @@ -29,15 +29,27 @@ body { div, textarea { &::-webkit-scrollbar { -webkit-appearance: none; + width: 10px; + height: 10px; + } + &::-webkit-scrollbar-track { + width: 10px; + height: 10px; + .border-radius(5px); .background-color(@scroll-color, 5%); - width: 6px; - height: 6px; + &:hover { + .background-color(@scroll-color, 5%); + } } &::-webkit-scrollbar-thumb { - .border-radius(0); - .background-color(@scroll-color, 30%); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + .border-radius(10px); + .background-color(@scroll-color, 10%); &:hover { - .background-color(@scroll-color, 70%); + .background-color(@scroll-color, 30%); } } } @@ -46,15 +58,17 @@ div, textarea { div, textarea { &::-webkit-scrollbar { -webkit-appearance: none; + } + &::-webkit-scrollbar-track { .background-color(@scroll-color-theme-dark, 5%); - width: 6px; - height: 6px; + &:hover { + .background-color(@scroll-color-theme-dark, 5%); + } } &::-webkit-scrollbar-thumb { - .border-radius(0); - .background-color(@scroll-color-theme-dark, 30%); + .background-color(@scroll-color-theme-dark, 10%); &:hover { - .background-color(@scroll-color-theme-dark, 70%); + .background-color(@scroll-color-theme-dark, 30%); } } } diff --git a/ui/css/app.css b/ui/css/app.css index 5f2aefb36..1f111b949 100644 --- a/ui/css/app.css +++ b/ui/css/app.css @@ -30,42 +30,62 @@ body { div::-webkit-scrollbar, textarea::-webkit-scrollbar { -webkit-appearance: none; - background-color: rgba(32, 38, 59, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); - width: 6px; - height: 6px; + width: 10px; + height: 10px; +} +div::-webkit-scrollbar-track, +textarea::-webkit-scrollbar-track { + width: 10px; + height: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); +} +div::-webkit-scrollbar-track:hover, +textarea::-webkit-scrollbar-track:hover { + background-color: rgba(35, 46, 64, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40); } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(32, 38, 59, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); + width: 6px; + height: 6px; + border: 2px solid rgba(0, 0, 0, 0); + background-clip: padding-box; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + background-color: rgba(35, 46, 64, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40); } div::-webkit-scrollbar-thumb:hover, textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(32, 38, 59, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); + background-color: rgba(35, 46, 64, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40); } .bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark textarea::-webkit-scrollbar { -webkit-appearance: none; +} +.bi-theme-dark div::-webkit-scrollbar-track, +.bi-theme-dark textarea::-webkit-scrollbar-track { + background-color: rgba(255, 255, 255, 0.05); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); +} +.bi-theme-dark div::-webkit-scrollbar-track:hover, +.bi-theme-dark textarea::-webkit-scrollbar-track:hover { background-color: rgba(255, 255, 255, 0.05); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); - width: 6px; - height: 6px; } .bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark textarea::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: rgba(255, 255, 255, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); + background-color: rgba(255, 255, 255, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff); } .bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { - background-color: rgba(255, 255, 255, 0.7); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); + background-color: rgba(255, 255, 255, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff); } From ee5b7fdac355b603dd5cab4af0419450402c549e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 31 Jul 2019 10:40:44 +0800 Subject: [PATCH 2/7] update --- dist/2.0/fineui.css | 2 +- dist/bundle.css | 2 +- dist/fineui.css | 2 +- dist/resource.css | 2 +- public/css/app.css | 2 +- src/css/resource/app.css | 2 +- src/less/resource/app.less | 2 +- ui/css/app.css | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index fe85e67a0..1a0352fac 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -4686,7 +4686,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/dist/bundle.css b/dist/bundle.css index fe85e67a0..1a0352fac 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -4686,7 +4686,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/dist/fineui.css b/dist/fineui.css index 004dc488e..6e2f9eff3 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -4686,7 +4686,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/dist/resource.css b/dist/resource.css index 6526b80ee..80e1c6151 100644 --- a/dist/resource.css +++ b/dist/resource.css @@ -52,7 +52,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/public/css/app.css b/public/css/app.css index 1f111b949..38ac47e3b 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -52,7 +52,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/src/css/resource/app.css b/src/css/resource/app.css index 1f111b949..38ac47e3b 100644 --- a/src/css/resource/app.css +++ b/src/css/resource/app.css @@ -52,7 +52,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; diff --git a/src/less/resource/app.less b/src/less/resource/app.less index 60b4ed1d5..94650acdc 100644 --- a/src/less/resource/app.less +++ b/src/less/resource/app.less @@ -44,7 +44,7 @@ div, textarea { &::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; .border-radius(10px); .background-color(@scroll-color, 10%); diff --git a/ui/css/app.css b/ui/css/app.css index 1f111b949..38ac47e3b 100644 --- a/ui/css/app.css +++ b/ui/css/app.css @@ -52,7 +52,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { width: 6px; height: 6px; - border: 2px solid rgba(0, 0, 0, 0); + border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; From 21dea8ac479d5c86eaa9c2961459ea580857529b Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 31 Jul 2019 10:46:38 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=9C=9F=E9=97=B4?= =?UTF-8?q?=E4=B8=8D=E5=8F=91=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.ie.js | 1 - dist/2.0/fineui.js | 1 - dist/bundle.ie.js | 1 - dist/bundle.js | 1 - dist/fineui.ie.js | 1 - dist/fineui.js | 1 - dist/fineui_without_jquery_polyfill.js | 1 - dist/widget.js | 1 - src/widget/singleslider/singleslider.js | 1 - 9 files changed, 9 deletions(-) diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 0dd8d8df9..289c3cf31 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -82225,7 +82225,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 6d4978a38..fabeecfb1 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -82629,7 +82629,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index 0dd8d8df9..289c3cf31 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -82225,7 +82225,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/bundle.js b/dist/bundle.js index 6d4978a38..fabeecfb1 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -82629,7 +82629,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 5b2988919..9e4c0261c 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -82470,7 +82470,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/fineui.js b/dist/fineui.js index 8b59ba1cf..3d25a82e9 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -82874,7 +82874,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 51ffd075b..4162749f3 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -65480,7 +65480,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/dist/widget.js b/dist/widget.js index 5292f0b88..0e47f1a47 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -20295,7 +20295,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index 3e1215935..1800c28eb 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -157,7 +157,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, { v = o.digit === false ? v : v.toFixed(o.digit); self.label.setValue(v); self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); } }, function () { if (startDrag === true) { From f5c91cd6e80cecab4e07653575ffb4a1711da5d7 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 31 Jul 2019 15:44:58 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger.searchtextvalue.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index c1a6092d6..b88d5b84f 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -25,10 +25,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -63,6 +69,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; From d3efa9dfad28f1131bb77d6d3dc6f0813eb9f2e7 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 31 Jul 2019 16:15:31 +0800 Subject: [PATCH 5/7] =?UTF-8?q?BI-48784=20fix:=20=E8=B7=9Fchrome=E8=A1=A8?= =?UTF-8?q?=E7=8E=B0=E4=B8=80=E8=87=B4=EF=BC=8C=E9=9C=80=E8=A6=81nextTick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/detectElementResize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/platform/web/detectElementResize.js b/src/core/platform/web/detectElementResize.js index 0ca867207..b34d21771 100644 --- a/src/core/platform/web/detectElementResize.js +++ b/src/core/platform/web/detectElementResize.js @@ -114,7 +114,7 @@ var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; From f9c81b248e2b67a16742b2f45fa00e63a64fa1d4 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 1 Aug 2019 13:39:09 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=8E=BB=E6=8E=89thumb=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E9=AB=98=E8=AF=95=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.css | 4 ---- dist/2.0/fineui.ie.js | 17 ++++++++++++++--- dist/2.0/fineui.js | 17 ++++++++++++++--- dist/bundle.css | 4 ---- dist/bundle.ie.js | 17 ++++++++++++++--- dist/bundle.js | 17 ++++++++++++++--- dist/case.js | 15 +++++++++++++-- dist/core.js | 2 +- dist/fineui.css | 4 ---- dist/fineui.ie.js | 17 ++++++++++++++--- dist/fineui.js | 17 ++++++++++++++--- dist/fineui_without_jquery_polyfill.js | 15 +++++++++++++-- dist/resource.css | 4 ---- public/css/app.css | 4 ---- src/css/resource/app.css | 4 ---- src/less/resource/app.less | 4 ---- ui/css/app.css | 4 ---- 17 files changed, 111 insertions(+), 55 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index 1a0352fac..9a40926c7 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -4669,8 +4669,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -4684,8 +4682,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 289c3cf31..cb41aa334 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -21696,7 +21696,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -56859,10 +56859,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -56897,6 +56903,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index fabeecfb1..1dd3e2a91 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -21696,7 +21696,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -57263,10 +57263,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -57301,6 +57307,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/bundle.css b/dist/bundle.css index 1a0352fac..9a40926c7 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -4669,8 +4669,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -4684,8 +4682,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index 289c3cf31..cb41aa334 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -21696,7 +21696,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -56859,10 +56859,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -56897,6 +56903,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/bundle.js b/dist/bundle.js index fabeecfb1..1dd3e2a91 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -21696,7 +21696,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -57263,10 +57263,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -57301,6 +57307,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/case.js b/dist/case.js index 6d4b3ce86..94358bc51 100644 --- a/dist/case.js +++ b/dist/case.js @@ -4839,10 +4839,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -4877,6 +4883,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/core.js b/dist/core.js index 97efc08aa..286e4994c 100644 --- a/dist/core.js +++ b/dist/core.js @@ -21696,7 +21696,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; diff --git a/dist/fineui.css b/dist/fineui.css index 6e2f9eff3..6bed05fd1 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -4669,8 +4669,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -4684,8 +4682,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 9e4c0261c..c59211d4e 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -21941,7 +21941,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -57104,10 +57104,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -57142,6 +57148,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/fineui.js b/dist/fineui.js index 3d25a82e9..36d4e7f95 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -21941,7 +21941,7 @@ BI.prepares.push(function () { var addResizeListener = function (element, fn) { if (attachEvent) { element.attachEvent("onresize", fn); - fn(); + BI.nextTick(fn); } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; @@ -57508,10 +57508,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -57546,6 +57552,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 4162749f3..1c47e36bf 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -40390,10 +40390,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -40428,6 +40434,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/dist/resource.css b/dist/resource.css index 80e1c6151..24e6c4ada 100644 --- a/dist/resource.css +++ b/dist/resource.css @@ -35,8 +35,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -50,8 +48,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/public/css/app.css b/public/css/app.css index 38ac47e3b..59e5c4091 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -35,8 +35,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -50,8 +48,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/src/css/resource/app.css b/src/css/resource/app.css index 38ac47e3b..59e5c4091 100644 --- a/src/css/resource/app.css +++ b/src/css/resource/app.css @@ -35,8 +35,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -50,8 +48,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; diff --git a/src/less/resource/app.less b/src/less/resource/app.less index 94650acdc..1c759ab01 100644 --- a/src/less/resource/app.less +++ b/src/less/resource/app.less @@ -33,8 +33,6 @@ div, textarea { height: 10px; } &::-webkit-scrollbar-track { - width: 10px; - height: 10px; .border-radius(5px); .background-color(@scroll-color, 5%); &:hover { @@ -42,8 +40,6 @@ div, textarea { } } &::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; .border-radius(10px); diff --git a/ui/css/app.css b/ui/css/app.css index 38ac47e3b..59e5c4091 100644 --- a/ui/css/app.css +++ b/ui/css/app.css @@ -35,8 +35,6 @@ textarea::-webkit-scrollbar { } div::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track { - width: 10px; - height: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -50,8 +48,6 @@ textarea::-webkit-scrollbar-track:hover { } div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - width: 6px; - height: 6px; border: 2px solid transparent; background-clip: padding-box; -webkit-border-radius: 10px; From 9bdd3550d606c64c00e44eeb41cc6834224a8616 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 1 Aug 2019 16:43:49 +0800 Subject: [PATCH 7/7] =?UTF-8?q?BI-48963=20refactor:=20state=5Feditor?= =?UTF-8?q?=E6=96=B0=E5=A2=9EdefaultText=20&&=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E6=A0=87=E7=81=B0=E8=80=8C=E5=81=9A=E7=9A=84?= =?UTF-8?q?mounted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.ie.js | 54 ++++++++----------- dist/2.0/fineui.js | 54 ++++++++----------- dist/bundle.ie.js | 54 ++++++++----------- dist/bundle.js | 54 ++++++++----------- dist/case.js | 30 ++++------- dist/fineui.ie.js | 54 ++++++++----------- dist/fineui.js | 54 ++++++++----------- dist/fineui_without_jquery_polyfill.js | 54 ++++++++----------- dist/widget.js | 24 ++++----- .../trigger.searchtextvalue.js | 16 ++---- src/case/editor/editor.state.js | 14 ++--- .../multilayerselecttree.trigger.js | 4 +- .../multilayersingletree.trigger.js | 13 ++--- .../multiselect/trigger/editor.multiselect.js | 1 + .../trigger/editor.singleselect.js | 6 ++- 15 files changed, 207 insertions(+), 279 deletions(-) diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index cb41aa334..7d1d74a98 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -56859,16 +56859,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -56903,11 +56898,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58229,7 +58219,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -58456,20 +58447,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69033,6 +69025,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69113,7 +69106,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70006,7 +70000,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70085,15 +70080,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -73581,6 +73570,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -81611,7 +81601,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -81625,7 +81616,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 1dd3e2a91..4394ce719 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -57263,16 +57263,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -57307,11 +57302,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58633,7 +58623,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -58860,20 +58851,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69437,6 +69429,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69517,7 +69510,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70410,7 +70404,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70489,15 +70484,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -73985,6 +73974,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -82015,7 +82005,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -82029,7 +82020,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index cb41aa334..7d1d74a98 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -56859,16 +56859,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -56903,11 +56898,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58229,7 +58219,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -58456,20 +58447,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69033,6 +69025,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69113,7 +69106,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70006,7 +70000,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70085,15 +70080,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -73581,6 +73570,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -81611,7 +81601,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -81625,7 +81616,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/bundle.js b/dist/bundle.js index 1dd3e2a91..4394ce719 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -57263,16 +57263,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -57307,11 +57302,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58633,7 +58623,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -58860,20 +58851,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69437,6 +69429,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69517,7 +69510,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70410,7 +70404,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70489,15 +70484,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -73985,6 +73974,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -82015,7 +82005,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -82029,7 +82020,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/case.js b/dist/case.js index 94358bc51..fcc60e65e 100644 --- a/dist/case.js +++ b/dist/case.js @@ -4839,16 +4839,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -4883,11 +4878,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -6209,7 +6199,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -6436,20 +6427,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index c59211d4e..32b3af907 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -57104,16 +57104,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -57148,11 +57143,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58474,7 +58464,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -58701,20 +58692,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69278,6 +69270,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69358,7 +69351,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70251,7 +70245,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70330,15 +70325,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -73826,6 +73815,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -81856,7 +81846,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -81870,7 +81861,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/fineui.js b/dist/fineui.js index 36d4e7f95..77a3c6d3c 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -57508,16 +57508,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -57552,11 +57547,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -58878,7 +58868,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -59105,20 +59096,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -69682,6 +69674,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -69762,7 +69755,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -70655,7 +70649,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -70734,15 +70729,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -74230,6 +74219,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -82260,7 +82250,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -82274,7 +82265,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 1c47e36bf..333e7c7bc 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -40390,16 +40390,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -40434,11 +40429,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; @@ -41760,7 +41750,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -41987,20 +41978,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); @@ -52288,6 +52280,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -52368,7 +52361,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -53261,7 +53255,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -53340,15 +53335,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -56836,6 +56825,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -64866,7 +64856,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -64880,7 +64871,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/dist/widget.js b/dist/widget.js index 0e47f1a47..9c455f049 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -7092,6 +7092,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -7172,7 +7173,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -8065,7 +8067,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -8144,15 +8147,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { @@ -11640,6 +11637,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, @@ -19670,7 +19668,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -19684,7 +19683,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index b88d5b84f..e5b75d153 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -25,16 +25,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._getText(), + defaultText: o.text, + text: this._digest(o.value, o.items), value: o.value, height: o.height, - tipText: "", - listeners: [{ - eventName: BI.Events.MOUNT, - action: function () { - self.editor.setState(self._digest(o.value, o.items)); - } - }] + tipText: "" }, popup: { type: "bi.search_text_value_combo_popup", @@ -69,11 +64,6 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, - _getText: function () { - var o = this.options; - return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; - }, - _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals]; diff --git a/src/case/editor/editor.state.js b/src/case/editor/editor.state.js index 7514e6ad9..a121e764e 100644 --- a/src/case/editor/editor.state.js +++ b/src/case/editor/editor.state.js @@ -21,7 +21,8 @@ BI.StateEditor = BI.inherit(BI.Widget, { watermark: "", errorText: "", height: 24, - text: BI.i18nText("BI-Basic_Unrestricted") + defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色 + text: BI.i18nText("BI-Basic_Unrestricted") // 显示值 }); }, @@ -248,20 +249,21 @@ BI.StateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Select_Part")); this.text.element.removeClass("bi-water-mark"); } else { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } return; } if (BI.isString(v)) { this.text.setText(v); - v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); + // 配置了defaultText才判断标灰,其他情况不标灰 + (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); return; } if (BI.isArray(v)) { if (BI.isEmpty(v)) { - this.text.setText(o.text); - this.text.element.addClass("bi-water-mark"); + this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text); + BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); } else if (v.length === 1) { this.text.setText(v[0]); this.text.element.removeClass("bi-water-mark"); diff --git a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js index 93dabd8b7..72bc3c97e 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js @@ -29,6 +29,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, + defaultText: o.text, text: this._digest(o.value), value: o.value, height: o.height, @@ -109,7 +110,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { }, _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { diff --git a/src/widget/multilayersingletree/multilayersingletree.trigger.js b/src/widget/multilayersingletree/multilayersingletree.trigger.js index 87c16f2af..a1ee9e257 100644 --- a/src/widget/multilayersingletree/multilayersingletree.trigger.js +++ b/src/widget/multilayersingletree/multilayersingletree.trigger.js @@ -29,7 +29,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: o.text, + defaultText: o.text, + text: this._digest(o.value), value: o.value, height: o.height, tipText: "", @@ -108,15 +109,9 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { }; }, - mounted: function () { - var o = this.options; - if(BI.isKey(o.value)) { - this.setValue([o.value]); - } - }, - _digest: function (v) { - return this.options.valueFormatter(v); + var o = this.options; + return o.valueFormatter(v) || o.text; }, stopEditing: function () { diff --git a/src/widget/multiselect/trigger/editor.multiselect.js b/src/widget/multiselect/trigger/editor.multiselect.js index 8ba3ba26a..376070f95 100644 --- a/src/widget/multiselect/trigger/editor.multiselect.js +++ b/src/widget/multiselect/trigger/editor.multiselect.js @@ -23,6 +23,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, + defaultText: o.text, text: o.text, tipType: o.tipType, warningTitle: o.warningTitle, diff --git a/src/widget/singleselect/trigger/editor.singleselect.js b/src/widget/singleselect/trigger/editor.singleselect.js index 245565137..295b9261c 100644 --- a/src/widget/singleselect/trigger/editor.singleselect.js +++ b/src/widget/singleselect/trigger/editor.singleselect.js @@ -9,7 +9,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-select-editor", - el: {} + el: {}, + text: BI.i18nText("BI-Basic_Please_Select") }); }, @@ -23,7 +24,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { watermark: BI.i18nText("BI-Basic_Search"), allowBlank: true, value: o.value, - text: o.text + defaultText: o.text, + text: o.text, }); this.editor.on(BI.Controller.EVENT_CHANGE, function () {