1. $f$ is a mapping from the set $M=\{a, b, c, d\}$ to $N=\{0, 1, 2\}$, and
$$
f(a)+f(b)+f(c)+f(d)=4.
$$

Then the number of different mappings is $($  .
(A) 13
(B) 19
(C) 21
(D) 23
-1.B.
(1) When the image set is $\{1\}$, we have $f(a)=f(b)=$ $f(c)=f(d)=1$, there is 1 such mapping;
(2) When the image set is $\{0,2\}$, $f(a) 、 f(b)$ 、 $f(c) 、 f(d)$ have 2 zeros and 2 twos. Enumerating, we find there are 6 such mappings;
(3) When the image set is $\{0,1,2\}$, $f(a) 、 f(b)$ 、 $f(c) 、 f(d)$ have 1 zero, 2 ones, and 1 two. Enumerating, we find there are 12 such mappings.
In summary, there are $1+6+12=19$ different mappings.