refactor/define-model
三咲智子 Kevin Deng 2023-08-01 17:42:37 +08:00
rodzic 9bc5c1c648
commit 30f2484efa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
5 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -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) => {

Wyświetl plik

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

Wyświetl plik

@ -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()

Wyświetl plik

@ -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],

Wyświetl plik

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