The Lakers were dominant at times, leading by as many as 19 points, but needed a last-second stand to beat Dallas.