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$
(D)
4.【Analysis and Solution】According to the problem: $\triangle A B C$ has two types as shown in the figure, we can find that $k=8 \sqrt{3}$ or $0<k \leqslant 12$, so the correct choice is D.