File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,10 @@ export default {
111111}
112112```
113113
114+ ## 浏览器兼容性
115+
116+ ` @vue/composition-api ` 支持所有现代浏览器以及IE11+。对于更低版本的IE浏览器你需要安装` WeakMap ` polyfill (例如使用 ` core-js ` 库)。
117+
114118## 限制
115119
116120> :white_check_mark : 支持   ;  ;  ;  ; :x : 不支持
@@ -448,6 +452,24 @@ defineComponent({
448452
449453</details >
450454
455+ ### ` computed().effect `
456+
457+ <details >
458+ <summary >
459+ ⚠️ <code >computed()</code > 拥有一个被设置为 <code >true</code > 的 <code >effect</code > 属性,用来代替 <code >ReactiveEffect<T ></code >。
460+ </summary >
461+
462+ 由于实现上的不同, 在 ` @vue/composition-api ` 中没有 ` ReactiveEffect ` 这种概念。 因此, ` effect ` 为 ` true ` 只是为了能够区分 computed 和 refs:
463+
464+ ``` ts
465+ function isComputed<T >(o : ComputedRef <T > | unknown ): o is ComputedRef <T >
466+ function isComputed(o : any ): o is ComputedRef {
467+ return !! (isRef (o ) && o .effect )
468+ }
469+ ```
470+
471+ </details >
472+
451473### 缺失的 API
452474
453475以下在 Vue 3 新引入的 API ,在本插件中暂不适用:
You can’t perform that action at this time.
0 commit comments