If we think about the various social comedies that Wilde wrote, it is clear that one ingredient he added to the form of comedy was the figure of the dandy. The dandy could be defined as a man with great sartorial elegance who is humorous and philosophical and uses paradoxes and epigrams to poke fun at the hypocrisy of society. Of course, as your question identifies, Wilde used this figure of the dandy in part because it was such a good representation of himself.
In the plays of Lady Windermere’s Fan, An Ideal Husband, and The Importance of Being Earnest, the dandy is a figure who has a clear moral position. Although dandyism ostensibly appears to be all about superficiality, which can make the dandy appear a shallow and trivial figure, the dandy can actually turn out to be a hero, as in the case of Lord Darlington in Lady Windermere's Fan and Lord Goring in An Ideal Husband, where both dandys prove themselves to be very moral characters.
If we consider The Importance of Being Earnest for one moment, we can see that Algernon clearly is the biggest dandy in the play. He delights in mocking society and its institutions with epigrams that satirise hypocrisy, such as his reference to Bunburyism:
Nothing will induce me to part with Bunbury, and if you ever get married, which seems to me extremely problematic, you will be very glad to know Bunbury. A man who marries without knowing Bunbury has a very tedious time of it.
Bunbury is a relative who conveniently falls sick whenever Algernon needs an escape, and therefore Algernon believes that every married man needs a Bunbury so they can practise Bunburyism when they need to get away from marriage.
Dandyism is therefore much more than simply effete males walking around making wisecracks. They are a tool that in Wilde's hand are used to mock the hypocrisy of society and expose its shortcomings. They are both hilarious figures but also very serious figures through the way that their humour actually makes serious points about the truth of society and what is really going on beneath the surface.