4. If $\triangle A B C$ has exactly one solution when $\angle A B C=60^{\circ}, A C=12, B C=k$, then the range of $k$ is ( ).
(A) $k=8 \sqrt{3}$
(B) $0<k \leqslant 12$
(C) $k \geqslant 12$
(D) $0<k \leqslant 12$ or $k=8 \sqrt{3}$
4. (D).

According to the problem, $\triangle A B C$ has two types, as shown in Figure 5.
It is easy to get $k=8 \sqrt{3}$ or $0<k \leqslant 12$.
This problem can also be solved using the special value method, eliminating (A), (B), and (C).