perf(client): use shallowRef instead of ref for template reference

This commit is contained in:
syuilo 2023-01-03 13:37:32 +09:00
parent 826e4502cb
commit c93f091ba8
46 changed files with 66 additions and 70 deletions

View file

@ -39,7 +39,7 @@
</template>
<script lang="ts" setup>
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { onBeforeUnmount, onMounted, ref, shallowRef } from 'vue';
import MkModal from '@/components/MkModal.vue';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/form/input.vue';
@ -94,7 +94,7 @@ const emit = defineEmits<{
(ev: 'closed'): void;
}>();
const modal = ref<InstanceType<typeof MkModal>>();
const modal = shallowRef<InstanceType<typeof MkModal>>();
const inputValue = ref(props.input?.default || null);
const selectedValue = ref(props.select?.default || null);