updated Demo自动识别性别优化
This commit is contained in:
@@ -138,7 +138,7 @@ relationship.setMode('cantonese',{
|
|||||||
var bindChange = function(){
|
var bindChange = function(){
|
||||||
var value = $input.value.trim();
|
var value = $input.value.trim();
|
||||||
if(value){
|
if(value){
|
||||||
var result = relationship({text:value,sex:-1,type:'chain'});
|
var result = relationship({text:value.split('的')[0],sex:-1,type:'chain'});
|
||||||
if(result.length){
|
if(result.length){
|
||||||
var first_name = result[0].split('的').shift();
|
var first_name = result[0].split('的').shift();
|
||||||
var name = result[0].split('的').pop();
|
var name = result[0].split('的').pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user