<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [toc] ### 1. ref js中需要通過count.value操作,html中顯示則不需要 ``` const count = ref(0); const double = computed(() => { return count.value * 2; }) const increase = () => { count.value++; } return { count, double, increase } ``` 2. setup中ref定義的值name是一個ref對象,name.value是值,但是在mounted中name即是值 ``` setup() { console.log(username, username.value); // ref, value } mounted() { console.log(this.username) // value } ``` ### reactive 如果通過...解構的方式賦值,則需要通過toRefs轉化為響應式 ``` // 響應式 const data = reactive({ count: 0, increase: () => { data.count++ }, double: computed(() => data.count * 2) }) // 轉化為響應式對象 const refData = toRefs(data); return { ...refData // 取出來之后必須要通過toRefs變成響應式 } ``` reactive 如果直接創建數組,會失去響應式,解決辦法,創建對象中包含數組,或者用ref創建簡單數組 ### shallowReactive 創建的proxy對象只會代理第一次,內層失去響應式 ### readonly 會被代理,但是不能被修改 ### shallowReadonly 外層不能被修改,里層能改,但是視圖仍然不會更新
                  <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>

                              哎呀哎呀视频在线观看