feat: remove usage of .sync and define explicitly emits (#10209)

References

- https://v3-migration.vuejs.org/breaking-changes/v-model
-
https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html
This commit is contained in:
Shivam Mishra
2024-10-03 12:44:18 +05:30
committed by GitHub
parent edc1fe2363
commit b8d0252511
82 changed files with 224 additions and 221 deletions

View File

@@ -1,20 +1,20 @@
<script>
import { defineModel } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { required, minLength, email } from '@vuelidate/validators';
import { useAlert } from 'dashboard/composables';
export default {
props: {
show: {
type: Boolean,
default: false,
},
currentChat: {
type: Object,
default: () => ({}),
},
},
emits: ['cancel'],
setup() {
return { v$: useVuelidate() };
const show = defineModel('show', { type: Boolean, default: false });
return { v$: useVuelidate(), show };
},
data() {
return {
@@ -80,9 +80,8 @@ export default {
};
</script>
<!-- eslint-disable vue/no-mutating-props -->
<template>
<woot-modal :show.sync="show" :on-close="onCancel">
<woot-modal v-model:show="show" :on-close="onCancel">
<div class="flex flex-col h-auto overflow-auto">
<woot-modal-header
:header-title="$t('EMAIL_TRANSCRIPT.TITLE')"