fix: required

This commit is contained in:
三咲智子 Kevin Deng 2023-08-01 17:42:37 +08:00
parent 9bc5c1c648
commit 30f2484efa
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 7 additions and 5 deletions

View file

@ -8,7 +8,7 @@ const { options, command } = defineProps<{
command?: boolean
}>()
const modelValue = defineModel<string>()
const modelValue = defineModel<string>({ required: true })
const tabs = $computed(() => {
return options.map((option) => {

View file

@ -3,7 +3,7 @@ defineProps<{
title?: string
message: string
}>()
const modelValue = defineModel<boolean>()
const modelValue = defineModel<boolean>({ required: true })
</script>
<template>

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
import Fuse from 'fuse.js'
const modelValue = defineModel<string>()
const modelValue = defineModel<string>({ required: true })
const { t } = useI18n()
const userSettings = useUserSettings()

View file

@ -3,7 +3,9 @@ const { editing } = defineProps<{
editing?: boolean
}>()
const modelValue = defineModel<string>()
const modelValue = defineModel<string>({
required: true,
})
const currentVisibility = $computed(() =>
statusVisibilities.find(v => v.value === modelValue.value) || statusVisibilities[0],

View file

@ -40,7 +40,7 @@ export default defineNuxtConfig({
macros: {
setupSFC: true,
betterDefine: false,
// defineModels: false,
defineModels: false,
},
devtools: {
enabled: true,