perf(client): use shallowRef for html element ref

This commit is contained in:
syuilo 2023-01-03 10:12:37 +09:00
parent a0af80f8c5
commit 2184240ef1
59 changed files with 114 additions and 115 deletions

View file

@ -12,7 +12,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue';
import { computed, onMounted, ref, shallowRef, watch } from 'vue';
import * as misskey from 'misskey-js';
import XDetails from '@/components/MkReactionsViewer.details.vue';
import XReactionIcon from '@/components/MkReactionIcon.vue';
@ -28,7 +28,7 @@ const props = defineProps<{
note: misskey.entities.Note;
}>();
const buttonRef = ref<HTMLElement>();
const buttonRef = shallowRef<HTMLElement>();
const canToggle = computed(() => !props.reaction.match(/@\w/) && $i);