Browse Source

fix 字典

liuzhuang 3 years ago
parent
commit
0a075cacc5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/systemLib.ts

+ 2 - 2
src/lib/systemLib.ts

@@ -106,7 +106,7 @@ export function setComboStore(sender, config, getDictFn, bizKey) {
             if (sender.rendered) {
                 // 已经渲染出来了, 用方法进行修改
                 const editor = sender.getEditor()
-                if (editor.xtype === 'combo') {
+                if (editor && editor.xtype === 'combo') {
                     const valueField = r.field[0]
                     const displayField = r.field[1]
                     editor.valueField = valueField
@@ -134,7 +134,7 @@ export function setComboStore(sender, config, getDictFn, bizKey) {
                 const displayField = r.field[1]
                 _.each(r.data, row => {
                     // 从 valueField 找到要显示的 displayField
-                    if (row[valueField] === value) {
+                    if (row[valueField] == value) {
                         value = row[displayField]
                         return false
                     }