I suppose it depends on the story, how it's told, and what kind of writer you are. Except for "which is more important" (all of them are important!), there really is no right answer to your question.
For me, writing only dialogue first and filling in the blanks later would be pretty terrible. That wouldn't work for me, because the majority of my stories are told through the narrative. Not to mention, I can never leave blank spots in my writing to "fill in later."
But if you're writing a very dialogue-heavy story where most of it is told through dialogue, and you're not the kind who minds leaving sections to fill in later, then go for it. There's no reason it can't work for someone. Go ahead and try it.
Assuming you're writing a novel or a short story, the question you may want to ask yourself if dialogue is THAT primary to your story is if you're writing a screenplay, or a play instead.