Browse Source

Pull request #2456: bugfix: valueFormatter

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '2ec953f9639a386bb45c0dde24c190e88bd568c8':
  update
es6
guy 3 years ago
parent
commit
77d0fc4471
  1. 3
      src/component/allvaluechooser/abstract.allvaluechooser.js
  2. 3
      src/component/treevaluechooser/abstract.treevaluechooser.js
  3. 3
      src/component/valuechooser/abstract.valuechooser.js

3
src/component/allvaluechooser/abstract.allvaluechooser.js

@ -24,6 +24,9 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) {
var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) {
// 把value都换成字符串

3
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -14,6 +14,9 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) {
var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) {
if (item.value === v || item.value + "" === v) {

3
src/component/valuechooser/abstract.valuechooser.js

@ -22,6 +22,9 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) {
var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) {
// 把value都换成字符串

Loading…
Cancel
Save