add function for judge a component is enable or not