合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# vue回调函数的理解 > vue回调函数 ``` <pre class="calibre14">``` <span class="token2">function</span> <span class="token3">test</span><span class="token1">(</span>aaa<span class="token1">,</span>bbb<span class="token1">)</span><span class="token1">{</span> <span class="token3">aaa</span><span class="token1">(</span><span class="token4">'helloworld'</span><span class="token1">)</span> <span class="token1">}</span> 相当于: <span class="token3">test</span><span class="token1">(</span><span class="token2">function</span><span class="token1">(</span><span class="token1">)</span><span class="token1">{</span><span class="token1">}</span><span class="token1">,</span><span class="token2">function</span><span class="token1">(</span><span class="token1">)</span><span class="token1">{</span><span class="token1">}</span><span class="token1">)</span> 思路逻辑: <span class="token3">aaa</span> <span class="token">=</span> <span class="token2">function</span><span class="token1">(</span><span class="token1">)</span><span class="token1">{</span><span class="token1">}</span> <span class="token3">aaa</span><span class="token1">(</span><span class="token1">)</span>就是调用这个匿名函数 <span class="token3">aaa</span><span class="token1">(</span><span class="token4">'helloworld'</span><span class="token1">)</span> <span class="token">=</span> <span class="token2">function</span><span class="token1">(</span>res<span class="token1">)</span><span class="token1">{</span> <span class="token1">}</span> 相当于helloworld 传给了res ``` ```