<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## [觀察者模式]()實現非父子組件的傳值 >思路 ~~~ 1.給Vue.prototype一個bus屬性 Vue.prototype.bus = new Vue(); 2.給bus屬性一個自定義事件 this.bus.$emit("change") 3.當組件裝載的時候觸發 mounted(){ this.bus.$on('change',msg=>{ }) } ~~~ ~~~ <div id="app"> <child content="Dell"></child> <child content="Lee"></child> </div> ~~~ ~~~ /* 給每一個vue實例增加一個bus屬性 */ Vue.prototype.bus = new Vue(); Vue.component('child',{ props:['content'], data(){ return { selfContent:this.content } }, template:"<div @click='handleClick'>{{selfContent}}</div>", methods:{ handleClick(){ console.log(this); /* 在bus屬性上增加一個change方法 */ this.bus.$emit('change',this.content) } }, /* 組件被裝載的時候觸發 */ mounted() { this.bus.$on('change',(msg)=>{ this.selfContent= msg }) }, }) var vm = new Vue({ el:"#app", data:{ content:"good" } }) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看