<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                >[danger] ##### isProxy 檢查對象是否是由 [`reactive()`](https://cn.vuejs.org/api/reactivity-core.html#reactive)、[`readonly()`](https://cn.vuejs.org/api/reactivity-core.html#readonly)、[`shallowReactive()`](https://cn.vuejs.org/api/reactivity-advanced.html#shallowreactive)或[`shallowReadonly()`](https://cn.vuejs.org/api/reactivity-advanced.html#shallowreadonly)創建的 proxy。 ~~~ export default { name: 'App', setup() { const info = { name: 'w' } const proxyInfo = new Proxy(info, {}) const refInfo = ref(info) const reactiveInfo = reactive(info) const readonlyInfo = readonly(info) const isP = isProxy(info) // false const isP1 = isProxy(refInfo) // false const isP2 = isProxy(reactiveInfo) // true const isP3 = isProxy(readonlyInfo) // true const isP4 = isProxy(proxyInfo) // false console.log(isP, isP1, isP2, isP3, isP4) // false false true true false return {} }, } ~~~ >[danger] ##### isReactive 1. [`reactive()`](https://cn.vuejs.org/api/reactivity-core.html#reactive)或[`shallowReactive()`](https://cn.vuejs.org/api/reactivity-advanced.html#shallowreactive)創建的代理。除了是純`isReactive `對象外如果該代理是 `readonly `創建的,但包裹了由 `reactive `創建的另一個代理,它也會返回 `true` ~~~ import { reactive, isReactive } from 'vue' export default { setup() { const state = reactive({ name: 'John' }) console.log(isReactive(state)) // -> true } } ~~~ >[danger] ##### isReadonly 1. 檢查對象是否是由 `readonly `創建的只讀代理。 >[danger] ##### isRef 1. 判斷值是否是一個ref對象 ~~~ let foo: unknown if (isRef(foo)) { // foo 的類型被收窄為了 Ref<unknown> foo.value } ~~~
                  <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>

                              哎呀哎呀视频在线观看