脚本宝典收集整理的这篇文章主要介绍了

Vue2.0父子组件间事件派发机制

脚本宝典小编觉得挺不错的,现在分享给大家,也给大家做个参考,希望能帮助你少写一行代码,多一份安全和惬意。
<p>从vue1.x过来的都知道,在vue2.0中,父子组件间事件通信的<code>$dispatch</code>和<code>$broadcase</code>被移除了。官方考虑是<strong>基于组件树结构的事件流方式实在是让人难以理解,并且在组件结构扩展的过程中会变得越来越脆落</strong>。特别是在组件层级比较深的情况下。通过广播和事件分发的机制,就显得比较混乱了。</p> <p><strong>官方在废除的同时,也为我们提供了替换方案,包括实例化一个空的vue实例,使用<a href="https://cn.vuejs.org/v2/guide/migration.html?#dispatch-" rel="nofollow noreferrer" target="_blank">$emit反应子组件上的状态变化</a></strong></p> <h2 id="articleHeader0">1.使用$emit触发事件</h2> <p><code>helloWorld.vue</code>作为父组件,<code>dialogConfigVisible</code>变量控制子组件弹框显示或隐藏。<br /><code>configBox.vue</code>作为子组件,假设为封装的公告弹窗。</p> <p>在父组件中 helloWorld.vue 中</p> <p><strong>&lt; template/&gt;</strong></p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <config-box :visible=&quot;dialogConfigVisible&quot; @listenToConfig=&quot;changeConfigVisible&quot; > </config-box><br /> " title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code> <span class="hljs-tag">&lt;<span class="hljs-name">config-box</span> <span class="hljs-attr">:visible</span>=<span class="hljs-string">"dialogConfigVisible"</span> @<span class="hljs-attr">listenToConfig</span>=<span class="hljs-string">"changeConfigVisible"</span> &gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">config-box</span>&gt;</span> </code></pre> <p><strong>script</strong></p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" data(){ return { dialogConfigVisible:true } } methods: { changeConfigVisible(flag) { this.dialogConfigVisible = flag; } }" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs kotlin"><code> <span class="hljs-keyword">data</span>(){ <span class="hljs-keyword">return</span> { dialogConfigVisible:<span class="hljs-literal">true</span> } } methods: { changeConfigVisible(flag) { <span class="hljs-keyword"><a href="http://www.js-code.com/tag/this" title="浏览关于“this”的文章" target="_blank" class="tag_link">this</a></span>.dialogConfigVisible = flag; } }</code></pre> <p>然后,在子组件 configBox.vue 中,主要在任意事件回调中,使用 <code>$emit</code>来触发自定义的 <code>listenToConfig</code>事件,后面还可以加上参数传给父组件。比如,在子组件弹窗上点击×关闭时,通知父组件 <code>helloWorld.vue</code>我要关闭了,主要方便父组件改变相应状态变量,并传入false到自定义的事件中。</p> <p><strong>script</strong></p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text="methods:{ dialogClose() { this.show = false; this.$emit(&quot;listenToConfig&quot;, false) } } " title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs kotlin"><code>methods:{ dialogClose() { <span class="hljs-keyword">this</span>.show = <span class="hljs-literal">false</span>; <span class="hljs-keyword">this</span>.$emit(<span class="hljs-string">"listenToConfig"</span>, <span class="hljs-literal">false</span>) } } </code></pre> <p>在子組件中,主动触发<code>listenToConfig</code>事件,并传入参数 false, 告诉父组件 <code>helloWorld.vue</code>对话框要关闭了。这里就可以避免父组件中的状态未变化,再次刷新页面的时候对话框会自动出现。</p> <h2 id="articleHeader1">2.实例化一个空的vue实例bus</h2> <p><strong>这里实例化一个bus 空vue实例,主要为了统一管理子组件和父组件相互通信,通过bus 作为媒介,</strong><br />首先新建一个bus.js 文件,在里面新建一个对象,父组件为<code>table.vue</code>, 子组件为<code>tableColumn.vue</code></p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" // bus.js import Vue from &quot;vue&quot;; export var bus = new Vue({ data:{ scrollY:false }, methods:{ updateScrollY(flag){ this.scrollY = flag; } } })" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs typescript"><code> <span class="hljs-comment">// bus.js</span> <span class="hljs-keyword">import</span> <a href="http://www.js-code.com/tag/vue" title="浏览关于“Vue”的文章" target="_blank" class="tag_link">Vue</a> <span class="hljs-keyword">from</span> <span class="hljs-string">"vue"</span>; <span class="hljs-keyword"><a href="http://www.js-code.com/tag/export" title="浏览关于“export”的文章" target="_blank" class="tag_link">export</a></span> <span class="hljs-keyword">var</span> bus = <span class="hljs-keyword">new</span> Vue({ data:{ scrollY:<span class="hljs-literal">false</span> }, methods:{ updateScrollY(flag){ <span class="hljs-keyword">this</span>.scrollY = flag; } } })</code></pre> <p>然后分别引入:</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" // table.vue <script> import {bus} from &quot;./bus&quot; export default { created(){ bus.$on('getData',(argsData)=>{ // 这里获取子组件传来的参数 console.log(argsData); })</p> <p> } }</p> <p> </script></p> <p> // tableColumn.vue<br /> <script> import {bus} from &quot;./bus&quot; <a href="http://www.js-code.com/tag/export" title="export" target="_blank">export</a> default{ methods(){ handleClick(){ bus.$emit('getData',{data:&quot;from tableColumn!&quot;}) } } } </script><br /> " title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code> // table.vue <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript"> <span class="hljs-keyword">import</span> {bus} <span class="hljs-keyword">from</span> <span class="hljs-string">"./bus"</span> <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> { created(){ bus.$on(<span class="hljs-string">'getData'</span>,(argsData)=&gt;{ <span class="hljs-comment">// 这里获取子组件传来的参数</span> <span class="hljs-built_in">console</span>.log(argsData); }) } } </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span> // tableColumn.vue <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript"> <span class="hljs-keyword">import</span> {bus} <span class="hljs-keyword">from</span> <span class="hljs-string">"./bus"</span> <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span>{ methods(){ handleClick(){ bus.$emit(<span class="hljs-string">'getData'</span>,{<span class="hljs-attr">data</span>:<span class="hljs-string">"from tableColumn!"</span>}) } } } </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span> </code></pre> <p>上面的父子组件中,父组件中利用<code>bus</code>注册监听事件<code>getData</code>,子组件中一旦有状态变化,就触发<code>bus</code>上对应的事件。</p> <p><strong>这种利用空实例的方式,相当于创建了一个事件中心,所以这种通信同样适用于非父子组件间的通信,</strong></p> <h2 id="articleHeader2">3.多级父子组件通信</h2> <p><strong>有时,可能想要实现通信的两个组件不是直接的父子组件,而是祖父和孙子,或者是跨越了更多层级的父子组件</strong></p> <p>不可能由子组件一级一级的向上传递参数,来达到通信的目的,虽然现在我们理解的通信都是这样经过中转的。可以通过<code>while</code>等循环,不断向上遍历,直到找到目标父组件,就在对应的组件上触发事件。</p> <p>下面就只<code>element-ui</code>实现的一个<a href="https://github.com/ElemeFE/element/blob/dev/src/mixins/emitter.js" rel="nofollow noreferrer" target="_blank">父子组件通信的<code>mixins</code></a>,对于组件同步有很大的作用。在<a href="https://mp.weixin.qq.com/s/vD0E5YzBtk9w7ZeddtXy1Q" rel="nofollow noreferrer" target="_blank">element-ui 的优点概述</a>中也特意提到这个组件通信</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text="function broadcast(componentName, eventName, params) { // 向下遍历每个子节点,触发相应的向下广播的 事件 this.$children.forEach(child => {<br /> var name = child.$options.componentName;</p> <p> if (name === componentName) {<br /> child.$emit.apply(child, [eventName].concat(params));<br /> } else {<br /> broadcast.apply(child, [componentName, eventName].concat([params]));<br /> }<br /> });<br /> }<br /> export default {<br /> methods: {<br /> // 向上遍历父节点,来获取指定父节点,通过$emit 在相应的 组件中触发 eventName 事件<br /> dispatch(componentName, eventName, params) {<br /> var parent = this.$parent || this.$root;<br /> var name = parent.$options.componentName;<br /> // 上面的componentName 需要在每个vue 实例中额外配置自定义属性 componentName,<br /> //可以简单替换成var name = parent.$options._componentTag;</p> <p> while (parent &amp;&amp; (!name || name !== componentName)) {<br /> parent = parent.$parent;</p> <p> if (parent) {<br /> name = parent.$options.componentName;<br /> }<br /> }<br /> if (parent) {<br /> parent.$emit.apply(parent, [eventName].concat(params));<br /> }<br /> },<br /> broadcast(componentName, eventName, params) {<br /> broadcast.call(this, componentName, eventName, params);<br /> }<br /> }<br /> };<br /> " title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs php"><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">broadcast</span><span class="hljs-params">(componentName, eventName, params)</span> </span>{ <span class="hljs-comment">// 向下遍历每个子节点,触发相应的向下广播的 事件</span> this.$children.<span class="hljs-keyword">forEach</span>(child =&gt; { <span class="hljs-keyword">var</span> name = child.$options.componentName; <span class="hljs-keyword">if</span> (name === componentName) { child.$emit.apply(child, [eventName].concat(params)); } <span class="hljs-keyword">else</span> { broadcast.apply(child, [componentName, eventName].concat([params])); } }); } export <span class="hljs-keyword">default</span> { methods: { <span class="hljs-comment">// 向上遍历父节点,来获取指定父节点,通过$emit 在相应的 组件中触发 eventName 事件</span> dispatch(componentName, eventName, params) { <span class="hljs-keyword">var</span> <span class="hljs-keyword">parent</span> = this.$parent || this.$root; <span class="hljs-keyword">var</span> name = <span class="hljs-keyword">parent</span>.$options.componentName; <span class="hljs-comment">// 上面的componentName 需要在每个vue 实例中额外配置自定义属性 componentName,</span> <span class="hljs-comment">//可以简单替换成var name = parent.$options._componentTag;</span> <span class="hljs-keyword">while</span> (<span class="hljs-keyword">parent</span> &amp;&amp; (!name || name !== componentName)) { <span class="hljs-keyword">parent</span> = <span class="hljs-keyword">parent</span>.$parent; <span class="hljs-keyword">if</span> (<span class="hljs-keyword">parent</span>) { name = <span class="hljs-keyword">parent</span>.$options.componentName; } } <span class="hljs-keyword">if</span> (<span class="hljs-keyword">parent</span>) { <span class="hljs-keyword">parent</span>.$emit.apply(<span class="hljs-keyword">parent</span>, [eventName].concat(params)); } }, broadcast(componentName, eventName, params) { broadcast.call(this, componentName, eventName, params); } } }; </code></pre> <p><strong>首先定义两个嵌套的组件 f1.vue 和 c1.vue</strong>,实例是:</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <f1><br /> <c1></c1><br /> </f1>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code> <span class="hljs-tag">&lt;<span class="hljs-name">f1</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">c1</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">c1</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">f1</span>&gt;</span></code></pre> <p>然后,分别定义两个父子组件:</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text="c2.vue <template></p> <section> <button type=&quot;button&quot; name=&quot;button&quot; @click=&quot;dispatchTest&quot;>点击一下,就可以</button><br /> </section> <p> </template><br /> <script type=&quot;text/javascript&quot;> import Emitter from &quot;../mixins/emitter&quot;; <a href="http://www.js-code.com/tag/export" title="export" target="_blank">export</a> default { name: &quot;c2&quot;, mixins: [Emitter], componentName:'c2', methods: { dispatchTest() { <a href="http://www.js-code.com/tag/this" title="this" target="_blank">this</a>.dispatch('f1', 'listenerToC1', false); } } } </script>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code>c2.vue <span class="hljs-tag">&lt;<span class="hljs-name">template</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">section</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"button"</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"dispatchTest"</span>&gt;</span>点击一下,就可以<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">template</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>&gt;</span><span class="javascript"> <span class="hljs-keyword">import</span> Emitter <span class="hljs-keyword">from</span> <span class="hljs-string">"../mixins/emitter"</span>; <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> { <span class="hljs-attr">name</span>: <span class="hljs-string">"c2"</span>, <span class="hljs-attr">mixins</span>: [Emitter], <span class="hljs-attr">componentName</span>:<span class="hljs-string">'c2'</span>, <span class="hljs-attr">methods</span>: { dispatchTest() { <span class="hljs-keyword">this</span>.dispatch(<span class="hljs-string">'f1'</span>, <span class="hljs-string">'listenerToC1'</span>, <span class="hljs-literal">false</span>); } } } </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" f1.vue <template type=&quot;html&quot;></p> <div class=&quot;outBox-class&quot;> <slot><br /> </slot> </div> <p></template></p> <p><script type=&quot;text/javascript&quot;> import Emitter from &quot;../mixins/emitter&quot;; export default { name: &quot;f1&quot;, mixins: [Emitter], componentName: 'f1', mounted() { this.$on(&quot;listenerToC1&quot;, (value) => { alert(value); }) } } </script>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code> f1.vue <span class="hljs-tag">&lt;<span class="hljs-name">template</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"html"</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name"><a href="http://www.js-code.com/tag/div" title="浏览关于“div”的文章" target="_blank" class="tag_link">div</a></span> <span class="hljs-attr">class</span>=<span class="hljs-string">"outBox-class"</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">slot</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">slot</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">template</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>&gt;</span><span class="javascript"> <span class="hljs-keyword">import</span> Emitter <span class="hljs-keyword">from</span> <span class="hljs-string">"../mixins/emitter"</span>; <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> { <span class="hljs-attr">name</span>: <span class="hljs-string">"f1"</span>, <span class="hljs-attr">mixins</span>: [Emitter], <span class="hljs-attr">componentName</span>: <span class="hljs-string">'f1'</span>, mounted() { <span class="hljs-keyword">this</span>.$on(<span class="hljs-string">"listenerToC1"</span>, (value) =&gt; { alert(value); }) } } </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre> <p>这样,就可以在子组件中点击按钮,触发 <code>listenerToC1</code>事件,在父组件中监听到这个事件,<br />其实更<code>$emit</code>触发事件类似。不同之处在于,这里可以多级嵌套,不一定是直接的父子组件都可以触发到。</p> <h2 id="articleHeader3">4 .sync 修饰符</h2> <p>在<a href="http://www.js-code.com/tag/vue" title="Vue" target="_blank">Vue</a>1.x中,利用prop进行"<a href="http://www.js-code.com/tag/%e5%8f%8c%e5%90%91%e7%bb%91%e5%ae%9a" title="双向绑定" target="_blank">双向绑定</a>",实现父子组件通信,都会用到<code>.sync</code>修饰符,可以将子组件中对应的prop值变化同步到父组件中。但是,这样就破坏了单向数据流,在2.0版本中被移除了,在2.3.0版本中又以一种语法糖的形式加了进来。<br />可以看下<a href="https://cn.vuejs.org/v2/guide/components.html#sync-" rel="nofollow noreferrer" target="_blank">文档上给出的实例</a></p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <comp :foo.sync=“bar”></comp>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code style="word-break: break-word; white-space: initial;"> <span class="hljs-tag">&lt;<span class="hljs-name">comp</span> <span class="hljs-attr">:foo.sync</span>=<span class="hljs-string">“bar”</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">comp</span>&gt;</span></code></pre> <p>被扩展为</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <comp :foo=&quot;bar&quot; @update:foo= &quot;val =>bar=val&quot;></comp>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs ruby"><code style="word-break: break-word; white-space: initial;"> &lt;comp <span class="hljs-symbol">:foo=<span class="hljs-string">"bar"</span></span> @update<span class="hljs-symbol">:foo=</span> <span class="hljs-string">"val =&gt;bar=val"</span>&gt;&lt;<span class="hljs-regexp">/comp&gt;</span></code></pre> <p>其实跟本文中第一种方法基本一致,更加简化了。</p> <p>同样<code>helloWorld.vue</code>作为父组件, <code>configBox.vue</code>作为子组件,</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <config-box :visible.sync=&quot;dialogConfigVisible&quot; > </config-box>" title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs xml"><code> <span class="hljs-tag">&lt;<span class="hljs-name">config-box</span> <span class="hljs-attr">:visible.sync</span>=<span class="hljs-string">"dialogConfigVisible"</span> &gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">config-box</span>&gt;</span></code></pre> <p>然后在子组件中,显式的触发更新事件:</p> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text="methods:{ dialogClose() { this.show = false; this.$emit(&quot;update:visible&quot;, false) } } " title="" data-original-title="复制"></span> </div> </p></div> <pre class="hljs kotlin"><code>methods:{ dialogClose() { <span class="hljs-keyword">this</span>.show = <span class="hljs-literal">false</span>; <span class="hljs-keyword">this</span>.$emit(<span class="hljs-string">"update:visible"</span>, <span class="hljs-literal">false</span>) } } </code></pre> <p>这样visible 的变化就能同步到父组件中了。</p>

总结

以上是脚本宝典为你收集整理的

Vue2.0父子组件间事件派发机制

全部内容,希望文章能够帮你解决

Vue2.0父子组件间事件派发机制

所遇到的程序开发问题,欢迎加入QQ群277859234一起讨论学习。如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典网站推荐给程序员好友。 本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。

80%的人都看过