It was his 10th goal for Juve since joining the club in January from Fiorentina, having earlier fired wide of the post.
Vlahovic got his second in the 51st when he pounced to score from an assist by Di Maria, who had to come off in the 66th minute with a groin problem and was replaced by Fabio Miretti.
"How do I feel playing with Di Maria? It is an incredible feeling, it is a great pleasure to play with such champions, I thank him for the assist," Vlahovic told reporters.
"What matters is being available for the team and win. He played an extraordinary match."
Vlahovic almost capped his performance with a hat trick in the 86th but his attempt was deflected wide of the post.