updated 表达式语法添加
This commit is contained in:
parent
9c5a79c94b
commit
6332afea3a
4
dist/relationship.min.js
vendored
4
dist/relationship.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/relationship.zh-HK.min.js
vendored
4
dist/relationship.zh-HK.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,10 +13,13 @@ export default [
|
||||
})
|
||||
},
|
||||
{
|
||||
exp:/^(\S+?)是(谁|什么亲戚|啥亲戚)??$/,
|
||||
opt:match=>({
|
||||
text:match[1]
|
||||
})
|
||||
exp:/^(\S+?)是(谁|什么亲戚|啥亲戚|什么辈分|啥辈分)??$/,
|
||||
opt:match=>{
|
||||
return {
|
||||
text:match[1],
|
||||
type:match[0].indexOf('的')>-1?'default':'chain'
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
exp:/^(\S+?)(应该|得)?(称呼|叫|喊)(\S+?)(什么|啥)??$/,
|
||||
@ -61,6 +64,13 @@ export default [
|
||||
type:'chain'
|
||||
})
|
||||
},
|
||||
{
|
||||
exp:/^(\S+?)(指的)?是(什么|啥)亲戚关系??$/,
|
||||
opt:match=>({
|
||||
text:match[1],
|
||||
type:'chain'
|
||||
})
|
||||
},
|
||||
{
|
||||
exp:/^(\S+?)对于(\S+?)是(什么|啥)关系??$/,
|
||||
opt:match=>({
|
||||
|
@ -76,9 +76,7 @@ var relationship = function (parameter){
|
||||
temps = reverseId(id,data['sex']);
|
||||
temps.forEach(function(r_id){
|
||||
var pairs = getPairsByIds(id,r_id);
|
||||
if(pairs.length){
|
||||
result = result.concat(pairs);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
temps.forEach(function(id){
|
||||
@ -86,9 +84,7 @@ var relationship = function (parameter){
|
||||
if(!items.length){
|
||||
items = getItemsById(sex+','+id);
|
||||
}
|
||||
if(items.length){
|
||||
result = result.concat(items);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user