From 287b9452ee0866e7f228d48709c428634ef64bb3 Mon Sep 17 00:00:00 2001 From: Phinome Date: Wed, 8 Feb 2017 15:24:53 +0800 Subject: [PATCH] fixed font combox select bug --- _src/ui/combobox.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_src/ui/combobox.js b/_src/ui/combobox.js index 64813507..207a3823 100644 --- a/_src/ui/combobox.js +++ b/_src/ui/combobox.js @@ -21,7 +21,7 @@ "<%if: ${autoRecord} %>" + "<%for : ${recordStack} as ${recordItem}, ${index}%>" + "<%var : style = ${itemStyles}[${recordItem}]%><%var : record = ${items}[${recordItem}]%>" + - "
  • edui-combobox-checked<%/if%>\" data-item-index=\"${recordItem}\" unselectable=\"on\" onmousedown=\"return false\">" + + "
  • edui-combobox-checked<%/if%>\" data-item-index=\"${recordItem}\" unselectable=\"on\" onmousedown=\"return false\">" + "" + "" + "
  • " + @@ -32,7 +32,7 @@ "<%/if%>" + "<%for: ${items} as ${item}, ${itemIndex}%>" + "<%var : labelStyle = ${itemStyles}[${itemIndex}]%>" + - "
  • edui-combobox-checked<%/if%> edui-combobox-item-${itemIndex}\" data-item-index=\"${itemIndex}\" unselectable=\"on\" onmousedown=\"return false\">" + + "
  • edui-combobox-checked<%/if%> edui-combobox-item-${itemIndex}\" data-item-index=\"${itemIndex}\" unselectable=\"on\" onmousedown=\"return false\">" + "" + "" + "
  • " + @@ -259,20 +259,20 @@ $.each( options.recordStack, function( i, item ){ if( item != index ) { - newStack.push( item ); + newStack.push( +item ); } } ); //压入最新的记录 - newStack.unshift( index ); + newStack.unshift( +index ); if( newStack.length > options.recordCount ) { newStack.length = options.recordCount; } options.recordStack = newStack; - options.selected = index; + options.selected = +index; newChilds = $( UM.utils.render(this.tpl, options ) ); //重新渲染