forked from fanruan/demo-tabledata-redis
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
429 B
20 lines
429 B
import { inputTypes } from '../../parameter.typings'; |
|
|
|
const inputs: { |
|
[key: string]: any; |
|
} = {}; |
|
|
|
export function input(key: inputTypes): ClassDecorator { |
|
return (target: object) => { |
|
inputs[key] = target; |
|
}; |
|
} |
|
|
|
export function getInput(type: inputTypes): string { |
|
const inputWidget = inputs[type]; |
|
if (BI.isNull(inputWidget)) { |
|
throw new TypeError(); |
|
} |
|
|
|
return inputWidget.xtype; |
|
}
|
|
|