Browse Source

fix(form.autocomplete): 当valueField对应值为数字时,js组件报错

在远程api模式下,数据转换中强制将valueField对应值转换为字符串
Samuel 3 years ago
parent
commit
eb5c01ae47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resources/views/form/autocomplete.blade.php

+ 1 - 1
resources/views/form/autocomplete.blade.php

@@ -29,7 +29,7 @@
 
                     if (valueField) {
                         return $.map(data, function (dat) {
-                            return {value: Dcat.helpers.get(dat, valueField), data: dat};
+                            return {value: Dcat.helpers.get(dat, valueField) + '', data: dat};
                         });
                     }