I do exactly as Pattar said. When the attitude shows up I leave her standing there. I will give one chance to get positive. Then go do something else. My dd will beg me to come back. Then we have a totally different practice.
She pouts on the mound when she gives up hits or the team gets behind. She lollygags to first on grounders that she's not happy with or pop flies (that we all know at this age can still drop) and pouts on her way back to the dugout.
Additionally, she gives me a very similar attitude when I work with her pitching. Where in the past she was eager to listen to my suggestions (that I pick up from her pitching coach) to help her, now she closes down and gives very little effort in our sessions - which often ends up in me getting upset (I'm working on this!)
She's reassured me that she loves the game, loves to pitch, loves her team and is having fun, because I told her that it oftentimes looks like she doesn't like it.