SLR (single lens reflex) has a mirror, with either a pentaprism or pentamirror (where you stick your eyeball) to show you the view as it is through the lens.
SLR = Single Lens Reflex
Technically, this does not signify the requirement of a mirror or not. It just specifies that the picture is exposed using the same lens that is used for framing.
It's just that when there were ONLY film cameras, the only practical way to build an SLR camera was to use a mirror.
Also note that technically "SLR" does not specify the requirement for interchangeable lenses either, so technically an SLR can have a fixed non-interchangeable lens.
But most SLR 35mm film cameras had mirrors and interchangeable lenses.
And when digitial sensors came along, the most compatible way to create a high end digital camera was just to replace the film back with a digital sensor, and all the existing lenses could be used without modification.
Thus the common definition of "DSLR" is an interchangeable lens single lens reflex camera with an optical viewfinder with a digital sensor in a configuration similar to a film SLR.
But if the Technical definition of letters that make up "DSLR" is used:"Digital Single Lens Reflex" even a cell phone can be considered a DSLR.