salix/modules/account/front/alias/main/index.js

19 lines
457 B
JavaScript

import ngModule from '../../module';
import ModuleMain from 'salix/components/module-main';
export default class Alias extends ModuleMain {
exprBuilder(param, value) {
switch (param) {
case 'search':
return /^\d+$/.test(value)
? {id: value}
: {alias: {like: `%${value}%`}};
}
}
}
ngModule.vnComponent('vnAlias', {
controller: Alias,
template: require('./index.html')
});