I just want to make remark that RGB's answer more generally shows the following. Suppose $M,N$ are $S^{-1}A$ - modules. Then we can form both $M \otimes_{S^{-1}A} N$ and $M \otimes N$. The former is an $S^{-1}A$ - module and the latter an $A$ - module by restriction of scalars. The ultimate point now is this:
$M \otimes_A N$ already has the structure of an $S^{-1}A$ - module built into it! Thus $M \otimes_{S^{-1}A} N$ and $M \otimes_A N$ are canonically isomorphic as $S^{-1}A$ modules; this is basically the content of RGB's answer.
If you want to show $\Bbb{Q} \otimes_{\Bbb{Z}} \Bbb{Q} \cong \Bbb{Q}$ using universal properties here is what we do: Let $f : \Bbb{Q} \times \Bbb{Q} \to M$ be a $\Bbb{Z}$ - bilinear map. Consider $\pi : \Bbb{Q} \times \Bbb{Q} \to \Bbb{Q}$ that sends $(a,b)$ to $ab$. Now we have linearity in the first variable because $$\begin{eqnarray*} \pi(na_1 + ma_2,b) &=& (na_1+ma_2)b \\
&=& n(a_1b) + m(a_2b) \\
&=& n\pi(a_1,b) + m\pi(a_2,b)\end{eqnarray*}$$
for any $a_1,a_2,b \in \Bbb{Q}$ and $n,m\in \Bbb{Z}$. By symmetry linearity in the second variable follows and so $\pi$ is bilinear. Let us now define a map $g : \Bbb{Q} \to M$ by $g(a) = f(a,1)$ for any $a \in \Bbb{Q}$. This map $g$ is linear because $f$ is linear in the first variable. Also $g$ is well - defined and furthermore is unique: Any linear map out of $\Bbb{Q}$ to $M$ $\tilde{g}$ such that $\tilde{g} \circ \pi = f$ must necessarily satisfy $$ \tilde{g}(a) = \tilde{g}(\pi(a,1)) = f(a,1).$$
Thus we have shown that $\Bbb{Q}$ satisfies the universal property of $\Bbb{Q} \otimes_{\Bbb{Z}} \Bbb{Q}$ and so the answer to your question comes easily: $\dim_\Bbb{Q} \Bbb{Q} \otimes_{\Bbb{Z}} \Bbb{Q} = 1$.