+10
-6
lines changedFilter options
+10
-6
lines changed Original file line number Diff line number Diff line change
@@ -128,10 +128,12 @@ Every reactivity API that returns refs will have a `$`-prefixed macro equivalent
128
128
- [`customRef`](https://vuejs.org/api/reactivity-advanced#customref) -> `$customRef`
129
129
- [`toRef`](https://vuejs.org/api/reactivity-utilities#toref) -> `$toRef`
130
130
131
-
These macros are globally available and do not need to be imported when Reactivity Transform is enabled, but you can optionally import them from `vue/macros` if you want to be more explicit:
131
+
These macros are globally available and do not need to be imported when Reactivity Transform is enabled, but you can optionally import them from `unplugin-vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global` if you want to be more explicit:
132
132
133
133
```js
134
-
import { $ref } from 'vue/macros'
134
+
import { $ref } from 'unplugin-vue-macros/macros'
135
+
// for standalone version:
136
+
// import { $ref } from '@vue-macros/reactivity-transform/macros-global'
135
137
136
138
const count = $ref(0)
137
139
```
@@ -356,4 +358,4 @@ Since the macros are available globally, their types need to be explicitly refer
356
358
/// <reference types="@vue-macros/reactivity-transform/macros-global" />
357
359
```
358
360
359
-
When explicitly importing the macros from `vue/macros`, the type will work without declaring the globals.
361
+
When explicitly importing the macros from `unplugin-vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global`, the type will work without declaring the globals.
Original file line number Diff line number Diff line change
@@ -128,10 +128,12 @@ function increment() {
128
128
- [`customRef`](https://vuejs.org/api/reactivity-advanced#customref) -> `$customRef`
129
129
- [`toRef`](https://vuejs.org/api/reactivity-utilities#toref) -> `$toRef`
130
130
131
-
当启用响应性语法糖时,这些宏函数都是全局可用的、无需手动导入。但如果你想让它更明显,你也可以选择从 `vue/macros` 中引入它们:
131
+
当启用响应性语法糖时,这些宏函数都是全局可用的、无需手动导入。但如果你想让它更明显,你也可以选择从 `unplugin-vue-macros/macros` 或 `@vue-macros/reactivity-transform/macros-global` 中引入它们:
132
132
133
133
```js
134
-
import { $ref } from 'vue/macros'
134
+
import { $ref } from 'unplugin-vue-macros/macros'
135
+
// 适用于独立版本:
136
+
// import { $ref } from '@vue-macros/reactivity-transform/macros-global'
135
137
136
138
const count = $ref(0)
137
139
```
@@ -356,4 +358,4 @@ Vue 为这些宏函数都提供了类型声明 (全局可用),因此类型推
356
358
/// <reference types="@vue-macros/reactivity-transform/macros-global" />
357
359
```
358
360
359
-
若你是从 `vue/macros` 中显式引入宏函数时,则不需要像这样全局声明。
361
+
若你是从 `unplugin-vue-macros/macros` 或 `@vue-macros/reactivity-transform/macros-global` 中显式引入宏函数时,则不需要像这样全局声明。
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4