Since these are vectors, one can consider the following approach:
Let
${\bf x}_1 := \overrightarrow{r}_1$, and ${\bf x}_2 : = \overrightarrow{r}_2$, then $r_1 = ||{\bf x}||^{\frac{1}{2}}$, and $r_{12} = ||{\bf x}_1 - {\bf x_2}||^{\frac{1}{2}}$.
Define the following functions:
$g({\bf x}_1) = ||{\bf x}_1 - {\bf x_2}||^{\frac{1}{2}} = \left[({\bf x}_1 - {\bf x_2})^T ({\bf x}_1 - {\bf x_2}) \right]^{\frac{1}{2}}$
$f({\bf x}_1) = ||{\bf x}||^{\frac{1}{2}} = \left[ {\bf x}_1^T {\bf x}_1\right]^{\frac{1}{2}}$
Note that these functions are both scalar function of vectors. Also the following update should be noted
$r_{12} = g({\bf x}_1)$, and $r_1 = f({\bf x}_1)$.
$\dfrac{\partial}{\partial {r_1}} r_{12} ~=~ \dfrac{\partial}{\partial f({\bf x}_1)} g({\bf x}_1) ~=~ \dfrac{\partial}{\partial {\bf x}_1} g({\bf x}_1) ~~ \dfrac{1}{\dfrac{\partial}{\partial {\bf x}_1} f({\bf x}_1)}$ ...... chain rule
Applying Matrix Calculus and simplifying
$\dfrac{\partial}{\partial f({\bf x}_1)} g({\bf x}_1) ~=~
\dfrac{({\bf x}_1 - {\bf x_2})^T}{g({\bf x}_1)}
\dfrac{f({\bf x}_1)}{{\bf x}^T} ~=~
\dfrac{({\bf x}_1 - {\bf x_2})}{g({\bf x}_1)}
\dfrac{f({\bf x}_1)}{{\bf x}}
$... since transpose of a scalar is a scalar
changing to the original variables,
$\dfrac{\partial}{\partial {r_1}} r_{12} ~=~\dfrac{\overrightarrow{r}_1 - \overrightarrow{r}_2}{r_{12}} \dfrac{r_1}{\overrightarrow{r}_1}$