fix(schema): remove defineModel option as it is now stable (#25306)

This commit is contained in:
Alexander Lichter 2024-01-19 10:48:24 +01:00 committed by GitHub
parent ce7845cbcf
commit 040cd97c3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 13 deletions

View File

@ -199,12 +199,11 @@ export default defineNuxtConfig({
### Enabling Experimental Vue Features ### Enabling Experimental Vue Features
You may need to enable experimental features in Vue, such as `defineModel` or `propsDestructure`. Nuxt provides an easy way to do that in `nuxt.config.ts`, no matter which builder you are using: You may need to enable experimental features in Vue, such as `propsDestructure`. Nuxt provides an easy way to do that in `nuxt.config.ts`, no matter which builder you are using:
```ts [nuxt.config.ts] ```ts [nuxt.config.ts]
export default defineNuxtConfig({ export default defineNuxtConfig({
vue: { vue: {
defineModel: true,
propsDestructure: true propsDestructure: true
} }
}) })

View File

@ -28,13 +28,6 @@ export default defineUntypedSchema({
* @type {boolean} * @type {boolean}
*/ */
propsDestructure: false, propsDestructure: false,
/**
* Vue Experimental: Enable macro `defineModel`
* @see [Vue RFC#503](https://github.com/vuejs/rfcs/discussions/503)
* @type {boolean}
*/
defineModel: false
}, },
/** /**

View File

@ -55,9 +55,6 @@ export default defineUntypedSchema({
script: { script: {
propsDestructure: { propsDestructure: {
$resolve: async (val, get) => val ?? Boolean((await get('vue')).propsDestructure) $resolve: async (val, get) => val ?? Boolean((await get('vue')).propsDestructure)
},
defineModel: {
$resolve: async (val, get) => val ?? Boolean((await get('vue')).defineModel)
} }
} }
}, },

View File

@ -205,7 +205,6 @@ export default defineUntypedSchema({
}, },
compilerOptions: { $resolve: async (val, get) => val ?? (await get('vue.compilerOptions')) }, compilerOptions: { $resolve: async (val, get) => val ?? (await get('vue.compilerOptions')) },
propsDestructure: { $resolve: async (val, get) => val ?? Boolean(await get('vue.propsDestructure')) }, propsDestructure: { $resolve: async (val, get) => val ?? Boolean(await get('vue.propsDestructure')) },
defineModel: { $resolve: async (val, get) => val ?? Boolean(await get('vue.defineModel')) }
}, },
css: { css: {