fix observer optimization, kinda?
parent
699335243f
commit
09bf9371d7
|
@ -17,7 +17,15 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { identify, useEntity } from "@/lib/entity";
|
import { identify, useEntity } from "@/lib/entity";
|
||||||
import { computed, ComputedRef, defineComponent, onMounted, ref } from "vue";
|
import { IEntry } from "@/types/base";
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
ComputedRef,
|
||||||
|
defineComponent,
|
||||||
|
onMounted,
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
} from "vue";
|
||||||
import HashBadge from "./HashBadge.vue";
|
import HashBadge from "./HashBadge.vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -55,9 +63,13 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
|
|
||||||
// Identification
|
// Identification
|
||||||
const { attributes } = useEntity(props.address);
|
|
||||||
const inferredIds: ComputedRef<string[]> = computed(() => {
|
const inferredIds: ComputedRef<string[]> = computed(() => {
|
||||||
|
if (visible.value) {
|
||||||
|
const { attributes } = useEntity(props.address);
|
||||||
return identify(attributes).value.map((eid) => eid.value);
|
return identify(attributes).value.map((eid) => eid.value);
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue