当它在该定语从句中充当主语成分时,就是主语。如:
I have a book which is about animals. 该句中的which是修饰book的,你把它换成book后放到从句中,就变成了the book is about animals.这样你就可以判断出它就是从句的主语。
宾语也是一样。如:
This is the gift which my father gave to me. which修饰gift,= my father gave the gift to me. 所以which是gave的宾语。