File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { DefaultTheme } from 'vitepress'
33export const nav : DefaultTheme . NavItem [ ] = [
44 { text : 'Guide' , link : '/guide/getting-started' } ,
55 { text : 'Macros' , link : '/macros/' } ,
6+ { text : 'Features' , link : '/features/hoist-static' } ,
67]
78
89export const sidebar : DefaultTheme . Sidebar = [
@@ -42,10 +43,6 @@ export const sidebar: DefaultTheme.Sidebar = [
4243 text : 'shortVmodel' ,
4344 link : '/macros/short-vmodel' ,
4445 } ,
45- {
46- text : 'hoistStatic' ,
47- link : '/macros/hoist-static' ,
48- } ,
4946 {
5047 text : 'setupComponent' ,
5148 link : '/macros/setup-component' ,
@@ -56,4 +53,13 @@ export const sidebar: DefaultTheme.Sidebar = [
5653 } ,
5754 ] ,
5855 } ,
56+ {
57+ text : 'Features' ,
58+ items : [
59+ {
60+ text : 'hoistStatic' ,
61+ link : '/features/hoist-static' ,
62+ } ,
63+ ] ,
64+ } ,
5965]
File renamed without changes.
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ VueMacros({
2525
2626## Usage
2727
28+ Requires [ ` @vueuse/core ` ] ( https://www.npmjs.com/package/@vueuse/core ) , install it by yourself before using.
29+
2830``` vue
2931<script setup lang="ts">
3032const { modelValue, count } = defineModel<{
@@ -65,6 +67,8 @@ Assignment expression is only supported in `<script setup>` block. In other word
6567
6668:::
6769
70+ [ ` @vueuse/core ` ] ( https://www.npmjs.com/package/@vueuse/core ) is not required.
71+
6872``` vue{7-9}
6973<script setup lang="ts">
7074let { modelValue, count } = $defineModel<{
@@ -102,14 +106,19 @@ emit('update:count', count + 1)
102106
103107## Volar Configuration
104108
105- ``` jsonc{5 }
109+ ``` jsonc{6,9-12 }
106110// tsconfig.json
107111{
108112 "vueCompilerOptions": {
113+ "target": 3,
109114 "plugins": [
110115 "@vue-macros/volar/define-model"
111116 // ...more feature
112- ]
117+ ],
118+ "defineModel": {
119+ // Only works when target is 2.7.
120+ "unified": true
121+ }
113122 }
114123}
115124```
You can’t perform that action at this time.
0 commit comments